<s>[INST] Are both values of cos15° that I obtained equal and if yes, why do I get such different-looking values? I found the value of $\cos{15}^\circ$ using 2 methods.
Method 1: using $\cos{(a-b)} = \cos{a}\cos{b}+\sin{a}\sin{b}$
$\cos{(45-30)^\circ} = \cos{45^\circ}\cos{30^\circ}+\sin{45^\circ}\sin{30^\circ}$
$\cos{15^\circ} = \frac{1}{\sqrt{2}}\frac{\sqrt{3}}{2}+\frac{1}{\sqrt{2}}\frac{1}{2}$
$\cos{15^\circ} = \frac{\sqrt{3}+1}{2\sqrt{2}}$
Method 2: using $\cos{2\alpha} = 2\cos^2{\alpha}-1$
$\cos{(2_\dot{}15)^\circ} = 2\cos^2{15^\circ}-1$
$\cos{30^\circ} = 2\cos^2{15^\circ}-1$
substituting $\cos{15^\circ}$ with $x$ and $\cos{30^\circ}$ with $\frac{\sqrt{3}}{2}$
$\frac{\sqrt{3}}{2} = 2x^2-1$
$2x^2-1-\frac{\sqrt{3}}{2} = 0$
solving for $x$, we get $x = \frac{\pm\sqrt{\sqrt{3}+2}}{2}$ and therefore $\cos{15^\circ} = \frac{\pm\sqrt{\sqrt{3}+2}}{2}$
Note: Only the positive value out of the two values we have got can be the correct value of $\cos{15\circ}$ since $\cos{15\circ}$ cannot be a negative value. So going forward I shall only refer to the positive value obtained in Method 2 as the solution from Method 2.
Now my question is: Are both answers equal? If yes, why do we even get these two answers?
The reason I ask equal and not correct is because the universal answer everywhere on the internet and in books is that  $\cos{15^\circ} = \frac{\sqrt{3}+1}{2\sqrt{2}}$
So I am confused as to how you can get completely different-looking answers. Now a quick use of the calculator reveals that the decimal approximation of both answers is the same i.e. 0.96592... . So if that is the case then why do we get such different-looking solutions?
 [/INST] To see that $$\sqrt {\sqrt 3 +2}=\frac {\sqrt 3 +1}{\sqrt 2}$$
simply square both sides.
Since both terms are positive we see that our desired equality is equivalent to $$\sqrt 3+ 2 =\frac {3+1+2\sqrt 3}{2}=2+\sqrt 3$$
and we are done.
As a general remark, algebraic relations can be very complicated and unintuitive.  It is certainly a good idea to compare numerical expressions, as you did, as sanity checks.
</s>