I feel like there is something I am missing here. When integrating both sides of the trigonometric identity $\sin{2x}=2\cos x\sin x$ I get different results.
The left side of course results in $-\frac{1}{2}\cos{2x}+C$.
The right side I solve with u-substitution:
$u=\cos x$
$du=-\sin x dx$
$-2\int udu=-u^2+C=-\cos^2 x+C$
While writing this question I noticed another identity $\cos^2 x=\frac{1}{2}+\frac{1}{2}\cos 2x$. So apparently the $\frac{1}{2}$ falls out because of the $+C$ resulting from indefinite integration? This is still a little confusing to me.