= Solution
Put $q=e^{i\theta}$. Since $q\ne1$, the <finite geometric series> gives
$$
\sum_{m=1}^N q^m=\frac{q(1-q^N)}{1-q}=\frac{q-1-q^{N+1}+q^N}{2(1-\cos\theta)},
$$
where the second equality multiplies numerator and denominator by $1-\overline q$. Taking imaginary parts gives the <finite trigonometric sum>
$$
\boxed{\sum_{m=1}^N\sin(m\theta)=\frac{\sin\theta+\sin(N\theta)-\sin((N+1)\theta)}{2(1-\cos\theta)}.}
$$
Taking real parts of the same <finite geometric series> gives
$$
\boxed{\sum_{m=1}^N\cos(m\theta)=\frac{\cos\theta-1+\cos(N\theta)-\cos((N+1)\theta)}{2(1-\cos\theta)}.}
$$
The denominator is nonzero by the restriction on $\theta$. Equivalently, these <finite trigonometric sums> are $\sin(N\theta/2)\sin((N+1)\theta/2)/\sin(\theta/2)$ and $\sin(N\theta/2)\cos((N+1)\theta/2)/\sin(\theta/2)$, respectively.
Back to article page