$\textbf{Question :}$ Prove that $$\sum_{j=1}^{n} (-1)^{j-1}\cos\left(\frac{j\pi}{2n+1}\right)=\frac{1}{2}$$
$\textbf{My Attempt :}$
Let $n$ be odd (will do even case later) then the series can be written as
$$S = \sum_{j=1}^{(n+1)/2}\cos((2j-1)x) - \sum_{j=1}^{(n-1)/2} \cos(2jx)$$
where $x = \frac{\pi}{2n+1}$
Now as both the cosine series are just arithmetic progressions in their angles with the common difference of $2x$, we can simplify $S$ as follows :
$$S = \frac{1}{\sin x}(\sin((n+3)x)\cos((n+2)x)-\sin((n+1)x)\cos(nx))$$
As $2\sin a\cos b = \sin(a+b)+\sin(a-b)$
$$S = \frac{1}{2\sin x}(\sin(2n+5)x)-\sin((2n+1)x)$$
Again as $\sin c -\sin d = 2\sin((c+d)/2)\cos((c-d)/2)$
$$S = \frac{1}{2 \sin x} (2\sin 2x \cos((2n+3)x))$$
$$S = \cos x \cos ((2n+3)x)$$ Now this is where I am getting stuck, I can't get it equal to any constant...