$\int \sin x \cos x \ dx \neq \frac {\sin^2x}{2}$ if we use the identity $\sin A \cos B = \frac12[\sin(A-B) + \sin(A+B)]?$ How is it that we can get two different answers for an integral depending on whether we apply an identity or not? 
Typically, $$\int \sin x \cos x \ dx = \frac {\sin^2x}{2}+C~.$$
However if we apply the trigonometric identity $$\sin A \cos B = \frac12[\sin(A-B) + \sin(A+B)]~,$$ then the integral becomes $$\frac12 \int (\sin(0) + \sin(2x)) dx =\frac12 \int \sin(2x) dx = -\frac14 \cos(2x) $$
So we end up with a different answer. Have I made a mistake here, or is this just a property of integration/trigonometry?
 A: You're fine, because $\frac12\sin^2x+\frac14\cos 2x=\frac14$ is absorbed into the integration constant.
A: The same in-definite integral,$I(x)$ done by different methods could yield different expressions $I_1(x), I_2(x), I_3(x)...$ which would differ with each other only by a constant. For example
$$I(x)=\int \sin x \cos x dx= \int \frac{\sin 2x}{2} dx=-\frac{\cos 2x}{4}+C_1 =I_1(x).$$
The same integral if done bt parts gives
$$I(x)=\sin x \sin x-\int \cos x \sin x dx \Rightarrow I(x)=\frac{ \sin^2 x}{2}+C_2= I_2(x). $$
The same integral if done by substitution $\cos x=t$, we get
$$I(x)=\int \sin x \cos x dx=\int -d (\cos x) \cos x dx= -\frac{\cos^2 x}{2}+C_3=I_3(x)$$
It can be seen that $I_1(x), I_2(x)$ and $I_3(x)$ differe mutually by just some constant (independent of $x$).
A: Your confusion lies in the definition of antiderivative: It's not a function, but a set of functions:
$$\int f := \{g| g'=f\}$$
And you can easily check that the derivative of both of yout functions is the same, so they are both an antiderivative of your initial function.
But why do we write expressions like
$$\int x \mathrm{d}x=\frac{x^2}{2}+C?$$
Because we are lazy, and it's easier to just write out one element of the set plus a constant. And why can we do it? Because it can be proven that if $f'=g'$ then $\exists c$ so that $f=g+c$ (with the MVT, applied to $h=f-g$), so one element of the set is enough to characterise the whole set.
A: You forgot the arbitrary constant in your second method.
The non-constant part of the first result may be transformed as follows: $$\frac{\sin^2x}{2}=\frac{1-\cos 2x}{4}=-\frac14\cos 2x+C,$$ since $C$ is arbitrary.
