# Expressing Trigonometric Functions Using The Exponential Function
[[Trigonometric Functions]] can be expressed using [[The Exponential Function]] via [[Euler's Formula]].
![[Readwise/Articles/Euler's Formula#^ptfdbg]]
$\sin(\theta) = \frac 1 {2i} \left( e^{i\theta} - e^{-i\theta} \right)$
$\cos(\theta) = \frac 1 2 \left( e^{i\theta} + e^{-i\theta} \right)$
$\tan(\theta) = \frac 1 i \frac {e^{i\theta} - e^{-i\theta}}{e^{i\theta} + e^{-i\theta}}$
^s1jedx
If we then further plug in the series expansion for exp we get:
$\sin(\theta) = \sum_{n=0}^\infty (-1)^n \frac {x^{2n+1}} {(2n+1)!}$
$\cos(\theta) = \sum_{n=0}^\infty (-1)^n \frac {x^{2n}} {(2n)!}$
### Proof for Sine
Into Euler's formula plugin in $\theta$ and $-\theta$ and subtract the two expressions.
$
\begin{align}
e^{i\theta} &= \cos \theta + i\sin \theta \\
e^{-i\theta} &= \cos (-\theta) + i\sin (-\theta) \\
e^{i\theta} - e^{-i\theta} &= \cos \theta + i\sin \theta - \cos (-\theta) -i\sin (-\theta) \\
e^{i\theta} - e^{-i\theta} &= 2i\sin \theta
\end{align}
$
### Proof for Cosine
Into Euler's formula plugin in $\theta$ and $-\theta$ and add the two expressions together.
$
\begin{align}
e^{i\theta} &= \cos \theta + i\sin \theta \\
e^{-i\theta} &= \cos (-\theta) + i\sin (-\theta) \\
e^{i\theta} + e^{-i\theta} &= \cos \theta + \cos (-\theta) + i(\sin \theta + \sin (-\theta)) \\
e^{i\theta} + e^{-i\theta} &= 2\cos \theta
\end{align}
$