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)+i⁢sin⁡(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})
=ℜ⁡(ea⁢i⁢eb⁢i)\displaystyle=\Re(e^{ai}e^{bi})
=ℜ⁡((cos⁡(a)+i⁢sin⁡(a))⁢(cos⁡(b)+i⁢sin⁡(b)))\displaystyle=\Re((\cos(a)+i\sin(a))(\cos(b)+i\sin(b)))
=ℜ⁡(cos⁡(a)⁢cos⁡(b)+i⁢cos⁡(a)⁢cos⁡(b)+i⁢sin⁡(a)⁢cos⁡(b)+i2⁢sin⁡(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⁡(3⁢x)\sin(3x) in terms of sin⁡(x)\sin(x).

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

sin⁡(3⁢x)=ℑ⁡(cos⁡(3⁢x)+i⁢sin⁡(3⁢x))\sin(3x)=\Im(\cos(3x)+i\sin(3x)) (14.57)

We can then apply De Moivre’s theorem55 5 cos⁡(n⁢x)+i⁢sin⁡(n⁢x)=(cos⁡(x)+i⁢sin⁡(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⁡(3⁢x)+i⁢sin⁡(3⁢x))=ℑ⁡((cos⁡(x)+i⁢sin⁡(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)+i⁢sin⁡(x))3)=ℑ⁡((cos3⁡(x)+3⁢cos2⁡(x)⁢i⁢sin⁡(x)+3⁢cos⁡(x)⁢i2⁢sin2⁡(x)+i3⁢sin3⁡(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)+3⁢cos2⁡(x)⁢sin⁡(x)⁢i−3⁢cos⁡(x)⁢sin2⁡(x)−i⁢sin3⁡(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

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

We want sin⁡(3⁢x)\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⁢(1−sin2⁡(x))⁢sin⁡(x)−sin3⁡(x)\displaystyle 3(1-\sin^{2}(x))\sin(x)-\sin^{3}(x) =3⁢sin⁡(x)−3⁢sin3⁡(x)−sin3⁡(x)\displaystyle=3\sin(x)-3\sin^{3}(x)-\sin^{3}(x) (14.62)
=3⁢sin⁡(x)−4⁢sin3⁡(x)\displaystyle=3\sin(x)-4\sin^{3}(x) (14.63)

Thus, we can say that

sin⁡(3⁢x)=3⁢sin⁡(x)−4⁢sin3⁡(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⁡(θ)+i⁢sin⁡(θ)e^{i\theta}=\cos(\theta)+i\sin(\theta), and e−i⁢x=cos⁡(−θ)+i⁢sin⁡(−θ)=cos⁡(θ)−i⁢sin⁡(θ)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 ei⁢xe^{ix} and e−i⁢xe^{-ix}.

ei⁢x+e−i⁢x\displaystyle e^{ix}+e^{-ix} =cos⁡(θ)−i⁢sin⁡(θ)+cos⁡(θ)+i⁢sin⁡(θ)\displaystyle=\cos(\theta)-i\sin(\theta)+\cos(\theta)+i\sin(\theta) (14.65)
=2⁢cos⁡(θ)\displaystyle=2\cos(\theta) (14.66)

Thus we can say that

cos⁡(x)=ei⁢x+e−i⁢x2\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).

ei⁢x−e−i⁢x\displaystyle e^{ix}-e^{-ix} =cos⁡(θ)−i⁢sin⁡(θ)−(cos⁡(θ)+i⁢sin⁡(θ))\displaystyle=\cos(\theta)-i\sin(\theta)-(\cos(\theta)+i\sin(\theta)) (14.68)
=−2⁢i⁢sin⁡(θ)\displaystyle=-2i\sin(\theta) (14.69)

Which means that

sin⁡(x)=ei⁢x−e−i⁢x−2⁢i\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) =ei⁢x+e−i⁢x2\displaystyle=\frac{e^{ix}+e^{-ix}}{2} (14.72)
=e−i⁢x+ei⁢x2\displaystyle=\frac{e^{-ix}+e^{ix}}{2} As addition is commutative (14.73)
=ei⁢(−x)+e−i⁢(−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) =ei⁢x−e−i⁢x−2⁢i\displaystyle=\frac{e^{ix}-e^{-ix}}{-2i} (14.77)
=−(e−i⁢x−ei⁢x−2⁢i)\displaystyle=-\left(\frac{e^{-ix}-e^{ix}}{-2i}\right) (14.78)
=−(ei⁢(−x)−e−i⁢(−x)−2⁢i)\displaystyle=-\left(\frac{e^{i(-x)}-e^{-i(-x)}}{-2i}\right) (14.79)
=−sin⁡(−x)\displaystyle=-\sin(-x) (14.80)