Book tells me the answer is:
$$ \int \sin(x)\cos(x) dx = \frac{1}{2} \sin^{2}(x) + C $$
however, I get the result:
$$ \sin(A)\cos(B) = \frac{1}{2} \sin(A-B)+\frac{1}{2}\sin(A+B) $$
$$ \begin{split} \int \sin(x)\cos(x) dx &= \int \left(\frac{1}{2}\sin(x-x) + \frac{1}{2}\sin(x+x)\right) dx \\ &= \int \left(\frac{1}{2}\sin(0) + \frac{1}{2}\sin(2x)\right) dx \\ &= \int \left(\frac{1}{2}\sin(2x)\right) dx \\ &= -\frac{1}{2} \frac{1}{2}\cos(2x) +C\\ &= -\frac{1}{4} \cos(2x) +C \end{split} $$
How did the book arrive at the answer $\frac{1}{2}\sin^2(x)$?
Because $$\frac{1}{2} \sin^2(x) = \frac{1-\cos(2x)}{4}$$