Trigonometric identity of finite terms Prove that:
$$\dfrac{1}{\cos x+\cos {3x}} + \dfrac{1}{\cos x+ \cos {5x}}+\dots+\dfrac{1}{\cos x+ \cos {(2n+1)x}}  \\= \frac{1}{2}\csc x \,[ \tan{(n+1)x}-\tan{x}]$$
I tried to prove this using the regular formulas. But failed. Please help me.
 A: In the case $n=0$ there is no summand on the left-hand side and the right-hand side is $0$, so the base case of the induction holds.
Suppose it holds for $n-1$; then the left-hand side with $n$ can be written, by the induction hypothesis,
$$
\frac{1}{2\sin x}\bigl(\tan nx-\tan x\bigr)+\frac{1}{\cos x+\cos(2n+1)x}
$$
and you want to prove this equals
$$
\frac{1}{2\sin x}\bigl(\tan(n+1)x-\tan x\bigr)
$$
which is equivalent to
$$
\frac{\tan nx}{2\sin x}+\frac{1}{\cos x+\cos(2n+1)x}=
\frac{\tan(n+1)x}{2\sin x}
$$
By the sum-to-product formulas, this becomes
$$
\frac{\sin nx}{2\sin x\cos nx}+\frac{1}{2\cos nx\cos(n+1)x}=
\frac{\sin(n+1)x}{2\sin x\cos(n+1)x}
$$
Reduce to the same denominator and conclude the equality holds.

The relation $$\sin nx\cos(n+1)x+\sin x=\sin(n+1)x\cos nx$$ is true, because it is equivalent to $$\sin x=\sin(n+1)x\cos nx-\cos(n+1)x\sin nx$$

A: $$\sum_{k=1}^n\frac{1}{\cos{x}+\cos(2k+1)x}=\sum_{k=1}^n\frac{1}{2\cos{kx}\cos(k+1)x}=$$
$$=\frac{1}{2\sin{x}}\sum_{k=1}^n\left(\tan(k+1)x-\tan kx\right)=\frac{1}{2\sin{x}}\left(\tan(n+1)x-\tan x\right)$$
and we are done!
I used the following reasoning.
$$\tan\alpha-\tan\beta=\frac{\sin\alpha}{\cos\alpha}-\frac{\sin\beta}{\cos\beta}=\frac{\sin\alpha\cos\beta-\cos\alpha\sin\beta}{\cos\alpha\cos\beta}=\frac{\sin(\alpha-\beta)}{\cos\alpha\cos\beta}.$$
