# Euler's Formula

#### Posted on

#### Tags: maths

While looking for different proofs of Euler's formula (\( e^{ix} = \cos(x) + i \sin(x)\; \forall \; x \in ℝ \)), I came across this answer. It took me a while to understand it, so posting here for future reference.

So, the way it works is:

\[ \begin{aligned} e^{ix} &= \cos(x) + i \sin(x) \\ \implies 1 &= \frac{1}{e^{ix}} (\cos(x) + i \sin(x))\\ &= {e^{-ix}}(cos(x)+i \sin(x)) \end{aligned} \]

So, lets start the proof by defining the function \(f(x)\):

\[ \begin{aligned} f (x) &= e^{-ix}(\cos(x)+i \sin(x)) \\ \implies f'(x) &= -i e^{-ix} (\cos(x)+i \sin(x)) + e^{-ix}(-\sin(x)+i \cos(x)) \\ &= \cancel{e^{-ix} \sin(x)} - \cancel{e^{-ix} \sin(x)} - i( \cancel{ e^{-ix} \cos(x)} - \cancel{e^{-ix} \cos(x)}) \\ &= 0 \end{aligned} \]

And since, \( f'(x) = 0 \), therefore \( f(x) = f(y) \; \forall \; x, y \in ℝ \).

So we calculate:

\[ \begin{aligned} & f(0) = e^0(\cos(0) + i \sin(0)) = 1 \\ \implies & f(x) = 1 \\ \implies & {e^{-ix}}(\cos(x)+i \sin(x)) = 1 \\ \implies & {e^{ix}} = (\cos(x)+i \sin(x)) \\ \end{aligned} \]

Really elegant. And ofcourse, \( e^{i\pi} + 1 = 0 \).