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)\cos(a+b)=\cos(a)\cos(b)-\sin(a)\sin(b)

Solution:

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

cos(a+b)\displaystyle\cos(a+b) =(e(a+b)i)\displaystyle=\Re(e^{(a+b)i})
=(eaiebi)\displaystyle=\Re(e^{ai}e^{bi})
=((cos(a)+isin(a))(cos(b)+isin(b)))\displaystyle=\Re((\cos(a)+i\sin(a))(\cos(b)+i\sin(b)))
=(cos(a)cos(b)+icos(a)cos(b)+isin(a)cos(b)+i2sin(a)sin(b))\displaystyle=\Re(\cos(a)\cos(b)+i\cos(a)\cos(b)+i\sin(a)\cos(b)+i^{2}\sin(a)% \sin(b))
=cos(a)cos(b)sin(a)sin(b)\displaystyle=\cos(a)\cos(b)-\sin(a)\sin(b)
Example 14.7.2

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

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

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

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

(cos(3x)+isin(3x))=((cos(x)+isin(x))3)\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

((cos(x)+isin(x))3)=((cos3(x)+3cos2(x)isin(x)+3cos(x)i2sin2(x)+i3sin3(x)))\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

((cos3(x)+3cos2(x)sin(x)i3cos(x)sin2(x)isin3(x)))\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

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

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

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

Thus, we can say that

sin(3x)=3sin(x)4sin3(x)\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(θ)\cos(\theta) and sin(θ)\sin(\theta) in terms of exe^{x}. As eiθ=cos(θ)+isin(θ)e^{i\theta}=\cos(\theta)+i\sin(\theta), and eix=cos(θ)+isin(θ)=cos(θ)isin(θ)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 ee.

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

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

Thus we can say that

cos(x)=eix+eix2\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)\sin(x).

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

Which means that

sin(x)=eixeix2i\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)\cos(x)=\cos(-x) (14.71)

Proof:

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

The sine function is odd, that is

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

Proof:

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