Sequences and Series – Using Euler’s Formula to Prove Cosine Sum

complex numberscomplex-analysissequences-and-seriestrigonometry

there is this question in my assignment that i'm struggling to do, it says:

Using Euler's formula, prove that:
$$\cos(2\theta)+\cos(4\theta)+\cdots+\cos(2n\theta)=\frac{\sin(n\theta)}{\sin(\theta)}\cos((n+1)\theta)$$

I was unable to get anywhere with expanding the LHS, so i have attempted to arrive at the LHS starting from the RHS, and this is what i have got to so far:
$$\sin(\theta)=\frac{e^{i\theta}-e^{-i\theta}}{2i}$$
$$\sin(n\theta)=\frac{e^{in\theta}-e^{-in\theta}}{2i}$$
$$\cos((n+1)\theta)=\frac{e^{i(n+1)\theta}+e^{-i(n+1)\theta}}{2}$$
and by multiplying the last two, then dividing by the second one, i arrived at:
$$\frac{1}{2}(\frac{e^{i(2n+1)\theta}-e^{-i(2n+1)\theta}}{e^{i\theta}-e^{-i\theta}}-1)$$
and i am struggling to move any further than this, i assume there's an easier way to do this by starting from the LHS instead, but i couldn't figure it out.

Best Answer

By Euler formula $$ \begin{aligned} \sum_{k=1}^n \cos (2 k \theta)&=\sum_{k=1}^n \frac{e^{2 k \theta i}+e^{-2 k \theta i}}{2} \\ & =\frac{1}{2}\left[\sum_{k=1}^n e^{2 k \theta i}+\sum_{k=1}^n e^{-2 k \theta i}\right] \\ & =\frac{1}{2}\left[\frac{e^{2 \theta i}\left(e^{2 n \theta i}-1\right)}{e^{2 \theta i}-1}+\frac{e^{-2 \theta i}\left(e^{-2 n \theta i}-1\right)}{e^{-2 \theta i}-1}\right] \\ &= \frac{1}{2}\left[\frac{e^{(2 n+1) \theta i}-e^{\theta i}}{e^{\theta i}-e^{-\theta i}}-\frac{e^{-(2 n+1) \theta i}-e^{-\theta i}}{e^{\theta i}-e^{-\theta i}}\right]\\&= \frac{1}{2\left(e^{\theta i}-e^{-\theta i}\right)}\left[(e^{(2 n+1) \theta i}-e^{-(2 n+1) \theta i})-\left(e^{\theta i}-e^{-\theta i}\right)\right]\\&=\frac{1}{4 i \sin \theta}[2 i \sin (2 n+1) \theta-2 i \sin \theta]\\&= \frac{cos(n+1) \theta \sin (n \theta)}{\sin \theta} \end{aligned} $$