इस पर अटक गए? इसे AI से हल करें
Calculus · real student question

Evaluate the integral of x^2 * sin(x) from x = 0 to x = pi.

Question

Evaluate

∫0πx2sin⁡x dx\int_{0}^{\pi}x^{2}\sin x\,dx

Step-by-step solution

  1. Choose uu so the polynomial gets smaller. With a polynomial times a trigonometric function, always let uu be the polynomial: differentiating lowers its degree while sin⁡x\sin x integrates to −cos⁡x-\cos x without growing. Take

    u=x2,dv=sin⁡x dx ⟹ du=2x dx,v=−cos⁡xu=x^{2},\quad dv=\sin x\,dx\ \Longrightarrow\ du=2x\,dx,\quad v=-\cos x

    Choosing the other way round would raise the degree and never terminate.

  2. Apply integration by parts once.

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

    The remaining integral has degree 11 instead of 22, so one more pass will finish it.

  3. Apply it a second time to ∫xcos⁡x dx\int x\cos x\,dx. Now u=xu=x, dv=cos⁡x dxdv=\cos x\,dx, so du=dxdu=dx and 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

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

  4. Write the full antiderivative.

    ∫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

    (Degree 2 needed exactly two passes; a degree-nn polynomial needs nn.)

  5. Substitute the limits. At x=πx=\pi, using cos⁡π=−1\cos\pi=-1 and sin⁡π=0\sin\pi=0:

    −π2(−1)+0+2(−1)=π2−2-\pi^{2}(-1)+0+2(-1)=\pi^{2}-2

    At x=0x=0, using cos⁡0=1\cos 0=1 and sin⁡0=0\sin 0=0:

    0+0+2=20+0+2=2

  6. Subtract and check.

    ∫0πx2sin⁡x dx=(π2−2)−2=π2−4≈5.8696\int_{0}^{\pi}x^{2}\sin x\,dx=\left(\pi^{2}-2\right)-2=\pi^{2}-4\approx 5.8696

    A numerical Simpson estimate gives 5.86960440115.8696044011, matching π2−4=5.8696044011\pi^{2}-4=5.8696044011 ✓. The answer is positive, as it must be: sin⁡x≥0\sin x\ge 0 throughout [0,π][0,\pi].

Answer

π2−4≈5.8696\pi^{2}-4\approx 5.8696

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