Skip to content

Instantly share code, notes, and snippets.

@JoeJoe1313
Last active January 3, 2026 21:17
Show Gist options
  • Select an option

  • Save JoeJoe1313/e95292595763ce75b41a12c43520295c to your computer and use it in GitHub Desktop.

Select an option

Save JoeJoe1313/e95292595763ce75b41a12c43520295c to your computer and use it in GitHub Desktop.
Trigonometric Identities the Euler Way
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"id": "2c9e7ca0",
"metadata": {},
"source": [
"If we add (1) and (2), we can derive the cosine function:\n",
"\n",
"$$\\label{eq:3}\n",
"\\cos\\theta = \\frac{e^{i\\theta} + e^{-i\\theta}}{2}. \\tag{3}\n",
"$$\n",
"\n",
"If we subtract (2) from (1), we can derive the sine function:\n",
"\n",
"$$\\label{eq:4}\n",
"\\sin\\theta = \\frac{e^{i\\theta} - e^{-i\\theta}}{2i}. \\tag{4}\n",
"$$\n",
"\n",
"\n",
"# Angle Addition Formulas\n",
"\n",
"Let's say we want to derive the angle addition formulas for sine and cosine using Euler's formula. We start with\n",
"\n",
"$$\n",
"e^{i(\\alpha + \\beta)} = e^{i\\alpha + i\\beta} = e^{i\\alpha} e^{i\\beta}.\n",
"$$\n",
"\n",
"Applying the Euler's formula to the left side, we have:\n",
"\n",
"$$\n",
"e^{i(\\alpha + \\beta)} = \\cos(\\alpha + \\beta) + i \\sin(\\alpha + \\beta).\n",
"$$\n",
"\n",
"Now, applying the Euler's formula to the right side, we have:\n",
"\n",
"$$\n",
"e^{i\\alpha} e^{i\\beta} = (\\cos\\alpha + i \\sin\\alpha)(\\cos\\beta + i \\sin\\beta) =\n",
"$$\n",
"\n",
"$$\n",
"= \\cos\\alpha \\cos\\beta - \\sin\\alpha \\sin\\beta + i (\\sin\\alpha \\cos\\beta + \\cos\\alpha \\sin\\beta).\n",
"$$\n",
"\n",
"Equating the real parts of the above two expressions, we get the **cosine addition formula**\n",
"\n",
"$$\n",
"\\cos(\\alpha + \\beta) = \\cos\\alpha \\cos\\beta - \\sin\\alpha \\sin\\beta.\n",
"$$\n",
"\n",
"Equating the imaginary parts, we get the **sine addition formula**\n",
"\n",
"$$\n",
"\\sin(\\alpha + \\beta) = \\sin\\alpha \\cos\\beta + \\cos\\alpha \\sin\\beta.\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "56fc4761",
"metadata": {},
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "blog",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python",
"version": "3.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JoeJoe1313
Copy link
Author

Euler's_formula

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment