<s>[INST] Nested sine and cosine half angle formulas I am having trouble with this problem. I know that it is related to the sine and cosine half-angle formulas. I substituted $\frac{\sqrt{3}}{2}$ with $\cos(\frac{\pi}{6})$ and got $\frac{\pi}{24}$ for the first 2 loops. I don't know what to do for the last 2 loops. Can anyone give an explanation or hint on what I should do?

Calculate $$\arccos \sqrt{\frac{\displaystyle 1 + \sqrt{\frac{1 - \sqrt{\frac{\displaystyle 1 - \sqrt{\frac{\displaystyle 1 + \frac{\displaystyle \sqrt{3}}{2}}{2}}}{2}}}{2}}}{2}}.$$
As usual, the output of an inverse trig function should be in radians.

 [/INST] By evaluating each radical we have, $$\sqrt{\dfrac{1+\frac{\sqrt3}2}2}=\sqrt{\dfrac{1+\cos\frac{\pi}6}{2}}=\cos\frac{\pi}{12}$$
$$\sqrt{\dfrac{1-\cos\frac{\pi}{12}}{2}}=\sin\frac{\pi}{24}$$
$$\sqrt{\dfrac{1-\sin\frac{\pi}{24}}{2}}=\sqrt{\dfrac{\sin^2\frac{\pi}{48}+\cos^2\frac{\pi}{48}-2\sin\frac{\pi}{48}\cos\frac{\pi}{48}}{2}}=\dfrac{|\sin\frac{\pi}{48}-\cos\frac{\pi}{48}|}{\sqrt2}$$$$=\frac1{\sqrt2}.\cos\frac{\pi}{48}-\frac1{\sqrt2}\sin\frac{\pi}{48}=\cos(\frac{\pi}4+\frac{\pi}{48})=\cos\frac{13\pi}{48}$$
And finally,
$$\sqrt{\dfrac{1+\cos{\frac{13\pi}{48}}}{2}}=\cos\frac{13\pi}{96}$$
Hence, $\arccos(\cos\frac{13\pi}{96})=\frac{13\pi}{96}$.
</s>