I recently saw the following (Proving $\sum\limits_{k=0}^{n}\cos(kx)=\frac{1}{2}+\frac{\sin(\frac{2n+1}{2}x)}{2\sin(x/2)}$), and I saw that they said the following is true.
$$\sum_{k=0}^{n} Re(\cos(kx))=\sum_{k=0}^{n} Re(\cos(x)^k)$$
At the moment I believe this to be false, I tried a small case with, $n=2$ and $x=pi/4$. Which gives $$\sum_{k=0}^{2} Re(\cos(k\frac{\pi}{4}))=\sum_{k=0}^{2} Re(\cos(\frac{\pi}{4})^k),$$ and this is not true.
The most I could show was, $\cos(kx)=Re((\cos(x)+i\sin(x))^k)$.
Could any one show me why the person said the first equation is true?