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?

Let $$\sqrt{2+\sqrt{3}}=\sqrt{x}+\sqrt{y}\implies x+y=2. xy=3/4 \implies x=3/2, y=1/2.$$
So $$\cos(\pi/12)=\frac{\sqrt{3}+1}{2\sqrt{2}}$$
OP is  right.
