# 14.7 Cool stuff with trigonometry

## 14.7.1 Proving identities

###### Example 14.7.1

Show that

$\cos(a+b)=\cos(a)\cos(b)-\sin(a)\sin(b)$

Solution:

We can write $\cos(a+b)$ as the real part of $e^{(a+b)i}$. This because $\cos(a+b)$ is equal to the real part of $\cos(a+b)+i\sin(a+b)$, which is equal to $e^{(a+b)i}$.

###### Example 14.7.2

Express $\sin(3x)$ in terms of $\sin(x)$.

Solution: Firstly, we can write $\sin(3x)$ as the equation

$\sin(3x)=\Im(\cos(3x)+i\sin(3x))$ (14.57)

We can then apply De Moivre’s theorem55 5 $\cos(nx)+i\sin(nx)=(\cos(x)+i\sin(x))^{n}$ to rewrite the expression in terms of $\sin(x)$ and $\cos(x)$

$\Im(\cos(3x)+i\sin(3x))=\Im((\cos(x)+i\sin(x))^{3})$ (14.58)

We can now expand the binomial obtained, which leads to the result that

$\Im((\cos(x)+i\sin(x))^{3})=\Im((\cos^{3}(x)+3\cos^{2}(x)i\sin(x)+3\cos(x)i^{2% }\sin^{2}(x)+i^{3}\sin^{3}(x)))$ (14.59)

Then, we can tidy this up a bit, leading to the expression

$\Im((\cos^{3}(x)+3\cos^{2}(x)\sin(x)i-3\cos(x)\sin^{2}(x)-i\sin^{3}(x)))$ (14.60)

We are only interested in the imaginary parts of the expansion, so it is therefore equal to just

$3\cos^{2}(x)\sin(x)-\sin^{3}(x)$ (14.61)

We want $\sin(3x)$ in terms of $\sin(x)$, however! There’s a rogue gatecrasher 66 6 A handy way to remember whether $\cos(x)$ or $\sin(x)$ shows a certain property is (as previously mentioned, TODO: mention) that $\sin(x)$ generally behaves ”better” than $\cos(x)$. in the previous expression - the $\cos(x)$! Fortunately we can remove the $\cos^{2}(x)$ without too much difficulty using the Pythagorean identity.

 $\displaystyle 3(1-\sin^{2}(x))\sin(x)-\sin^{3}(x)$ $\displaystyle=3\sin(x)-3\sin^{3}(x)-\sin^{3}(x)$ (14.62) $\displaystyle=3\sin(x)-4\sin^{3}(x)$ (14.63)

Thus, we can say that

$\sin(3x)=3\sin(x)-4\sin^{3}(x)$ (14.64)

## 14.7.2 Writing complex numbers in terms of the exponential function

Using Euler’s formula, it is possible to write both $\cos(\theta)$ and $\sin(\theta)$ in terms of $e^{x}$. As $e^{i\theta}=\cos(\theta)+i\sin(\theta)$, and $e^{-ix}=\cos(-\theta)+i\sin(-\theta)=\cos(\theta)-i\sin(\theta)$ we can either add or subtract these two quantities in order to write both trigonometric functions in terms of $e$.

For $\cos(x)$, we can add $e^{ix}$ and $e^{-ix}$.

 $\displaystyle e^{ix}+e^{-ix}$ $\displaystyle=\cos(\theta)-i\sin(\theta)+\cos(\theta)+i\sin(\theta)$ (14.65) $\displaystyle=2\cos(\theta)$ (14.66)

Thus we can say that

$\cos(x)=\frac{e^{ix}+e^{-ix}}{2}$ (14.67)

for all values of x. 77 7 Which looks remarkably like a hyperbolic function!.

We can do a similar thing for $\sin(x)$.

 $\displaystyle e^{ix}-e^{-ix}$ $\displaystyle=\cos(\theta)-i\sin(\theta)-(\cos(\theta)+i\sin(\theta))$ (14.68) $\displaystyle=-2i\sin(\theta)$ (14.69)

Which means that

$\sin(x)=\frac{e^{ix}-e^{-ix}}{-2i}$ (14.70)

## 14.7.3 Using the exponential form to show odd/evenness

###### Theorem 14.7.1

The cosine function is even, that is

$\cos(x)=\cos(-x)$ (14.71)

Proof:

 $\displaystyle\cos(x)$ $\displaystyle=\frac{e^{ix}+e^{-ix}}{2}$ (14.72) $\displaystyle=\frac{e^{-ix}+e^{ix}}{2}$ As addition is commutative (14.73) $\displaystyle=\frac{e^{i(-x)}+e^{-i(-x)}}{2}$ (14.74) $\displaystyle=\cos(-x)$ (14.75)
###### Theorem 14.7.2

The sine function is odd, that is

$\sin(x)=-\sin(-x)$ (14.76)

Proof:

 $\displaystyle\sin(x)$ $\displaystyle=\frac{e^{ix}-e^{-ix}}{-2i}$ (14.77) $\displaystyle=-\left(\frac{e^{-ix}-e^{ix}}{-2i}\right)$ (14.78) $\displaystyle=-\left(\frac{e^{i(-x)}-e^{-i(-x)}}{-2i}\right)$ (14.79) $\displaystyle=-\sin(-x)$ (14.80)