Integration by parts · Exercise-INTEGRATION-BY-PARTS-005

Step-by-step solved exercise: Integrals

Compute \(\displaystyle\int x^{2} e^{x}\,dx\).

Step by step with comments, a check and common mistakes.

Step-by-step solution

  1. Take \(\displaystyle u=x^{2}\) and \(\displaystyle dv=e^{x}\,dx\).

    \[\displaystyle u=x^{2},\quad dv=e^{x}\,dx\]
  2. Compute \(\displaystyle du=2x\,dx\) and \(\displaystyle v=e^{x}\).

    \[\displaystyle du=2x\,dx,\quad v=e^{x}\]
  3. First application of the formula: the degree drops to \(\displaystyle x\).

    \[\displaystyle \int x^{2}e^{x}\,dx = x^{2}e^{x}-2\int x\,e^{x}\,dx\]
  4. Apply by parts again to \(\displaystyle \int x\,e^{x}\,dx\), which gives \(\displaystyle (x-1)e^{x}\) (as in the case of \(\displaystyle x\,e^{x}\)).

    \[\displaystyle \int x\,e^{x}\,dx=(x-1)e^{x}+C\]
  5. Substitute and simplify to get the final result.

    \[\displaystyle x^{2}e^{x}-2(x-1)e^{x}+C=(x^{2}-2x+2)e^{x}+C\]

    Comment: Check: the derivative of \(\displaystyle (x^{2}-2x+2)e^{x}\) is \(\displaystyle x^{2}e^{x}\).

Answer

\(\displaystyle \left(x^{2} - 2 x + 2\right) e^{x} + C\)

🎯 Build my path to this exercise