I am using wolframalpha.com and other online calculus calculators. The problem I am solving:
$$\int x\cos^2\left(x^2\right)dx$$
But the integral and its derivative don't match. Am I doing something wrong? What am I typing in wrong? I think it is something as simple as a mistype but I cannot see where.


Infact the derivative of the integral is just the same as $x\cos^2(x^2)$. You just have to use the identity: $$\cos 2x +1= 2\cos^2x$$ Replacing $x$ by $x^2$, we have$$\cos(2x^2)+1=2\cos^2(x^2)$$ Hence we have $$\begin{align} \frac12x(\cos (2x^2)+1)&=\frac12x(2\cos^2(x^2))\\ &=x\cos^2(x^2) \end{align}$$