Euler's Formula Question.

Find

$\cos\theta + \cos3\theta + ... + \cos((2n+1)\theta$,

and

$\sin\theta + \sin3\theta + ... + \sin((2n+1)\theta$.

Where $\theta \in$ Reals.

-

At first, $$e^{i\theta}+e^{3i\theta}+\cdots +e^{(2n+1)i\theta}=e^{i\theta}\frac{1-e^{2(n+1)i\theta}}{1-e^{2i\theta}}=\frac{2 (e^{2(n+1)i\theta}-1)}{\sin\theta}$$

for $\sin\theta \neq 0$. And

$$\operatorname{Re }(e^{i\theta}+e^{3i\theta}+\cdots +e^{(2n+1)i\theta}) = \cos\theta+\cos3\theta +\cdots + \cos(2n+1)\theta$$ $$\operatorname{Im }(e^{i\theta}+e^{3i\theta}+\cdots +e^{(2n+1)i\theta}) = \sin\theta+\sin3\theta +\cdots + \sin(2n+1)\theta$$ So

$$\cos\theta+\cos3\theta +\cdots + \cos(2n+1)\theta = \frac{2(\cos 2(n+1)\theta -1)}{\sin\theta}$$

$$\sin\theta+\sin3\theta +\cdots + \sin(2n+1)\theta = \frac{2\sin2(n+1)\theta}{\sin\theta}$$

for $\sin\theta\neq 0$.

-

I'm lazy. I'd rather solve both at once.

$$(\cos \theta + i \sin \theta) + (\cos 3\theta + i \sin 3\theta) + \cdots$$

Then when I get this answer for this sum, I can get the answer for the original sums by splitting into real and imaginary parts!

-