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?
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$).