[Math] How to integrate $\int x^2 \sin^2(x)dx$

integration

I don't know how to integrate $\int x^2\sin^2(x)\,\mathrm dx$. I know that I should do it by parts, where I have
$$
u=x^2\quad v'=\sin^2x \\
u'=2x \quad v={-\sin x\cos x+x\over 2}$$
and now I have

$$
\int x^2\sin^2(x)\,\mathrm dx = {-\sin x\cos x+x\over 2} x^2 – \int 2x{-\sin x\cos x+x\over 2}\,\mathrm dx\\
={-\sin x\cos x+x\over 2} x^2 – \int x(-\sin x\cos x+x)\,\mathrm dx\\
$$
so I have to calculate
$$
\int x(-\sin x\cos x+x)\,\mathrm dx=-\int x\sin x\cos x\,\mathrm dx+\int x^2\,\mathrm dx$$

I know that $\int x^2\,\mathrm dx = {1 \over 3}x^3+C$ but I don't know what should I do with $$\int x\sin x\cos x \,\mathrm dx$$ Should i use parts again or what? Please help.

Best Answer

We have $\sin x \cos x=\frac{1}{2}\sin 2x$. Now another integration by parts will do it.

It may be marginally easier to note at the beginning that $\cos 2x=1-2\sin^2 x$. So we want to integrate $\dfrac{1}{2}x^2(1-\cos 2x)$, that is, $\dfrac{x^2}{2}+\dfrac{x^2}{2}\cos 2x$, which looks more familiar.

Related Question