A proof by induction and trigonometry Do you know how to prove that $\displaystyle\cos\left(\frac{x}{2}\right) + \cos\left(\frac{3x}{2}\right)+\cdots + \cos\left(\frac{(2n-1)x}{2}\right) = \frac{\sin nx}{2\sin\left(\frac x 2\right)}$ using induction?

I have tried with $n = 1$ which gives $\cos \frac{x}{2} = \frac{\sin(nx)}{(2\sin1/2x)}$ 
I am not sure on how to expand with the trigonometric formulas.
With $n= p+1$ I get LHS: $\cos(2(n+1)-1)$ which I summaries to $\cos(2n+1)$ which should be $\cos 2n \cos 1-\sin 2n \sin1$ plus the RHS $\frac{\sin(nx)}{(2\sin 1/2x)}$
RHS $p+ 1 = \frac{\sin(n+1x)}{(2\sin 1/2x)}$
Any ideas on how to proceed would be very helpful.
 A: If $$\sum_{r=1}^n\cos\dfrac{(2r-1)}2x=\dfrac{\sin nx}{2\sin\dfrac x2}$$ holds true for $n=m$
$$\sum_{r=1}^{m+1}\cos\dfrac{(2r-1)}2=\dfrac{\sin mx}{2\sin\dfrac x2}+\cos\dfrac{[2(m+1)-1]}2x$$
$$=\dfrac{\sin mx+2\sin\dfrac x2\cos\dfrac{(2m+1)}2x}{2\sin\dfrac x2}$$
Using Werner's formula, $2\sin\dfrac x2\cos\dfrac{(2m+1)}2x=\sin(m+1)x-\sin mx$
A: I see this is quite an old question but here is a solution that assumes only basic high school compound angle formulas:
If we assume that $\displaystyle\sum_{k=1}^n \cos\left(\frac{(2k-1)x}{2}\right)=\frac{\sin(nx)}{2\sin\left(\frac x 2\right)}$ then it follows that:
$$\begin{align}
\sum_{k=1}^n \cos\left(\frac{(2k-1)x}{2}\right)+\cos\left(\frac{(2n+1}{2}\right)&=\frac{\sin(nx)}{2\sin\left(\frac x 2\right)}+\cos\left(\frac{(2n+1)x}{2}\right)\\
\sum_{k=1}^{n+1} \cos\left(\frac{(2k-1)x}{2}\right)&=\frac{\sin nx + 2\sin\left(\frac x 2\right)\cos\left(nx+\frac x 2\right)}{2\sin\left(\frac x 2\right)}\\
&=\frac{\sin nx + 2\sin\left(\frac x 2\right)\left[\cos nx\cos\left(\frac x 2\right)-\sin nx\sin\left(\frac x 2\right)\right]}{2\sin\left(\frac x 2\right)}\\
&=\frac{\sin nx \left[1-2\sin^2\left(\frac x 2\right)\right]+2\sin\left(\frac x 2\right)\cos\left(\frac x 2\right)\cos nx}{2\sin\left(\frac x 2\right)}\\
&=\frac{\sin nx\cos x+\sin x\cos nx}{2\sin\left(\frac x 2\right)}\\
&=\frac{\sin(nx+x)}{2\sin\left(\frac x 2\right)}=\frac{\sin\left((n+1)x\right)}{2\sin\left(\frac x 2\right)}
\end{align}$$
