A trigonometric, non-trivially telescopic sum Evaluate
$$\sum_{k=1}^n\frac{\tan\frac x{2^k}}{2^{k-1} \cos\frac x{2^{k-1}}}$$
I am struck with calculation for this question
Though i was provided the following hint from this forum and i circulated this question to my friends nobody were able to solve it. Do please help me after this hint
Hint:$$2\cot (2x)=\cot x-\tan x\\ \to \tan x=2\cot (2x)-\cot x$$so 
$$\frac{\tan\frac x{2^k}}{2^{k-1} \cos\frac x{2^{k-1}}}=\\
\frac{2\cot (2\frac x{2^k})-\cot \frac x{2^k}}{2^{k-1} \cos\frac x{2^{k-1}}}$$
 A: I will solve this question by reverse engineering. The purpose of the following lines is to produce a trigonometric sum which is telescopic but in a non-trivial way, like $\sum_{n\geq 1}\arctan\left(\frac{1}{2n^2}\right)$. Let us see: we may take the function $f(z)=\frac{z}{\sin z}$ and rearrange the expression $f(2z)-f(z)$ through the duplication formulas for the sine function.
$$ f(2z)-f(z) = \frac{2z}{2\sin z\cos z}-\frac{z}{\sin z} = \frac{z\cdot\frac{1-\cos z}{\sin z}}{\cos z}=z\cdot\frac{\tan\frac{z}{2}}{\cos z}$$
holds for any $z\in(-\pi/2,\pi/2)$. With such assumption, if in the above line I replace $z$ with $\frac{z}{2^{k-1}}$ I get:
$$ f\left(\frac{z}{2^{k-2}}\right)-f\left(\frac{z}{2^{k-1}}\right)=z\cdot\frac{\tan\frac{z}{2^k}}{2^{k-1}\cos\frac{z}{2^{k-1}}}$$
and the LHS is telescopic. Since $\lim_{z\to 0}f(z)=1$, by summing both sides on $k\geq 1$ I get:
$$f(2z)-1 = z\sum_{k\geq 1}\frac{\tan\frac{z}{2^k}}{2^{k-1}\cos\frac{z}{2^{k-1}}}$$
from which:
$$\forall z\in(-\pi/2,\pi/2),\qquad \sum_{k\geq 1}\frac{\tan\frac{z}{2^k}}{2^{k-1}\cos\frac{z}{2^{k-1}}} =\frac{1}{\sin z\cos z}-\frac{1}{z}.$$
The partial sums of this series also have a nice closed form, by construction.
Perfect, I am ready to propose this exercise to my students and see them suffer.
