# Proving the cosine subtraction identity using complex numbers

I was told that I could prove the cosine addition formula using complex numbers, but I must be missing something, and I was wondering if anyone could offer some insight into where I'm going wrong. Basically right now I have the following:

$$\cos (b) - \cos (a) = 2\cdot \sin (\frac{a+b}{2})\cdot \sin(\frac{a-b}{2})$$ $$\cos (b) - \cos (a) = 2e^{i\frac{a+b}{2} + i\frac{a-b}{2}}$$ $$\cos (b) - \cos (a) = 2e^{ia}$$

Unfortunately that doesn't seem to make any sense if I take either the real or imaginary parts. So I was wondering if there were some extra steps that I've missed ... I'm figuring there must be. All of the internet references I can find for this identity use other trig-identities, not complex numbers, so they unfortunately haven't been much help in this situation (or at least don't seem to offer much help).

Update: Apparently I was confused ... I thought I was being told I could complexify the right-hand side for the proof, when in-fact I needed to use substitution. Thanks @anon for pointing that out :-)

You replaced $\sin\theta$ with $\exp(i\theta)$ for $\theta=(a+b)/2$ and $\theta=(a-b)/2$, but these things are not equal.
From $e^{i\theta}=\cos\theta+i\sin\theta$ we may conclude the actual formulas:
$$\cos\theta = \frac{e^{i\theta}+e^{-i\theta}}{2} \qquad \sin\theta = \frac{e^{i\theta}-e^{-i\theta}}{2}$$