# Euler's identity

Euler's identity is $e^{i\theta}=\cos \theta+ i\sin\theta$. It is named after the 18th-century mathematician Leonhard Euler.

## Background

Euler's formula is a fundamental tool used when solving problems involving complex numbers and/or trigonometry. Euler's formula replaces "cis", and is a superior notation, as it encapsulates several nice properties:

### De Moivre's Theorem

De Moivre's Theorem states that for any real numbers $\theta$ and $n$, $(\cos(\theta) + i\sin(\theta))^n = (e^{i\theta})^n = e^{in\theta} = \cos(n\theta) + i\sin(n\theta)$.

Start with $e^{i(\alpha + \beta)} = (e^{i\alpha})(e^{i\beta})$, and apply Euler's forumla both sides:

$\cos(\alpha + \beta) + i \sin(\alpha + \beta) = (\cos\alpha + i\sin\alpha)(\cos\beta + i\sin\beta).$

Expanding the right side gives

$(\cos\alpha\cos\beta - \sin\alpha\sin\beta) + i(\cos\alpha\sin\beta + \sin\alpha\cos\beta).$

Comparing the real and imaginary terms of these expressions gives the sine and cosine angle-addition formulas:

$\cos(\alpha+\beta) = \cos\alpha\cos\beta - \sin\alpha\sin\beta$

$\sin(\alpha+\beta) = \cos\alpha\sin\beta + \sin\alpha\cos\beta$

### Other nice properties

A special, and quite fascinating, consequence of Euler's formula is the identity $e^{i\pi}+1=0$, which relates five of the most fundamental numbers in all of mathematics: e, i, pi, 0, and 1.

## Proof 1

The proof of Euler's formula can be shown using the technique from calculus known as Taylor series.

We have the following Taylor series:

$e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\cdots=\sum_{k=0}^{\infty}\frac{x^k}{k!}$

$\sin(x)=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\cdots=\sum_{k=0}^{\infty}(-1)^{k}\frac{x^{2k+1}}{(2k+1)!}$

$\cos(x)=1-\frac{x^2}{2!}+\frac{x^4}{4!}-\cdots=\sum_{k=0}^{\infty}(-1)^{k}\frac{x^{2k}}{(2k)!}$

The key step now is to let $x=i\theta$ and plug it into the series for $e^x$. The result is Euler's formula above.

## Proof 2

Define $z=\cos{\theta}+i\sin{\theta}$. Then $\frac{dz}{d\theta}=-\sin{\theta}+i\cos{\theta}=iz$, $\implies \frac{dz}{z}=id\theta$

$\int \frac{dz}{z}=\int id\theta$

$\ln{|z|}=i\theta+c$

$z=e^{i\theta+c}$; we know $z(0)=1$, so we get $c=0$, therefore $z=e^{i\theta}=\cos{\theta}+i\sin{\theta}$.