How to compute the sum of $\cot^2\left(\frac{\pi}{9}\right)+\cot^2\left(\frac{2\pi}{9}\right)+\cot^2\left(\frac{4\pi}{9}\right)=~?$
The answer is $9$.
I tried to use the formula $\cot (2\theta)=\dfrac{\cot^2\theta-1}{2\cot\theta}$ but it is getting more and more complicated.