ติดตรงนี้? แก้มันด้วย AI
Calculus · real student question

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

Question

Evaluate

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

Step-by-step solution

  1. Find the antiderivative by parts, twice. Taking u=x2u=x^{2}, dv=sin⁡x dxdv=\sin x\,dx gives −x2cos⁡x+∫2xcos⁡x dx-x^{2}\cos x+\int 2x\cos x\,dx; a second pass with u=xu=x, dv=cos⁡x dxdv=\cos x\,dx gives ∫xcos⁡x dx=xsin⁡x+cos⁡x\int x\cos x\,dx=x\sin x+\cos x. Together:

    ∫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

    The antiderivative does not depend on the limits, so it is worth deriving once and reusing.

  2. Note what changes with the limits 00 and 22. Here 22 is a plain number of radians, not a multiple of π\pi, so sin⁡2\sin 2 and cos⁡2\cos 2 do not reduce to 00 or ±1\pm1. The exact answer will therefore contain both of them, and rounding them too early is the main hazard.

  3. Evaluate at the upper limit x=2x=2.

    −4cos⁡2+4sin⁡2+2cos⁡2=4sin⁡2−2cos⁡2-4\cos 2+4\sin 2+2\cos 2=4\sin 2-2\cos 2

    The two cosine terms partially cancel: −4cos⁡2+2cos⁡2=−2cos⁡2-4\cos 2+2\cos 2=-2\cos 2.

  4. Evaluate at the lower limit x=0x=0.

    −0⋅cos⁡0+0⋅sin⁡0+2cos⁡0=2-0\cdot\cos 0+0\cdot\sin 0+2\cos 0=2

  5. Subtract to get the exact value.

    ∫02x2sin⁡x dx=4sin⁡2−2cos⁡2−2\int_{0}^{2}x^{2}\sin x\,dx=4\sin 2-2\cos 2-2

  6. Convert to a decimal and sanity-check the sign. With sin⁡2=0.909297\sin 2=0.909297 and cos⁡2=−0.416147\cos 2=-0.416147:

    4(0.909297)−2(−0.416147)−2=3.637190+0.832294−2=2.4694834(0.909297)-2(-0.416147)-2=3.637190+0.832294-2=2.469483

    Simpson rule gives 2.46948342.4694834 ✓. The result is positive because sin⁡x>0\sin x>0 on all of [0,2][0,2] (since 2<π2<\pi).

Answer

4sin⁡2−2cos⁡2−2≈2.46954\sin 2-2\cos 2-2\approx 2.4695

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