AP Calculus AB and BC

Integral of x e^(x^2): Answer, Proof, and Steps

The integral of x e^(x^2) is e^(x^2)/2 + C. Substituting u = x^2 gives du = 2x dx, so x dx = du/2 and the integral becomes one half times the integral of e^u. Differentiating e^(x^2)/2 gives (1/2) times 2x times e^(x^2), which is x e^(x^2).

xex2dx=ex22+C\int xe^{x^2}\,dx = \frac{e^{x^2}}{2} + C

The substitution, step by step

The integrand pairs ex2e^{x^2} with a factor of xx. Since the derivative of the inner function x2x^2 is 2x2x, that stray xx is exactly what a u-substitution needs.

u=x2dudx=2xxdx=du2u = x^2 \quad\Longrightarrow\quad \frac{du}{dx} = 2x \quad\Longrightarrow\quad x\,dx = \frac{du}{2}

Replace x2x^2 with uu and xdxx\,dx with du2\frac{du}{2}, then pull the constant outside.

xex2dx=eudu2=12eudu=12eu+C\int xe^{x^2}\,dx = \int e^{u}\cdot\frac{du}{2} = \frac{1}{2}\int e^{u}\,du = \frac{1}{2}e^{u} + C

Substituting u=x2u = x^2 back gives the answer in the original variable.

xex2dx=ex22+C\int xe^{x^2}\,dx = \frac{e^{x^2}}{2} + C

The x is not optional

Substitution works here only because the factor xx matches the derivative of x2x^2 up to the constant 22. Without that xx, the integral ex2dx\int e^{x^2}\,dx has no elementary antiderivative.

Checking by differentiating

Differentiate the result with the chain rule and confirm the xx returns.

ddx(ex22)=12ex22x=xex2\frac{d}{dx}\left(\frac{e^{x^2}}{2}\right) = \frac{1}{2}\cdot e^{x^2}\cdot 2x = xe^{x^2}

The chain rule brings out the inner derivative 2x2x, and that 22 cancels the 12\frac{1}{2}, leaving xex2xe^{x^2} exactly.

Common mistakes

  • Forgetting the 12\frac{1}{2}. Without it the derivative is 2xex22xe^{x^2}, twice the integrand.
  • Trying the power rule on the exponent. The variable sits in the exponent, so there is no power of xx to raise.
  • Attempting to integrate ex2e^{x^2} on its own. That has no elementary antiderivative; the outer xx is what makes this integral doable.

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

Why can you integrate x e^(x^2) but not e^(x^2)?

Because the extra factor xx matches the derivative of the exponent x2x^2, which is 2x2x. That match lets u=x2u = x^2 absorb the xdxx\,dx. Plain ex2e^{x^2} has no such factor and no elementary antiderivative.

What is the integral of x e^(x^2) from 0 to 1?

01xex2dx=[ex22]01=e12\int_0^1 xe^{x^2}\,dx = \left[\frac{e^{x^2}}{2}\right]_0^1 = \frac{e - 1}{2}.

What u do you choose for x e^(x^2)?

Let u=x2u = x^2, the exponent. Then du=2xdxdu = 2x\,dx, so xdx=du2x\,dx = \frac{du}{2}, and the integral becomes 12eudu=ex22+C\frac{1}{2}\int e^u\,du = \frac{e^{x^2}}{2} + C.