TITLE: Simplifying $\sum 2^k \tan(2^k x)$
QUESTION [5 upvotes]: Simplify $\sum\limits_{k = 0}^n {{2^k}\tan ({2^k}x)}$ which $k \in \{ 0,1,...,n + 1\} ,{2^k}x \notin \{ 0,\frac{\pi }{2}\}$

REPLY [11 votes]: Hint: $\ln(\cos(x))'=\tan(x)$ and Recursion.
Alternative route: Use the identity $\cot(x) - 2\cot(2x)=\tan(x)$ and telescoping.