Show that $\tan {\pi \over 8} = \sqrt 2 - 1$ Show that  $\tan {\pi  \over 8} = \sqrt 2  - 1$, using the identity $\tan 2\theta  = {{2\tan \theta } \over {1 - {{\tan }^2}\theta }}$

Using $\tan 2\theta  = {{2\tan \theta } \over {1 - {{\tan }^2}\theta }}$ with $\theta  = {\pi  \over {16}}$:
$\eqalign{
  & \tan {\pi  \over 8} = {{2\tan {\pi  \over {16}}} \over {1 - {{\tan }^2}{\pi  \over {16}}}}  \cr 
  & \tan {\pi  \over 8} = 0.41421.... \cr} $
I essentially get an answer equivalent to $\sqrt 2  - 1$ but not an "exact" answer, how do I go about this question to get a result in "exact" form?
Thank you.
 A: We have $\tan(2 \theta) = \dfrac{2 \tan(\theta)}{1-\tan^2(\theta)}$. Take $\theta = \dfrac{\pi}8$ and let $t = \tan(\pi/8)$. We then get
$$\tan(\pi/4) = \dfrac{2 \tan(\pi/8)}{1-\tan^2(\pi/8)} = \dfrac{2t}{1-t^2}$$
Hence, we get
$$1-t^2 = 2t \implies (t+1)^2 = 2 \implies t = -1 \pm \sqrt2$$Since $t > 0$, we get that $\tan(\pi/8) = \sqrt2-1$
A: You're going about this the wrong way; instead, set $\theta = \frac{\pi}{8}$. You get:
$$\tan \frac{\pi}{4} = 1 = \frac{2\tan \frac{\pi}{8}}{1-\tan^2 \frac{\pi}{8}}$$
Multiply through by $1-\tan^2 \frac{\pi}{8}$ and solve the resulting quadratic equation.
If it helps simplify notation, substitute $t=\tan^2 \frac{\pi}{8}$. The equation has two roots, one positive and one negative, so you'll need to give reasoning about which to pick.
A: An identity that is useful when considering the stereographic projection and the half-tangent integration substitution:
$$
\tan(x/2)=\frac{\sin(x)}{1+\cos(x)}
$$
We know that $\sin(\pi/4)=\cos(\pi/4)=1/\sqrt2$. Therefore,
$$
\begin{align}
\tan(\pi/8)
&=\frac{1/\sqrt2}{1+1/\sqrt2}\frac{1-1/\sqrt2}{1-1/\sqrt2}\\
&=\sqrt{2}-1
\end{align}
$$
A: $$\sqrt2-1=\csc\dfrac\pi4-\cot\dfrac\pi4=\dfrac{1-\cos\dfrac\pi4}{\sin\dfrac\pi4}=\dfrac{2\sin^2\dfrac\pi8}{2\sin\dfrac\pi8\cos\dfrac\pi8}=?$$  using $\sin2A=2\sin A\cos A,\cos2B=1-2\sin^2B$
