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
{
"cells": [
{
"cell_type": "markdown",
"id": "2c9e7ca0",
"metadata": {},
"source": [
"**Euler's formula** states that for any real number $\\theta$,\n",
"\n",
"$$\\label{eq:1}\n",
"e^{i \\theta} = \\cos\\theta + i \\sin\\theta, \\tag{1}\n",
"$$\n",
"\n",
"where $i$ is the imaginary unit, defined as $i^2 = -1$. The formula has a geometric interpretation in the complex plane that provides insight into trigonometry and complex numbers, **Figure 1**.\n",
"\n",
"In **Figure 1**, the horizontal axis represents the real part, the vertical axis represents the imaginary part, and any complex number $z = x + i y$ is plotted as the point $(x, y)$. Euler's formula represents a point on the unit circle at angle $\\theta$ from the positive real axis, where:\n",
"\n",
"- **Real part**: $\\cos\\theta$ (horizontal coordinate)\n",
"- **Imaginary part**: $\\sin\\theta$ (vertical coordinate)\n",
"- **Magnitude**: $|e^{i\\theta}| = \\sqrt{\\cos^2\\theta + \\sin^2\\theta} = 1$\n",
"\n",
"As $\\theta$ varies from $0$ to $2\\pi$, the point $e^{i\\theta}$ traces out the entire unit circle. The famous **Euler's identity** emerges naturally:\n",
"\n",
"$$\n",
"e^{i \\pi} = \\cos(\\pi) + i \\sin(\\pi) = -1 + 0 i = -1,\n",
"$$\n",
"\n",
"or\n",
"\n",
"$$\n",
"e^{i \\pi} + 1 = 0.\n",
"$$\n",
"\n",
"Now, let's go back to $\\eqref{eq:1}$. We know that $\\cos(x)$ is an even function, meaning $\\cos(-x) = \\cos(x)$, and $\\sin(x)$ is an odd function, meaning $\\sin(-x) = -\\sin(x)$. Using that, we can derive the following identity:\n",
"\n",
"$$\\label{eq:2}\n",
"e^{-i \\theta} = e^{i (-\\theta)} = \\cos(-\\theta) + i \\sin(-\\theta) = \\cos\\theta - i \\sin\\theta. \\tag{2}\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.
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