# Can a Function have Multiple Valid Indefinite Integrals

Working with U-substitution, I have to integrate the following.

$\int x\cos(x^2)\sin(x^2)dx$

From my understanding you can take the integral by substituting $u$ for either $\cos(x^2)$ or $\sin(x^2)$.

EG:

Solution 1:

$u = \sin(x^2)$

$\frac{1}{2}du=x\cos(x^2)dx$

$\frac{1}{2}\int udu = \frac{u^2}{4}+c = \frac{\sin^2(x^2)}{4}+c$

Solution 2:

$u = \cos(x^2)$

$-\frac{1}{2}du=x\sin(x^2)dx$

$-\frac{1}{2}\int udu = -\frac{u^2}{4}+c = -\frac{\cos^2(x^2)}{4}+c$

The two answers are shifts of each other, but are not equivalent. Is one correct and the other incorrect, or are they both valid indefinite integrals of the original function?

• Keep in mind that $\sin^2x+\cos^2x=1$, so $\dfrac{\sin^2(x^2)}{4}=\dfrac{1-\cos^2(x^2)}{4}$, and the constant $\dfrac{1}{4}$ can be absorbed into $C$. – user170231 Jan 27 '15 at 16:35