It is much more satisfying to give an geometrical derivation of this sum.
Take points $A_0, A_1, A_3,.....,A_{n+1}$ be points such that $A_1$ lies on the $x$ axis and $OA_1=A_1A_2=.....=A_nA_{n+1}=1$ where $O$ is the origin.
And $A_iA_{i+1}$ makes angle $ix$ with the horizontal axis.
So, the horizontal distance of $A_{n+1}$ from $O$ is
$\sum_{k=0}^{n} x_k=\sum_{k=0}^{n} \text{cos}(kx)$.
How can we find this?
Let, $Q$ be a point from which all $A_i$ and $O$ are equidistant.
Now, $\angle{A_2A_1O}=\pi-x \rightarrow \angle{OQA_1}=x$
So, $\angle{OQA_{n+1}}=(n+1)x$
Now, from the isosceles triangle $\Delta OQA_1$ we get $\rho=OQ=\frac{1}{2}\text{cosec}{\frac{x}{2}}$
Then $s=OA_{n+1}=2\rho \text{sin}(\frac{(n+1)x}{2}) =\frac{\text{sin}(\frac{(n+1)x}{2})}{\text{sin}(\frac{x}{2})}$.
Also we can find $\angle{A_{n+1}OX} =\frac{(\pi-x)}{2}-\frac{(\pi-(n+1)x)}{2}=\frac{nx}{2}$
So, the horizontal distance between $O$ and $A_{n+1}$ is $s=\text{cos}(\angle{A_{n+1}OX})= \text{cos}(\frac{nx}{2})\frac{\text{sin}(\frac{(n+1)x}{2})}{\text{sin}(\frac{x}{2})} $