Can someome please check my working and tell me if it is 'correct'. As my book shows a different method.

using $\displaystyle cos2A = 2cos^{2}A - 1 = 1-2sin^{2}A $

show that; $\displaystyle cos^{2}\frac{x}{2} = \frac{1+cosx}{2} $

my method;

$\displaystyle cosx = cos2\frac{x}{2} = 2cos^{2}\frac{x}{2}-1 $

$\displaystyle \frac{1+ 2cos^{2}\frac{x}{2}-1}{2} $ The one's cancel, and I get

$\displaystyle \frac{2cos^{2}\frac{x}{2}}{2} $

and now can I cancel the two's to give me

$\displaystyle cos^{2}\frac{x}{2} $

or do I have to cancel both 'two's at the top?

thanks