Home » Blog » Prove a formula for the sum from k=1 to n of cos kx

Prove a formula for the sum from k=1 to n of cos kx

Given the identity

    \[ 2 \sin \left( \frac{x}{2} \right) \cos (kx) = \sin \left((2k+1)\frac{x}{2}\right) - \sin \left((2k-1) \frac{x}{2}\right) \]

prove

    \[ \sum_{k=1}^n \cos kx = \frac{\sin \frac{nx}{2} \cos \frac{(n+1)x}{2}}{\sin \frac{x}{2}} \]

for x \neq 2m \pi, \ \ m \in \mathbb{Z}.


Proof. Starting with the given identity we sum over k,

    \begin{align*}    &&2 \sin \frac{x}{2} \cos kx &= \sin \left( (2k+1) \frac{x}{2} \right) - \sin \left( (2k-1) \frac{x}{2} \right) \\ \implies && 2 \sin \frac{x}{2} \sum_{k=1}^n \cos kx &= \sum_{k=1}^n \left( \sin \left( (2k+1) \frac{x}{2} \right) \\ \implies && 2 \sin \frac{x}{2} \sum_{k=1}^n \cos kx &= \sin \left( (2n+1) \frac{x}{2} \right) - \sin \frac{x}{2} & (\text{telescoping property}) \\ \implies && \sum_{k=1}^n \cos kx &= \frac{\sin \left((2n+1)\frac{x}{2} \right) - \sin \frac{x}{2}}{2 \sin \frac{x}{2}} \\  &&&= \frac{\sin (nx) \cos \frac{x}{2} + \sin \frac{x}{2} \cos (nx) - \sin \frac{x}{2} }{2 \sin \frac{x}{2} } \\  &&&= \frac{ \sin (nx) \cos \frac{x}{2} + \sin \frac{x}{2} (\cos (nx)- 1)}{ 2 \sin \frac{x}{2} } \\  &&&= \frac{2 \sin \frac{nx}{2} \cos \frac{nx}{2} \cos \frac{x}{2} + (-2) \sin \frac{x}{2} \sin^2 \frac{nx}{2}}{ 2 \sin \frac{x}{2}} \\  &&&= \frac{\sin \frac{nx}{2} \left( \cos \frac{nx}{2} \cos \frac{x}{2} - \sin \frac{x}{2} \sin \frac{nx}{2} \right)}{ \sin \frac{x}{2} } \\  &&&= \frac{\sin \frac{nx}{2} \cos \frac{(n+1)x}{2}}{\sin \frac{x}{2}}. \qquad \blacksquare \end{align*}

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):