Prove $$2\sum_{k=1}^n{(-1)^{k-1} \cos\frac{k\pi}{2n+1}} = 1$$
I got this question when I was going through some basic trigonometric identities as follows
$2(\cos\frac{\pi}{5}-\cos\frac{2\pi}{5}) =1\tag1$
very much straightforward to recognise
$2(\cos\frac{\pi}{7}-\cos\frac{2\pi}{7} + \cos\frac{3\pi}{7})=1\tag2$
Following steps proves the identity
$8\cos\frac{\pi}{7}\cdot\cos\frac{2\pi}{7}\cdot\cos\frac{4\pi}{7} = -1$
$4\cos\frac{\pi}{7}[2\cos\frac{4\pi}{7}\cdot\cos\frac{2\pi}{7}] = -1$
$4\cos\frac{\pi}{7}[\cos\frac{6\pi}{7}+ \cos\frac{2\pi}{7}] =-1 $
$4\cos\frac{\pi}{7}[\cos\frac{2\pi}{7}-\cos\frac{\pi}{7}] =-1 $
$4\cos\frac{\pi}{7}\cdot\cos\frac{2\pi}{7} - 4\cos^{2}\frac{\pi}{7} = -1$
Further simplification will lead to equality 2
$2(\cos\frac{\pi}{9}-\cos\frac{\pi}{9} + \cos\frac{3\pi}{9}- \cos\frac{4\pi}{9}) = 1$
by using transformation formula we can prove above one also
But when it comes to following equalities
$2(\cos\frac{\pi}{11}-\cos\frac{2\pi}{11} + \cos\frac{3\pi}{11}- \cos\frac{4\pi}{11}+ \cos\frac{5\pi}{11} )= 1$
$2(\cos\frac{\pi}{13}-\cos\frac{2\pi}{13} + \cos\frac{3\pi}{13}- \cos\frac{4\pi}{13}+ \cos\frac{5\pi}{13} -\cos\frac{6\pi}{13} )= 1$
I was able to check the results with brute force in Wolfram|Alpha for above equalities, but not able to get the steps properly even though I tried manually
My question is how to generalise the summation formula and is there any method other than trigonometric approach? $$2\sum_{k=1}^n{(-1)^{k-1} \cos\frac{k\pi}{2n+1}} = 1$$
FullSimplify[ Sum[2*(-1)^(k - 1)*Cos[(k Pi)/(2 n + 1)], {k, 1, n}] == 1, Assumptions -> {n \[Element] PositiveIntegers}]
givesTrue
. – Mariusz Iwaniuk Feb 23 '22 at 16:17