Given:

$\displaystyle \int sin \frac{x}{2}cos \frac{x}{2}$

$\displaystyle -2 \int udu$

$\displaystyle -2\frac{u^{2}}{2}+c$

$\displaystyle -u^{2}+c$

$\displaystyle -cos\frac{x}{2}^{2}+c$

the answer should be:

$\displaystyle -\frac{1}{2}cos[x]$

What's wrong with my solution?

any help will be appreciated, thanks