Integral of x eˣ: Formula, Steps and Examples
The integral of x eˣ is (x − 1)eˣ + C. See the integration by parts steps, why u = x is the right choice, a graph and examples like x e^(2x).
Products and integration by parts Updated 3 min read
At a glance
- Antiderivative
- (x-1)e^x + C
- Method
- Integration by parts with u = x, dv = e^x\,dx
- From 0 to 1
- 1
- With e^(kx)
- \int xe^{kx}\,dx = \left(\frac{x}{k} - \frac{1}{k^2}\right)e^{kx} + C
On this page
The integral of xe^x is (x - 1)e^x + C. It is the standard first example of integration by parts: a power of x times an exponential.
Graph of x eˣ and its antiderivative
How to integrate x eˣ step by step
The formula for integration by parts is \int u\,dv = uv - \int v\,du.
- Choose the parts. Let u = x and dv = e^x\,dx.
- Find du and v. du = dx and v = e^x.
- Apply the formula. \int xe^x\,dx = xe^x - \int e^x\,dx
- Finish the easy integral. \int e^x\,dx = e^x, so \int xe^x\,dx = xe^x - e^x + C = (x-1)e^x + C
Why u = x? The goal is a simpler leftover integral. Differentiating x gives 1, so the x is gone after one step. The LIATE rule (Logs, Inverse trig, Algebraic, Trig, Exponential) says the same thing: algebraic comes before exponential, so x is u.
What if you choose the other way? With u = e^x and dv = x\,dx, you get \frac{x^2}{2}e^x - \int\frac{x^2}{2}e^x\,dx. The power of x went up, so the problem got worse.
Check by differentiating
The product rule gives back exactly the integrand. The derivative of x eˣ page shows the forward direction.
Definite integrals
From 0 to 1:
From −∞ to 0: as x \to -\infty, (x-1)e^x \to 0 because the exponential wins. So
The answer is negative since xe^x < 0 for x < 0.
Worked examples
Example 1: a faster exponential. \int xe^{2x}\,dx. Let u = x, dv = e^{2x}\,dx, so v = \frac{1}{2}e^{2x}:
In general, \int xe^{kx}\,dx = \left(\frac{x}{k} - \frac{1}{k^2}\right)e^{kx} + C.
Example 2: decay. With k = -1, the general formula gives \int xe^{-x}\,dx = (-x - 1)e^{-x} + C = -(x+1)e^{-x} + C. From 0 to \infty this is 0 - (-1) = 1. This is the average waiting time in the exponential distribution with rate 1.
Example 3: a linear factor. \int(3x + 2)e^x\,dx. With u = 3x + 2, du = 3\,dx:
Example 4: a higher power. For x^2e^x, use parts twice. The result is (x^2 - 2x + 2)e^x + C, shown on the integral of x² eˣ page.
Common mistakes
- Integrating factor by factor. \int xe^x\,dx \ne \frac{x^2}{2}e^x. The integral of a product is not the product of the integrals.
- Choosing u = e^x. The leftover integral then contains x^2, which is harder.
- A sign slip in the last step. It is xe^x - \int e^x\,dx, so the e^x term is subtracted. Check by differentiating.
- Forgetting \frac{1}{k} for e^{kx}. With e^{2x}, v = \frac{1}{2}e^{2x}, not e^{2x}.
For more practice, see the integration by parts guide and the integration by parts practice problems.
Practice it now
Integration by parts
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