About the equivalence of $\cos(x) = \sqrt{1-\sin^2(x)}$ and $\cos(x) = \cos(2x-x)$ By the title, my questions may sound trivial or silly, but I have problems with those outputs.
I need the sine of $15$ degrees. Now I thought of: $15 = 45-30$ hence:
$$\sin(15) = \sin(45-30) = \sin(45)\cos(30) - \cos(45)\sin(30) = \dfrac{\sqrt{6}-\sqrt{2}}{4}$$
So far so good.
Yet, when calculating the cosine, I have
Mode 1
$$\cos(15) = \sqrt{1 - \sin^2(15)} = \sqrt{1 - \dfrac{8 - 4\sqrt{3}}{16}} = \dfrac{\sqrt{2+\sqrt{3}}}{2}$$
Mode 2
$$\cos(15) = \cos(45-30) = \cos(45)\cos(30) + \sin(45)\sin(30) = \dfrac{\sqrt{6}+\sqrt{2}}{4}$$
The second method returns something more clean than the previous one. I did not really see the numerical equivalence though, so I computed the difference and I found that
$$\dfrac{\sqrt{2+\sqrt{3}}}{2} - \dfrac{\sqrt{6}+\sqrt{2}}{4} = 1.11\cdot 10^{-16}$$
(On W. Mathematica).
Can someone please explain me this infinitesimal difference between them, and how to pass from Mode 1 to Mode 2 in writing?

$$
\frac{\sqrt{2+\sqrt{3}}}{2} = \frac{\sqrt{8+4\sqrt{3}}}{4}
$$
Solving
$$
8+4\sqrt{3} = (a+b\sqrt{3})^2
$$
results in
$$
\begin{cases}
 a^2+3b^2=8 \\
 ab = 2
\end{cases}
$$
and solving that results in
$$
(a, b)= (\sqrt2, \sqrt2), (\sqrt6, \sqrt\frac{2}{3})
$$
so
$$
8+4\sqrt3 = (\sqrt6+\sqrt2)^2
$$
and thus
$$
\frac{\sqrt{8+4\sqrt3}}{4} = \frac{\sqrt6+\sqrt2}{4}
$$
So it's probably a rounding error in the software.
