Show that $\frac{\sin x}{\cos 3x}+\frac{\sin 3x}{\cos 9x}+\frac{\sin 9x}{\cos 27x} = \frac{1}{2}\left(\tan 27x-\tan x\right)$ Show that
$$\frac{\sin x}{\cos 3x}+\frac{\sin 3x}{\cos 9x}+\frac{\sin 9x}{\cos 27x} = \frac{1}{2}\left(\tan 27x-\tan x\right)$$

A more general result is in fact true.
$$\sum_{k=0}^{n} \dfrac{\sin\left(3^k x\right)}{\cos\left(3^{k+1} x\right)} = \dfrac{\tan\left(3^{n+1} x\right) - \tan(x)}2 \,\,\,\, (\spadesuit)$$
Take $n=2$ in $(\spadesuit)$, to get what you want.

To prove $(\spadesuit)$, first note that
$$\dfrac{\sin \left(3^k \cdot x \right)}{\cos \left(3^{k+1} \cdot x \right)} = \dfrac{\tan \left( 3^{k+1} \cdot x\right) - \tan \left(3^{k} \cdot x\right)}2 \,\,\,\, (\clubsuit)$$
Now telescopic summation gives you $(\spadesuit)$.

$(\clubsuit)$ is proved by noting the fact that
\begin{align}
\tan \left( 3^{k+1} \cdot x\right) - \tan \left(3^{k} \cdot x\right) & = \dfrac{\sin \left( 3^{k+1} \cdot x\right)}{\cos \left( 3^{k+1} \cdot x\right)} - \dfrac{\sin \left( 3^{k} \cdot x\right)}{\cos \left( 3^{k} \cdot x\right)}\\
& = \dfrac{\sin \left( 3^{k+1} \cdot x\right)\cos \left( 3^{k} \cdot x\right) - \sin \left( 3^{k} \cdot x\right)\cos \left( 3^{k+1} \cdot x\right)}{\cos \left( 3^{k+1} \cdot x\right)\cos \left( 3^{k} \cdot x\right)}\\
& = \dfrac{\sin \left(2 \cdot 3^k \cdot x\right)}{\cos \left( 3^{k+1} \cdot x\right)\cos \left( 3^{k} \cdot x\right)} = \dfrac{2 \sin \left(3^k \cdot x\right) \cos \left(3^k \cdot x\right)}{\cos \left( 3^{k+1} \cdot x\right)\cos \left( 3^{k} \cdot x\right)}\\
& = 2 \cdot \dfrac{\sin \left(3^k \cdot x \right)}{\cos \left(3^{k+1} \cdot x \right)}
\end{align}
