Stuck on this? Solve it with AI
Calculus · real student question

Find the indefinite integral of x^2 * sin(x) with respect to x.

Question

Find

∫x2sin⁡x dx.\int x^{2}\sin x\,dx.

Step-by-step solution

  1. Choose uu so that differentiating reduces the polynomial. In ∫u dv=uv−∫v du\int u\,dv=uv-\int v\,du the aim is a simpler leftover integral. Taking u=x2u=x^{2} makes du=2x dxdu=2x\,dx, dropping the degree from 22 to 11; taking u=sin⁡xu=\sin x instead would raise the polynomial degree and make things worse. This is the LIATE guideline in action — the algebraic factor is the one to differentiate.

  2. First application. With u=x2u=x^{2}, dv=sin⁡x dxdv=\sin x\,dx (so v=−cos⁡xv=-\cos x):

    ∫x2sin⁡x dx=−x2cos⁡x−∫(−cos⁡x)(2x) dx=−x2cos⁡x+∫2xcos⁡x dx.\int x^{2}\sin x\,dx=-x^{2}\cos x-\int\left(-\cos x\right)(2x)\,dx=-x^{2}\cos x+\int 2x\cos x\,dx.

    The two minus signs — one from v=−cos⁡xv=-\cos x and one from the formula — combine to a plus, which is where sign errors usually creep in.

  3. Second application on the remaining integral. For ∫xcos⁡x dx\int x\cos x\,dx take u=xu=x, dv=cos⁡x dxdv=\cos x\,dx, so du=dxdu=dx, v=sin⁡xv=\sin x:

    ∫xcos⁡x dx=xsin⁡x−∫sin⁡x dx=xsin⁡x+cos⁡x.\int x\cos x\,dx=x\sin x-\int\sin x\,dx=x\sin x+\cos x.

    The polynomial degree is now 00, so the process terminates — a degree-nn polynomial needs exactly nn rounds of parts.

  4. Combine the pieces. Multiplying the second result by the factor 22 and substituting:

    ∫2xcos⁡x dx=2xsin⁡x+2cos⁡x,\int 2x\cos x\,dx=2x\sin x+2\cos x,

    ∫x2sin⁡x dx=−x2cos⁡x+2xsin⁡x+2cos⁡x+C.\int x^{2}\sin x\,dx=-x^{2}\cos x+2x\sin x+2\cos x+C.

  5. Verify by differentiating. Using the product rule on each term:

    ddx(−x2cos⁡x)=−2xcos⁡x+x2sin⁡x,ddx(2xsin⁡x)=2sin⁡x+2xcos⁡x,ddx(2cos⁡x)=−2sin⁡x.\frac{d}{dx}\left(-x^{2}\cos x\right)=-2x\cos x+x^{2}\sin x,\quad \frac{d}{dx}\left(2x\sin x\right)=2\sin x+2x\cos x,\quad \frac{d}{dx}\left(2\cos x\right)=-2\sin x.

    Adding: the ∓2xcos⁡x\mp2x\cos x pair cancels, the ±2sin⁡x\pm2\sin x pair cancels, leaving exactly x2sin⁡xx^{2}\sin x ✓. A numeric check at x=1.3x=1.3 gives 1.62841331.6284133 both ways ✓.

Answer

∫x2sin⁡x dx=−x2cos⁡x+2xsin⁡x+2cos⁡x+C\int x^{2}\sin x\,dx=-x^{2}\cos x+2x\sin x+2\cos x+C

Need to solve a different problem like this? Open the solver →