how to calculate the exact value of $\tan \frac{\pi}{10}$ I have an extra homework: to calculate the exact value of $ \tan \frac{\pi}{10}$. 
From WolframAlpha calculator I know that it's $\sqrt{1-\frac{2}{\sqrt{5}}} $, but i have no idea how to calculate that.
Thank you in advance,
Greg

Let $\theta=\frac\pi{10}$ and $\tan\theta=x$. Then $5\theta=\frac\pi2$ so
\begin{align}
\tan4\theta&=\frac1x\tag{1}
\end{align}
By twice using the double-angle tan formula,
\begin{align*}
\tan2\theta&=\frac{2x}{1-x^2}\\
\tan4\theta&=\frac{2(\frac{2x}{1-x^2})}{1-(\frac{2x}{1-x^2})^2}\\
\frac1x&=\frac{4x(1-x^2)}{(1-x^2)^2-(2x)^2}\tag{by (1)}\\
(1-x^2)^2-4x^2&=x\times4x(1-x^2)\\
1-2x^2+x^4-4x^2&=4x^2-4x^4\\
5x^4-10x^2+1&=0\\
\implies x^2&=\frac{10\pm\sqrt{10^2-4\times5}}{2\times5}\\
&=1-\frac{\sqrt{5^2-5}}5\\
&=1-\frac{\sqrt{5-1}\sqrt5}5\\
&=1-\frac2{\sqrt5}\\
\implies x&=\sqrt{1-\frac2{\sqrt5}}
\end{align*}
signs being chosen because $0<x<1$ because $0<\theta<45^\circ$.
