AP Calculus BC

Integral of x e^-x: Parts and Three Minus Signs

The integral of x times e to the negative x is minus the quantity x plus one, times e to the negative x, plus C. Integration by parts with u equal to x is what does it, and the three minus signs that appear along the way are where nearly every wrong answer comes from.

xexdx=(x+1)ex+C\int xe^{-x}\,dx = -\left(x+1\right)e^{-x} + C

Parts with u = x

The polynomial factor is the one that gets simpler when differentiated, so it becomes uu. Take u=xu = x and dv=exdxdv = e^{-x}dx, which gives du=dxdu = dx and v=exv = -e^{-x}. The minus sign in vv is the first of the three.

xexdx=xex(ex)dx=xexex+C\int xe^{-x}\,dx = -xe^{-x} - \int\left(-e^{-x}\right)dx = -xe^{-x} - e^{-x} + C

The leftover integral exdx\int e^{-x}dx is itself ex-e^{-x}, which is the third minus sign. Factoring ex-e^{-x} out of both terms gives the form worth remembering.

xexdx=(x+1)ex+C\int xe^{-x}\,dx = -\left(x+1\right)e^{-x} + C

The improper integral underneath

This integrand is the reason 0xexdx\int_{0}^{\infty} xe^{-x}\,dx shows up so often. The antiderivative is bounded at infinity because exe^{-x} shrinks faster than x+1x+1 grows, so the limit exists.

0xexdx=limb[(x+1)ex]0b=0(1)=1\int_{0}^{\infty} xe^{-x}\,dx = \lim_{b\to\infty}\left[-\left(x+1\right)e^{-x}\right]_{0}^{b} = 0 - \left(-1\right) = 1

Why the limit is zero

As x grows, (x+1)e^(-x) is a linear function fighting an exponential decay, and the exponential always wins. That single fact is what makes the area under x e^(-x) from 0 to infinity finite, and it equals exactly 1.

The mistakes students make

The structure of this problem is rarely the issue. The signs are.

  • Using v=exv = e^{-x} instead of v=exv = -e^{-x}. That produces xex+ex+Cxe^{-x} + e^{-x} + C, which is (x+1)ex\left(x+1\right)e^{-x}: the correct shape with every sign reversed.
  • Losing the minus sign inside the second integral and answering xex+ex+C-xe^{-x} + e^{-x} + C. Differentiating that gives xex2exxe^{-x} - 2e^{-x}, not the integrand.
  • Choosing u=exu = e^{-x} and dv=xdxdv = x\,dx, which leaves x22exdx\int\frac{x^{2}}{2}e^{-x}dx, a harder integral than the original.

Every answer on this page is machine checked

An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.

Frequently asked questions

What is the integral of x e^-x?

It is (x+1)ex+C-\left(x+1\right)e^{-x} + C. Differentiating that product returns xexxe^{-x}, which is the fastest way to confirm the signs.

Why is u = x and not u = e^-x?

Because xx differentiates down to 11 and clears the polynomial factor in one step. Taking u=exu = e^{-x} raises the power of xx instead and makes the remaining integral worse.

What is the integral of x e^-x from 0 to infinity?

It is 11. The antiderivative (x+1)ex-\left(x+1\right)e^{-x} tends to 00 as xx\to\infty and equals 1-1 at x=0x = 0.