Integration by Parts Math Example 3

Follow the full solution, then compare it with the other examples linked below.

Example 3

medium
Evaluate โˆซx2exโ€‰dx\displaystyle\int x^2 e^x \, dx using integration by parts twice.

Solution

  1. 1
    Step 1: First IBP โ€” let u=x2u = x^2, dv=exโ€‰dxdv = e^x\,dx; then du=2xโ€‰dxdu = 2x\,dx, v=exv = e^x.
  2. 2
    Step 2: Apply the formula: โˆซx2exโ€‰dx=x2exโˆ’โˆซ2xexโ€‰dx\int x^2 e^x\,dx = x^2 e^x - \int 2x e^x\,dx.
  3. 3
    Step 3: Second IBP on โˆซ2xexโ€‰dx\int 2x e^x\,dx โ€” let u=2xu = 2x, dv=exโ€‰dxdv = e^x\,dx; then du=2โ€‰dxdu = 2\,dx, v=exv = e^x.
  4. 4
    Step 4: โˆซ2xexโ€‰dx=2xexโˆ’โˆซ2exโ€‰dx=2xexโˆ’2ex\int 2x e^x\,dx = 2x e^x - \int 2 e^x\,dx = 2x e^x - 2e^x.
  5. 5
    Step 5: Combine: โˆซx2exโ€‰dx=x2exโˆ’(2xexโˆ’2ex)=x2exโˆ’2xex+2ex+C=ex(x2โˆ’2x+2)+C\int x^2 e^x\,dx = x^2 e^x - (2x e^x - 2e^x) = x^2 e^x - 2x e^x + 2e^x + C = e^x(x^2 - 2x + 2) + C.

Answer

ex(x2โˆ’2x+2)+Ce^x(x^2 - 2x + 2) + C
When the algebraic factor is xnx^n, integration by parts must be applied nn times. Each application reduces the power of xx by one. The pattern for โˆซxnexโ€‰dx\int x^n e^x\,dx produces alternating signs in the coefficients: ex(x2โˆ’2x+2)e^x(x^2 - 2x + 2).

About Integration by Parts

An integration technique based on the product rule: โˆซuโ€‰dv=uvโˆ’โˆซvโ€‰du\int u\,dv = uv - \int v\,du. Used when the integrand is a product of two functions.

Learn more about Integration by Parts โ†’

More Integration by Parts Examples