<s>[INST] How to solve $\cos(\frac{\alpha }{2} )=\frac{a}{\sqrt{a^{2}+b^{2} } }$ for $\cos(\alpha)$ using half-angle formula. I have $\cos(\frac{\alpha }{2} )=\frac{a}{\sqrt{a^{2}+b^{2}  } }  $
How can I get $\cos(\alpha ) $ from this?
I know this identitiy. 
$\cos(\frac{\alpha }{2} )=\sqrt{\frac{1+\cos(\alpha )  }{2} }  $
But just cant figure out, how to do it.
 [/INST] $\cos(\frac{\alpha }{2} )=\frac{a}{\sqrt{a^{2}+b^{2}  } }  $
$\cos^2(\frac{\alpha }{2} )=\frac{a^2}{a^2+b^2}$
$\frac{1}{2}(1 + \cos(\alpha))=\frac{a^2}{a^2+b^2}$
$\cos(\alpha)=\frac{2a^2}{a^2+b^2} - 1$

half-angle formula
$\cos^2(\frac{\alpha }{2} ) = \frac{1}{2}(1 + \cos(\alpha))$
</s>