Maths WorkshopMaths problems with full solutions
Exercise 1576Algebra › Complex numbersOlympiadAdded 3 Nov 2026

Sum of cosines

#trigonometric sum#cosines#complex

Statement

Compute ∑k=0n−1cos⁡(kθ)\displaystyle\sum_{k=0}^{n-1}\cos(k\theta) for θ∈R\theta\in\mathbb{R}.

Hint

Take the real part of the geometric series ∑k=0n−1eikθ\sum_{k=0}^{n-1}e^{ik\theta}.

Show solutionHide solution

Solution

Complex sum.
∑k=0n−1eikθ=1−einθ1−eiθ=ei(n−1)θ/2sin⁡(nθ/2)sin⁡(θ/2).\sum_{k=0}^{n-1}e^{ik\theta}=\frac{1-e^{in\theta}}{1-e^{i\theta}}=e^{i(n-1)\theta/2}\frac{\sin(n\theta/2)}{\sin(\theta/2)}.

Real part.
∑k=0n−1cos⁡(kθ)=sin⁡(nθ/2)sin⁡(θ/2)cos⁡((n−1)θ2).\sum_{k=0}^{n-1}\cos(k\theta)=\frac{\sin(n\theta/2)}{\sin(\theta/2)}\cos\left(\frac{(n-1)\theta}{2}\right).

Conclusion. ∑k=0n−1cos⁡(kθ)=sin⁡(nθ/2)sin⁡(θ/2)cos⁡(n−1)θ2\displaystyle\sum_{k=0}^{n-1}\cos(k\theta)=\frac{\sin(n\theta/2)}{\sin(\theta/2)}\cos\frac{(n-1)\theta}{2} (for sin⁡(θ/2)≠0\sin(\theta/2)\neq0).