Derivation of Euler formula, Euler Identity and de Moivre formula

Euler formula

The proof for Euler formula and identity using power series is ubiquitous on the internet. However, I will include it here to amplify the power of substitution. The derivation of Euler formula is useful in obtaining the exponential form of $\sin(x)$ and $\cos(x)$.

We have:

$e^x=1+x+\dfrac{x^2}{2!}+\dfrac{x^3}{3!}+\dfrac{x^4}{4!}+\dfrac{x^5}{5!}+\dfrac{x^6}{6!}+O(x^7)$

$\sin(x)=x-\dfrac{x^3}{3!}+\dfrac{x^5}{5!}-\dfrac{x^7}{7!}+\dfrac{x^9}{9!}-\dfrac{x^{11}}{11!}+\dfrac{x^{13}}{13!}+O(x^{15})$

$\cos(x)=  1-\dfrac{x^2}{2!}+\dfrac{x^4}{4!}-\dfrac{x^6}{6!}+\dfrac{x^8}{8!}-\dfrac{x^{10}}{10!}+\dfrac{x^{12}}{12!}+O(x^{14})$

We are looking for the series representation of $e^{ix}$, so we can substitute $ix$ into $x$ in the series of $e^x$, we have:

$e^{ix}=1+ix+\dfrac{(ix)^2}{2!}+\dfrac{(ix)^3}{3!}+\dfrac{(ix)^4}{4!}+\dfrac{(ix)^5}{5!}+\dfrac{(ix)^6}{6!}+O(x^7)$

where $i$ is the imaginary number $\sqrt{-1}$

We have $i^1=i$; $i^2=-1$; $i^3=i^2\cdot i=-i; i^4=1$; $i^5=i$; $i^6=-1$; $i^7=-i$

Thus:

$e^{ix}=1+ix-\dfrac{x^2}{2!}-\dfrac{ix^3}{3!}+\dfrac{x^4}{4!}+\dfrac{ix^5}{5!}-\dfrac{x^6}{6!}-\dfrac{ix^7}{7!}+O(x^8)$

Rearrange the terms and factor $i$, we will have

$e^{ix}=\color{blue}{\left(1-\dfrac{x^2}{2!}+\dfrac{x^4}{4!}-\dfrac{x^6}{6!}...\right)}+\color{green}{i\left(x-\dfrac{x^3}{3!}+\dfrac{x^5}{5!}-\dfrac{x^7}{7!}...\right)}$

$e^{ix}=\color{blue}{\cos(x)}+\color{green}{i\sin(x)}$ (QED)

Euler identity

From this, we can easily obtain the Euler's identity:

$e^{ix}=\cos(x)+i\sin(x)$

$\implies e^{i\pi}=\cos(\pi)+i\sin(\pi)=-1+0$

$\implies \boxed{\color{green}{e^{i\pi}=-1}}$

Euler formula for hyperbolic function

Similar to the Euler formula, we can also derive

$\color{green}{\sinh(x)=x+\dfrac{x^3}{3!}+\dfrac{x^5}{5!}+\dfrac{x^7}{7!}+\dfrac{x^9}{9!}+\dfrac{x^{11}}{11!}+\dfrac{x^{13}}{13!}+O(x^{15})}$

$\color{blue}{\cosh(x)=  1+\dfrac{x^2}{2!}+\dfrac{x^4}{4!}+\dfrac{x^6}{6!}+\dfrac{x^8}{8!}+\dfrac{x^{10}}{10!}+\dfrac{x^{12}}{12!}+O(x^{14})}$

$e^x=\color{blue}{1}+\color{green}{x}+\color{blue}{\dfrac{x^2}{2!}}+\color{green}{\dfrac{x^3}{3!}}+\color{blue}{\dfrac{x^4}{4!}}+\color{green}{\dfrac{x^5}{5!}}+\color{blue}{\dfrac{x^6}{6!}}+O(x^7)$

$e^x=\color{blue}{\cosh(x)}+\color{green}{\sinh(x)}$

Exponential form of $\sin(x)$

We can also derive two principal identities for $\sin(x)$ and $\cos(x)$, and then find the relationship between them and $\sinh(x)$ and $\cosh(x)$

$e^{ix}-e^{-ix}=\cos(x)+i\sin(x)-[\cos(-x)+i\sin(-x)]$

$=\cos(x)+i\sin(x)-\cos(x)-(-i\sin(x))$ (Since $\sin(x)$ is odd)

$=\color{red}{\cos(x)}+i\sin(x)-\color{red}{\cos(x)}+i\sin(x)$ (Red terms denote elimination)

$=2i\sin(x)\implies \boxed{\color{green}{\dfrac{e^{ix}-e^{-ix}}{2i}=\sin(x)}}$

Exponential form of $\sinh(x)$

$e^{x}-e^{-x}=\cosh(x)+\sinh(x)-[\cosh(-x)+\sinh(-x)]$

$=\cosh(x)+\sinh(x)-\cosh(x)-(\sinh(x)$ (Since $\sinh(x)$ is odd)

$=\color{red}{\cosh(x)}+\sinh(x)-\color{red}{\cosh(x)}+\sinh(x)$ (Red terms denote elimination)

$=2\sinh(x)\implies \boxed{\color{green}{\dfrac{e^{x}-e^{-x}}{2}=\sinh(x)}}$

Proof that $\sin(ix)=i\sinh(x)$

The relationship between $\sin(x)$ and $\sinh(x)$ can be expressed as followed:

Recall that $\sinh(x)=\dfrac{e^x-e^{-x}}{2}\implies -\sinh(x)=\dfrac{e^{-x}-e^{x}}{2}$

$\sin(ix)=\dfrac{e^{i^2x}-e^{-i^2x}}{2i}=\dfrac{e^{-x}-e^{x}}{2i}=-\dfrac{\sinh(x)}{i}=i^2\dfrac{\sinh(x)}{i}=i\sinh(x)$

Exponential form of $\cos(x)$

$e^{ix}+e^{-ix}=\cos(x)+i\sin(x)+[\cos(-x)+i\sin(-x)]$

$=\cos(x)+\color{red}{i\sin(x)}+\cos(x)-\color{red}{i\sin(x)}$ 

$=2\cos(x)\implies \boxed{\color{green}{\dfrac{e^{ix}+e^{-ix}}{2}=\cos(x)}}$

Exponential form of $\cosh(x)$

$e^{x}+e^{-x}=\cosh(x)+\sinh(x)+[\cosh(-x)+\sinh(-x)]$

$=\cosh(x)+\color{red}{\sinh(x)}+\cosh(x)-\color{red}{\sinh(x)}$ 

$=2\cosh(x)\implies \boxed{\color{green}{\dfrac{e^{x}+e^{-x}}{2}=\cosh(x)}}$

Proof that $\cos(ix)=\cosh(x)$

The relationship between $\cos(x)$ and $\cosh(x)$ is that:

$\cos(ix)=\dfrac{e^{i^2x}+e^{(-i)^2x}}{2}=\boxed{\color{green}{\dfrac{e^{-x}+e^x}{2}=\cosh(x)}}$

De Moivre Formula

This formula can be easily proven once the proof of Euler formula is established:

$[\cos(x)+i\sin(x)]^n=(e^{ix})^n=e^{inx}=\color{green}{\cos(nx)+i\sin(nx)}$

Prove de Moivre Formula by induction

To be more rigorous, we can prove De Moivre formula by using induction:

What we need to prove is 

$$[\cos(x)+i\sin(x)]^n=\cos(nx)+i\sin(nx)$$

We prove for the base case $n=1$, we have

We have 

$\cos(x)+i\sin(x)=\cos(x)+i\sin(x)$ (Proved)

Let $n=k$, assume that the equality holds for $k$

$$\color{green}{[\cos(x)+i\sin(x)]^k=\cos(kx)+i\sin(kx)}$$

We prove that this is true for $k+1$, we have for the $LHS$:

$$=[\cos(x)+i\sin(x)]^{k+1}$$

$$=\color{green}{[\cos(x)+i\sin(x)]^{k}}[\cos(x)+i\sin(x)]$$

$$=[\color{green}{\cos(kx)+i\sin(kx)]}[\cos(x)+i\sin(x)]$$

$$=[\cos(kx)\cos(x)+i\cos(kx)\sin(x)+i\sin(kx)\cos(x)+i^{2}\sin(kx)\sin(x)]$$

$$=[\cos(kx)\cos(x)+i\cos(kx)\sin(x)+i\sin(kx)\cos(x)-\sin(kx)\sin(x)]$$

$$=\color{blue}{[\cos(kx)\cos(x)-\sin(kx)\sin(x)}+i\color{orange}{[\cos(kx)\sin(x)+\sin(kx)\cos(x)]}$$

Apply the trigonometric formula:

$$\cos(x+y)=\cos(x)\cos(y)-\sin(x)\sin(y)$$

$$\sin(x+y)=\sin(x)\cos(y)+\sin(y)\sin(x)$$

We have

$$\color{blue}{cos(kx+x)}+i[\color{orange}{sin(kx+x)}]=\cos[(k+1)x]+i\sin[(k+1)x]$$

$\color{blue}{cos[(kx+1)x]}+i[\color{orange}{sin[(kx+1)x}]]=\cos[(k+1)x]+i\sin[(k+1)x]$ (Q.E.D)

Ramanujan, the "Euler" of 20th century

      The first time I heard of the name Ramanujan was in 2017. At that time, I was wondering on the internet, searching information about i...