<s>[INST] 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?
 [/INST] You can also use $$\cos(x)+\sin(x)=\sqrt{2}\sin(x+\frac{\pi}4)$$
In this instance with $x=\frac{\pi}{12}$ you get to calculate $\sin(\frac{\pi}3)$ which is known.
The advantage is that you don't get nested root, nor have to rationalize $\sqrt{3}-1$ on denominator, just fraction addition.
</s>