Integral of x² eˣ: Formula, Steps and Examples
The integral of x² eˣ is (x² − 2x + 2)eˣ + C. See integration by parts twice, the tabular shortcut, a check, a graph and the xⁿ eˣ pattern.
Products and integration by parts Updated 3 min read
At a glance
- Antiderivative
- (x^2 - 2x + 2)e^x + C
- Method
- Integration by parts twice, or the tabular method
- From 0 to 1
- e - 2 \approx 0.718
- With e^(−x), 0 to ∞
- \int_0^\infty x^2e^{-x}\,dx = 2
- Pattern
- \int x^3e^x\,dx = (x^3 - 3x^2 + 6x - 6)e^x + C
On this page
The integral of x^2e^x is (x^2 - 2x + 2)e^x + C. It takes integration by parts twice, and it is the standard example for the tabular method.
Graph of x² eˣ and its antiderivative
How to integrate x² eˣ step by step
Use integration by parts, \int u\,dv = uv - \int v\,du, with the power of x as u each time.
- First pass. u = x^2, dv = e^x\,dx, so du = 2x\,dx and v = e^x: \int x^2e^x\,dx = x^2e^x - 2\int xe^x\,dx
- Second pass. You already know \int xe^x\,dx = (x-1)e^x from the integral of x eˣ. If not, use u = x, dv = e^x\,dx again.
- Combine. x^2e^x - 2(x - 1)e^x + C = (x^2 - 2x + 2)e^x + C
The tabular shortcut
When one factor differentiates to zero and the other is easy to integrate over and over, set up a table. Differentiate x^2 in the left column, integrate e^x in the right, and attach alternating signs:
| Sign | Differentiate | Integrate |
|---|---|---|
| + | x^2 | e^x |
| - | 2x | e^x |
| + | 2 | e^x |
| 0 | e^x |
Multiply each left entry by the right entry one row down, using the sign of the left row:
The repeated parts and LIATE lesson practices this method.
Check by differentiating
Everything except x^2 cancels. A nice way to remember the answer: the polynomial p(x) = x^2 - 2x + 2 satisfies p + p' = x^2.
Definite integrals
From 0 to 1:
From −∞ to 0: as x \to -\infty, (x^2 - 2x + 2)e^x \to 0, so the integral is 2 - 0 = 2.
With a decaying exponential. \int x^2e^{-x}\,dx = -(x^2 + 2x + 2)e^{-x} + C, so
This is a case of the Gamma function result \int_0^\infty x^ne^{-x}\,dx = n!. See improper integrals for why the limit at infinity is 0.
The xⁿ eˣ pattern
Each extra power of x adds one row to the table:
| Integral | Answer |
|---|---|
| \int e^x\,dx | e^x + C |
| \int xe^x\,dx | (x - 1)e^x + C |
| \int x^2e^x\,dx | (x^2 - 2x + 2)e^x + C |
| \int x^3e^x\,dx | (x^3 - 3x^2 + 6x - 6)e^x + C |
The polynomial is x^n minus its derivative plus its second derivative and so on, with alternating signs.
Worked examples
Example 1: a faster exponential. \int x^2e^{2x}\,dx. In the tabular method the right column is e^{2x}, \frac{1}{2}e^{2x}, \frac{1}{4}e^{2x}, \frac{1}{8}e^{2x}:
Example 2: a quadratic. \int(x^2 + 1)e^x\,dx. Here p = x^2 + 1, and the pattern gives (p - p' + p'')e^x = (x^2 + 1 - 2x + 2)e^x = (x^2 - 2x + 3)e^x + C.
Example 3: a substitution first. \int x^3e^{x^2}\,dx. Let w = x^2, dw = 2x\,dx, so the integral is \frac{1}{2}\int we^w\,dw = \frac{1}{2}(x^2 - 1)e^{x^2} + C.
Common mistakes
- Stopping after one pass. x^2e^x - 2\int xe^x\,dx still has an integral in it.
- Losing the factor 2. The first pass brings out 2x, and the 2 multiplies the whole second result.
- Wrong signs in the table. The signs alternate +, -, + starting from the top row.
- Choosing u = e^x. The power of x goes up instead of down.
More practice: the integration by parts practice problems.
Practice it now
Repeated parts and LIATE
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson