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

If $10x=\pi$
$\sin 2x=\cos 3x$ as $2x+3x=5x=\frac{\pi}{2}$ 
$\implies2\sin x \cos x=4\cos^3x-3\cos x$
$\implies 2\sin x=4\cos^2x-3$ as $\cos x≠0$
If $\sin x=t, 2t=4(1-t^2)-3\implies 4t^2+2t-1=0$
$$\implies t=\frac{-1±\sqrt{5}}{4}$$, but $\sin x>0$ as $0<x<\pi$
$$\sin \frac{\pi}{10}=\frac{\sqrt{5}-1}{4}$$
(1)So, $$\cos \frac{\pi}{10}=\sqrt{1-(\sin \frac{\pi}{10})^2}=\frac{\sqrt{10+2\sqrt5}}{4}$$
So, $$\tan \frac{\pi}{10}=\frac{\frac{\sqrt{5}-1}{4}}{\frac{\sqrt{10+2\sqrt5}}{4}}=\frac{\sqrt{5}-1}{\sqrt{10+2\sqrt5}}=\frac{\sqrt{5}-1}{\sqrt{10+2\sqrt5}}$$
$$=\sqrt{\frac{(\sqrt 5 -1)^2}{10+2\sqrt5}}=\sqrt{\frac{3-\sqrt 5}{\sqrt 5(\sqrt 5+1)}}=\sqrt{\frac{(3-\sqrt 5)(\sqrt 5 -1)}{\sqrt 5(\sqrt 5+1)(\sqrt 5 -1)}}=\sqrt{\frac{\sqrt 5-2}{\sqrt 5}}$$
Or(2) $$\cos \frac{\pi}{5}=1-2(\frac{\sqrt{5}-1}{4})^2=\frac{\sqrt 5 + 1}{4}$$
We know $$\cos2y=\frac{1-\tan^2y}{1+\tan^2y}\implies \tan^2y=\frac{1-\cos2y}{1+\cos2y}$$
So, $$\tan^2 \frac{\pi}{10}= \frac{1-\frac{\sqrt 5 + 1}{4}}{1+\frac{\sqrt 5 + 1}{4}}=\frac{3-\sqrt 5}{\sqrt 5(\sqrt 5+1)}$$ which we have already encountered in (1).
