I was asked to find the sum of $$\sum_{r=1}^n \dfrac{\tan \dfrac{x}{2^r}}{2^{r-1}\cos\dfrac{x}{2^{r-1}}}$$
I proceeded by breaking $\tan x$ into $\sin x$ and $\cos x$ and writing numerator as follows $$\sin\left(\frac{x}{2^{r-1}}-\frac{x}{2^r} \right)$$ then by opening brackets and simplifying I got $$\frac{1}{2^{r-1}}\left(\tan\frac{x}{2^{r-1}}-\tan\frac{x}{2^r}\right)$$ But I couldn't proceed from here.
Any help will be appreciated