The integral of x·e^x with respect to x is e^x(x − 1) + C. You can also write it as xe^x − e^x + C. Here, C is the constant of integration. You compute this standard result using integration by parts. First, choose u = x and dv = e^x dx. This yields du = dx and v = e^x. Then you can directly evaluate uv − ∫ v du.
The integral of x·e^x is a foundation for calculus. It helps you solve polynomial-exponential products. If you master this single problem, you can evaluate related functions. For example, you can solve x²e^x, xe^{3x}, and xe^{-x}. This integral serves as the primary standard example for learning integration by parts. It shows how differentiating one factor simplifies an entire product.
Step-by-step evaluation of the integral of xe^x
To compute the integral ∫ x e^x dx, you use the standard formula for integration by parts:

∫ u dv = uv − ∫ v du
Follow these four steps to carry out the calculation:
- Choose u and dv carefully. Assign u to the algebraic term x. Assign dv to the exponential term e^x dx. The LIATE helper rule (Logarithmic, Inverse Trigonometric, Algebraic, Trigonometric, Exponential) guides this choice. Algebraic terms take precedence over exponential terms when you pick u. In LIATE or ILATE memory aids, x is an algebraic term (A). Also, e^x is an exponential term (E). Because A precedes E, u must equal x.
- Find du and v. First, differentiate u. This gives you du = dx. Next, integrate dv. So, v = ∫ e^x dx = e^x.
- Apply the formula. Substitute u, v, du, and dv into the integration by parts formula.
So, ∫ x e^x dx = (x)(e^x) − ∫ (e^x)(dx). - Evaluate the remaining integral and simplify. Integrate e^x to get e^x. Then add the constant of integration C. This gives you:
∫ x e^x dx = x e^x − e^x + C
Also, you can factor out e^x. This yields the concise factored form e^x(x − 1) + C.
Selecting u = x is what makes this technique effective for the integral of xe^x. Differentiating x reduces its degree from 1 to 0, leaving a single exponential term e^x that is straightforward to integrate.
How to check your antiderivative by differentiation
You can always verify your antiderivative. Take its derivative to check. The fundamental theorem of calculus states this. Differentiating your answer must return the original integrand. This confirms the integral of xe^x.
Take the derivative of the factored form F(x) = e^x(x − 1) + C. Use the product rule with respect to x.
d/dx [ e^x(x − 1) + C ] = d/dx [e^x] · (x − 1) + e^x · d/dx [x − 1] + 0
= e^x (x − 1) + e^x (1)
= x e^x − e^x + e^x
= x e^x
The derivative simplifies exactly to x e^x. Therefore, you can mathematically verify the result e^x(x − 1) + C.
Why does integration by parts work for x·e^x?
Integration by parts is not a random formula. Instead, it is the product rule of differentiation run in reverse. You can verify the result without invoking the parts formula directly. For example, to verify the integral of xe^x, just work backward from differentiation.

Apply the product rule to the function x e^x:
d/dx (x e^x) is (d/dx [x]) · e^x + x · (d/dx [e^x]). This equals 1 · e^x + x e^x. So the integral of xe^x simplifies to e^x + x e^x.
To isolate the target term x e^x, subtract e^x from both sides of the derivative equation:
x e^x = d/dx (x e^x) − e^x
Now integrate both sides of this equation with respect to x:
∫ x e^x dx = ∫ [d/dx (x e^x)] dx − ∫ e^x dx
Integration and differentiation are inverse operations. The integral of d/dx (x e^x) simplifies to x e^x. You can evaluate the second integral to yield e^x. Combine these results and add the constant C for the integral of xe^x.
∫ x e^x dx = x e^x − e^x + C
This derivation proves why the antiderivative of x e^x must equal e^x(x − 1) + C.
Graphical behavior of the integrand and antiderivative
Understanding the functions graphically gives valuable intuition for definite integrals:
- Integrand f(x) = x e^x: This function passes through the origin (0, 0). For positive x, f(x) grows exponentially fast. It approaches +∞. For negative x, f(x) is negative. It reaches a global minimum at x = −1. The value there is −1/e ≈ −0.3679. Then, it approaches 0 asymptotically as x → −∞.
- Antiderivative F(x) = e^x(x − 1): This has a root at x = 1. Therefore, F(1) = 0. It reaches its local minimum at x = 0. Its value is F(0) = −1. As x → −∞, F(x) approaches 0 from below.
What happens if you swap u and dv?
Choosing the wrong parts for the integral of xe^x will make it harder. For example, if you set u = e^x and dv = x dx, your components become difficult. This is not the correct setup.

du = e^x dx, v = ∫ x dx = x²/2
Substituting these choices into the integration by parts formula gives:
∫ x e^x dx = (x²/2) e^x − ∫ (x²/2) e^x dx
Notice what occurred: the exponent remained e^x. However, the power of x increased from 1 to 2. The new integral ∫ (x²/2) e^x dx is more complicated. It is harder than the original problem for the integral of xe^x. Applying integration by parts again with the same incorrect orientation would raise the power to x³, x⁴, and so forth.
If an integration step yields a more complex integral, stop immediately. You should swap your choices for u and dv.
Can you solve the integral of x·e^x with other methods?
Integration by parts is standard for this integral. However, you can also solve it using the Method of Undetermined Coefficients. Alternatively, compare it against substitution techniques.

Method of Undetermined Coefficients (educated guessing)
Differentiating an exponential function multiplied by a first-degree polynomial always yields another first-degree polynomial multiplied by e^x. Because of this property, you can assume the antiderivative for the integral of xe^x has the general form:
F(x) = (ax + b) e^x
Differentiate F(x) using the product rule:
F'(x) = a e^x + (ax + b) e^x. So, F'(x) = (ax + a + b) e^x.
Set F'(x) equal to the original integrand x e^x:
(ax + a + b) e^x = x e^x
Match the coefficients of corresponding terms on both sides:
- Coefficient of x: a = 1
- Constant term: a + b = 0 ⇒ 1 + b = 0 ⇒ b = −1
Plugging a = 1 and b = −1 back into the guess gives F(x) = (x − 1) e^x + C. This confirms the exact result obtained with integration by parts.
Why standard u-substitution fails
Direct u-substitution for the integral of xe^x does not simplify it. If u = x, the integral becomes ∫ u e^u du. This just renames the variable. It does not solve the problem. If u = e^x, then du = e^x dx. Also, x = ln(u). The expression turns into ∫ ln(u) du. This still needs integration by parts.
Substitution only works for exponential products in specific cases. The derivative of the exponent must be present in the integrand. For example, consider x e^{x²}.
General formula for x·e^(ax)
When the exponential term contains a constant multiplier ‘a’, you can establish a general formula. For example, consider the integral of xe^x in the form ∫ x e^{ax} dx. First, set u = x and dv = e^{ax} dx. This gives du = dx. Also, v = (1/a)e^{ax}.
The integral of x e^{ax} dx equals x · (1/a)e^{ax} − ∫ (1/a)e^{ax} dx. This becomes (x/a)e^{ax} − (1/a²)e^{ax} + C. You can also write the integral of xe^x as (e^{ax} / a²) (ax − 1) + C.
Setting a = 1 recovers the standard formula e^x(x − 1) + C. Also, setting a = 3 gives (e^{3x}/9)(3x − 1) + C. This allows you to solve related problems instantly without repeating full parts derivations.
Comparison of integration methods for exponential products
| Method | Best Suited For | Key Formula or Strategy | Trade-offs |
|---|---|---|---|
| Integration by Parts | Products like x e^{ax}, x sin(ax), x ln(x) | ∫ u dv = uv − ∫ v du | Direct and systematic; requires selecting u and dv correctly. |
| Undetermined Coefficients | Polynomials multiplied by e^{ax} | Assume F(x) = P(x)e^{ax} and differentiate | Avoids setting up sub-integrals; requires knowing the exact template form. |
| Tabular Shortcut (DI Method) | Higher-degree terms like x³ e^x or x⁴ e^{2x} | Differentiate polynomial to 0, integrate e^{ax} | Extremely fast for repeated steps; vulnerable to sign errors if signs do not alternate correctly. |
| U-Substitution | Functions where exponent derivative exists (e.g. x e^{x²}) | Set u = g(x) so du = g'(x)dx | Solves in a single step; useless when the differential factor is missing. |
How do you solve integrals in the x^n·e^(ax) family?
Understanding how x e^x works enables you to solve a wide range of related definite and indefinite integrals.
Example 1: Definite integral from 0 to 1
First, evaluate ∫_0^1 x e^x dx. To do this, use the factored antiderivative e^x(x − 1).
∫_0^1 x e^x dx = [e^x(x − 1)]_0^1
Evaluate at the upper limit (x = 1): e¹(1 − 1) = e · 0 = 0
Evaluate at the lower limit (x = 0): e⁰(0 − 1) = 1 · (−1) = −1
Subtract lower limit value from upper limit value: 0 − (−1) = 1.
Example 2: Coefficient in the exponent (∫ x e^{2x} dx)
When the exponential term has a constant multiplier such as 2, set u = x and dv = e^{2x} dx. Differentiating u gives du = dx, while integrating dv gives v = (1/2)e^{2x}:
Therefore, ∫ x e^{2x} dx = x · (1/2)e^{2x} − ∫ (1/2)e^{2x} dx. This simplifies to (x/2)e^{2x} − (1/4)e^{2x} + C. Also, you can write it as e^{2x}(x/2 − 1/4) + C.
Each integration of e^{ax} introduces an extra factor of 1/a.
Example 3: Linear factor (∫ (2x + 3)e^x dx)
Set u = 2x + 3 and dv = e^x dx, so du = 2 dx and v = e^x:
Similarly, the integral of (2x + 3)e^x dx equals (2x + 3)e^x − ∫ 2 e^x dx. This gives (2x + 3)e^x − 2 e^x + C. The final answer is (2x + 1)e^x + C. This resembles the integral of xe^x in method.
Example 4: Decaying exponential and improper integral
For the indefinite integral ∫ x e^{-x} dx, set u = x and dv = e^{-x} dx. This yields du = dx. Also, it gives v = −e^{-x}.
Thus, ∫ x e^{-x} dx = −x e^{-x} − ∫ (−e^{-x}) dx. This simplifies to −x e^{-x} − e^{-x} + C. Therefore, the result is −e^{-x}(x + 1) + C.
Evaluating this as an improper integral over [0, ∞) gives:
\(∫_0^∞ x e^{-x} dx = \lim_{b → ∞} [−e^{-x}(x + 1)]_0^b = \lim_{b → ∞} [−e^{-b}(b + 1)] − [−e⁰(0 + 1)] = 0 − (−1) = 1\)
The linear term b increases, but the exponential decay of e^{-b} drives the product to 0 as b approaches infinity.
Example 5: Tabular method for higher powers (∫ x³ e^x dx)
When the polynomial power is higher than 1, using integration by parts repeatedly is tedious. The tabular method organizes the repeated differentiation and integration in two columns:
- D Column (Derivatives): x³ → 3x² → 6x → 6 → 0
- The Column (Integrals): e^x → e^x → e^x → e^x → e^x
- Sign Pattern: + , − , + , −
Multiply diagonally across the rows and apply the alternating signs:
∫ x³ e^x dx = + (x³)(e^x) − (3x²)(e^x). Also add (6x)(e^x) − (6)(e^x) + C. This simplifies to e^x(x³ − 3x² + 6x − 6) + C.
Example 6: Logarithmic limits
To evaluate ∫_0^{ln 2} x e^x dx, use e^{ln 2} = 2:
∫_0^{ln 2} x e^x dx = [e^x(x − 1)]_0^{ln 2} = e^{ln 2}(ln 2 − 1) − e⁰(0 − 1) = 2(ln 2 − 1) − (−1) = 2 ln 2 − 1 ≈ 0.3863
You can double-check any worked steps in the integral calculator.
Step-by-step solver·Exact symbolic engine
Interactive Calculus Problem Solver
Derivatives, antiderivatives, definite and improper integrals, and limits. Every answer comes with the rules used, and antiderivatives are verified by differentiating them back.
Input syntax
- Powers
x^2, rootssqrt(x),cbrt(x), absolute value|x| - Implicit multiplication works:
3x sin(2x) sin cos tan sec csc cot,asin acos atan,sinh cosh tanhe^xorexp(x);ln(x)is the natural log. In this solverlog(x)also means the natural log (the usual calculus convention); typelog10(x)for base 10- Constants
piande; bounds acceptinfand-inf
General polynomial times exponential integrals
For any general quadratic or higher polynomial multiplied by e^{kx}, use the tabular method. For example, consider ∫ (ax² + bx + c)e^{kx} dx. The tabular method remains the fastest method for this. Create two columns. Differentiate the polynomial terms until you reach zero. Simultaneously, repeatedly integrate e^{kx}. You will divide by k at each step. Summing the diagonal products with alternating signs gives the full antiderivative. This avoids separate integration steps for each power of x.
What common mistakes should you avoid?
- Choosing u = e^x instead of u = x. This raises the polynomial degree from x to x², making the remaining integral harder to solve. Always set u to the polynomial term when integrating polynomial-exponential products.
- Dropping the minus sign in the formula. The integration by parts formula requires subtracting the second integral. The formula is uv − ∫ v du. Writing xe^x + e^x is a common sign error. If you differentiate xe^x + e^x, you get xe^x + 2e^x. This does not equal xe^x.
- Omitting 1/a factors for e^{ax}. When integrating e^{ax}, remember that ∫ e^{ax} dx = (1/a)e^{ax}. For instance, integrating e^{3x} twice introduces a factor of 1/9, not 1/3.
- Integrating individual factors separately. Assuming that ∫ x e^x dx equals (x²/2)e^x is incorrect because integration does not distribute across products. Differentiating (x²/2)e^x gives x e^x + (x²/2)e^x.
- Failing to alternate signs in the tabular method. The tabular method requires strictly alternating signs. You must start with a positive sign. Also, a sign mistake on an intermediate row corrupts all subsequent terms.
- Do not forget to evaluate both parts in definite integrals. When you evaluate ∫_a^b u dv, remember to evaluate both parts. You must evaluate the uv product. Also, evaluate the remaining integral at the boundaries. You write this as [u v]_a^b − ∫_a^b v du. Leaving uv un-evaluated at the limits yields an incorrect numerical result.
- Avoid confusing x e^x with e^{x²}. You solve x e^x with integration by parts. However, e^{x²} has no elementary antiderivative. You solve x e^{x²} with u-substitution. For this, set u = x². Always check whether the exponent derivative matches the factor outside. This helps you pick the right technique.
Where is the integral of x·e^x used in practice?
The integral of x e^x appears frequently in probability, physics, and differential equations:

- Probability and Statistics: You can calculate the expected value (mean) of a continuous exponential distribution. This requires a rate parameter λ. Also, you must evaluate ∫_0^∞ x λ e^{-λx} dx. This simplifies to 1/λ. For example, if λ = 2, the expected waiting time is 1/2. Similarly, you must evaluate integrals of the form x² e^{-λx} to calculate variance or higher moments. You can solve these with repeated integration by parts.
- Differential Equations: When solving second-order linear differential equations, you may find repeated characteristic roots. If so, the second linearly independent solution takes the form y = x e^{rx}. Integrating forced response equations in linear systems requires evaluating terms. For example, you must evaluate ∫ x e^{rx} dx.
- Engineering and Physics: Calculating center of mass coordinates for regions bounded by exponential curves requires x e^x integrals. Also, in signal processing, the Laplace transform of t is L{t} = ∫_0^∞ t e^{-st} dt. You can evaluate this to 1/s² using integration by parts.
- Logarithmic Analogues: The integral of ln x uses the exact same parts framework. You set u = ln x and dv = dx.
Practice problems with step-by-step solutions
Test your understanding with these practice problems before checking the solutions.

- Evaluate ∫ x e^{3x} dx
- Next, Evaluate ∫_0^2 x e^x dx
- Evaluate ∫ (x + 1)e^x dx
- Also, Evaluate ∫ x e^{-2x} dx
- Evaluate ∫_0^1 x² e^x dx
- Then, Evaluate ∫ x e^{x/2} dx
Solutions:
- ∫ x e^{3x} dx: Set u = x, dv = e^{3x} dx. Then du = dx, v = (1/3)e^{3x}. Formula gives (x/3)e^{3x} − ∫ (1/3)e^{3x} dx = (x/3)e^{3x} − (1/9)e^{3x} + C = e^{3x}(x/3 − 1/9) + C.
- ∫_0^2 x e^x dx: Antiderivative is e^x(x − 1). At x = 2: e²(2 − 1) = e². At x = 0: e⁰(0 − 1) = −1. So, the result is: e² − (−1) = e² + 1.
- ∫ (x + 1)e^x dx: Set u = x + 1, dv = e^x dx. Then du = dx, v = e^x. Formula gives (x + 1)e^x − ∫ e^x dx = (x + 1)e^x − e^x + C = x e^x + C.
- ∫ x e^{-2x} dx: Set u = x. Also, let dv = e^{-2x} dx. Then du = dx. You will find that v = −(1/2)e^{-2x}. The formula gives −(x/2)e^{-2x} − ∫ −(1/2)e^{-2x} dx. This simplifies to −(x/2)e^{-2x} − (1/4)e^{-2x} + C. Therefore, the result is −e^{-2x}(x/2 + 1/4) + C.
- ∫_0^1 x² e^x dx: Apply parts twice or tabular method to get e^x(x² − 2x + 2). At x = 1: e¹(1 − 2 + 2) = e. At x = 0: e⁰(0 − 0 + 2) = 2. So, the result is: e − 2.
- ∫ x e^{x/2} dx: Set u = x, dv = e^{x/2} dx. Then du = dx, v = 2e^{x/2}. Formula gives 2x e^{x/2} − ∫ 2 e^{x/2} dx = 2x e^{x/2} − 4 e^{x/2} + C = 2 e^{x/2}(x − 2) + C.
Frequently asked questions
Can I use u-substitution to integrate x·e^x?
No, standard u-substitution fails for the integral of xe^x. There is no x² term in the exponent. Thus, it cannot produce the required differential x dx. Substitution works for expressions like x·e^(x²). However, the integral of xe^x requires integration by parts.
Is xe^x − e^x + C the same as e^x(x − 1) + C?
Yes, they are mathematically identical. Factoring out e^x from xe^x − e^x gives e^x(x − 1). This form is usually easier to evaluate. You can use it when substituting upper and lower limits in definite integrals.
How do you integrate x²·e^x?
You apply integration by parts twice, or use the tabular method. The resulting antiderivative is e^x(x² − 2x + 2) + C.
Why do you pick u = x instead of u = e^x?
Setting u = x simplifies the integrand. Differentiating x produces 1. This removes the polynomial factor. As a result, the integral of xe^x becomes simpler. However, setting u = e^x raises the power of x. This makes the integral more complicated.
What is the definite integral of x e^x from 0 to infinity?
The improper integral of xe^x from 0 to infinity diverges. Both factors, x and e^x, grow without bound. This occurs as x increases. However, the decaying version, ∫_0^∞ x e^{-x} dx, converges. It converges to exactly 1.
Further reading
- Integration by Parts (Paul’s Online Math Notes) — the derivation of the formula, many examples, and the tabular method.
- Integration Strategy (Paul’s Online Math Notes) — a checklist for deciding when parts, substitution or another technique fits.
Calculators for this topic
Keep learning
Integration Formulas and Integral Rules: Complete List
Every basic integration formula and integral rule: power, exponential, log, trig and inverse trig integrals, substitution, by parts and definite integrals.
Integrals Class 12: All Formulas, Methods and Solved Examples
Class 12 Integrals: standard formulas, substitution, partial fractions, integration by parts, special integrals and definite integral properties, solved.

