<s>[INST] $\frac{\tan8°}{1-3\tan^2 8°}+\frac{3\tan24°}{1-3\tan^2 24°} + \frac{9\tan72°}{1-3\tan^2 72°} + \frac{27\tan216°}{1-3\tan^2 216°}=x\tan108°+y\tan8°$ $$\frac {\tan 8°}{1-3\tan^2 8°}+\frac {3\tan 24°}{1-3\tan^2 24°} + \frac{9\tan 72°}{1-3\tan^2 72°} + \frac{27\tan 216°}{1-3\tan^2 216°} =x\tan108°+y\tan8° .$$
Find the value of $x$ and $y$.
I tried different approaches like using $$ \tan 3x=\frac{3\tan x-\tan^3 x}{1-3\tan^2 x}$$
and converting into $\sin$ and $\cos$, but I was unable to simplify.
Can anybody help?
 [/INST] Hint
$$f(p)=\dfrac{\tan p}{1-3\tan^2p}+z\tan p=\dfrac{(1+z)\tan p-3z\tan^3p}{1-3\tan^2p}$$
Now comparing with $\tan3p=?$ formula,
we need $$\dfrac{1+z}{3z}=\dfrac31 \iff z=\dfrac18$$
$$\implies f(p)=\dfrac{3\tan3p}8$$
Put $p=8,24,72,216^\circ$ to find the LHS to be
$$-\dfrac{\tan8^\circ}8+\dfrac{3^4\tan648^\circ}8$$
Finally $648\equiv108\pmod{180}$
</s>