$\int \sin( \pi x) \cos( \pi x)\ dx$ I would like some help computing this integral:
$$\int \sin(\pi t)\cos(\pi t)dt$$
Apparently, the answer should be $\frac{\sin^2(\pi t)}{2\pi}+C$ but I get $\frac{-\cos(2 \pi t)}{4 \pi}$+C instead. Here's what I did:

*

*I rewrote the integrand as $\frac{1}{2}\sin(2\pi t)$.

*I took out the constant $\frac{1}{2}$ out of the integral, so my expression became $\frac{1}{2} \int \sin(2\pi t)dt$.

*I evaluated the antiderivative of $\sin(2\pi t)$, which I believe is $-\frac{\cos(2\pi t)}{2 \pi}+C$.

*Lastly, I multiplied the antiderivative with $\frac{1}{2}$, yielding my final answer.

Would it be wrong to assume that both answers are equivalent, since the integral can either be rewritten using the half-angle formula or solved by U-substitution? If not, could you please explain why?
 A: Yes, both answers are equivalent. Using the identity $\cos(2x)=1-2\sin^2(x)$ we have
$$-\frac{\cos(2\pi t)}{4\pi}+C_1=\frac{2\sin^2(\pi t)-1}{4\pi}+C_1=\frac{\sin^2(\pi t)}{2\pi}+C_2$$
where $C_2=C_1-\frac{1}{4\pi}$ (for constants $C_1$ and $C_2$).

Let $u=\sin(\pi t)$, then $\frac{du}{dt}=\pi\cos(\pi t)$ and we have
$$\int\sin(\pi t)\cos(\pi t)dt=\frac{1}{\pi}\int udu=\frac{u^2}{2\pi}+C=\frac{\sin^2(\pi t)}{2\pi}+C$$
A: $$I=\int\sin(\pi t)\cos(\pi t)\,dt$$
now use your double angle formula which says:
$$\sin(2y)=2\sin(y)\cos(y)\Rightarrow \sin(y)\cos(y)=\frac{\sin(2y)}{2}$$
and in your case you have $y=\pi t$ so:
$$I=\int\frac{\sin(2\pi t)}{2}dt$$
now if you want you could make a substitution so its clearer: $u=2\pi t\Rightarrow dt=\frac{du}{2\pi}$ so:
$$I=\frac1{4\pi}\int\sin(u)du=-\frac{\cos(u)}{4\pi}+C=-\frac{\cos(2\pi t)}{4\pi}+C$$
which is what you got. Now, remember that the constant of integration can "absorb" other numbers and so we could make manipulations like:
$$\cos(2y)=1-2\sin^2(y)$$
which would give us:
$$\frac{-\cos(2\pi t)}{4\pi}+C=-\frac{1-2\sin^2(\pi t)}{4\pi}+C=\frac{\sin^2(\pi t)}{4\pi}-\frac{1}{4\pi}+C$$
now you can just define then constants at the end as a new constant, and you see that the too solutions are actually equivalent
