Find $\cos\frac{\pi}{12}$ given $\sin(\frac{\pi}{12}) = \frac{\sqrt{3} -1}{2 \sqrt{2}}$ 
Find $\cos\frac{\pi}{12}$ given $\sin(\frac{\pi}{12}) = \frac{\sqrt{3} -1}{2 \sqrt{2}}$

From a question I asked before this, I have trouble actually with the numbers manipulating part.
Using trigo identity, $\sin^2 \frac{\pi}{12} + \cos^2 \frac{\pi}{12} = 1$ so , $\cos^2 \frac{\pi}{12} = 1- \sin^2 \frac{\pi}{12}$
To find $\cos \frac{\pi}{12} = \sqrt{1- \sin^2 \frac{\pi}{12}}$
$\sin^2 \frac{\pi}{12} = (\frac{\sqrt{3} -1}{2 \sqrt{2}})^2 = \frac{(\sqrt{3}-1)^2}{(2\sqrt{2})^2} = \frac{2- \sqrt{3}}{4}$
$\cos \frac{\pi}{12} = \sqrt{1-(\frac{\sqrt{3} -1}{2 \sqrt{2}})^2} $
$\cos \frac{\pi}{12} = \sqrt{1- \frac{2-\sqrt{3}}{4}}$
$\cos \frac{\pi}{12} = \frac{\sqrt{2+\sqrt{3}}}{2}$
What is wrong with my steps?

Another way would be to use the double angle formula
$$\sin 2\theta=2\sin\theta\cos\theta$$
With $\theta=\frac {\pi}{12}$, then
$$\sin 2\theta=\sin\frac {\pi}6=\frac 12$$
Thus
\begin{align*}
\cos\frac {\pi}{12} & =\frac {\sin 2\theta}{2\sin\theta}\\
 & =\frac 1{4\sin\theta}\\
 & =\frac 1{\sqrt 2(\sqrt 3-1)}
\end{align*}
Which is numerically equal to the answer you found. To get it into the form Wolfram Alpha produces, multiply the fraction by $\sqrt 3+1$.
