Integral of e^(x²): Why There Is No Simple Formula
e^(x²) and e^(−x²) have no elementary antiderivative. Learn the erf and erfi functions, the power series answer and why ∫e^(−x²) over ℝ is √π.
Exponential and log integrals Updated 3 min read
At a glance
- Antiderivative
- Not elementary. \int e^{x^2}\,dx = \frac{\sqrt{\pi}}{2}\operatorname{erfi}(x) + C
- Bell curve version
- \int e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}\operatorname{erf}(x) + C
- Gaussian integral
- \int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}
- Series form
- \int e^{x^2}\,dx = \sum_{n=0}^{\infty}\frac{x^{2n+1}}{n!\,(2n+1)} + C
- From 0 to 1
- \int_0^1 e^{x^2}\,dx \approx 1.4627 and \int_0^1 e^{-x^2}\,dx \approx 0.7468
On this page
e^{x^2} has no elementary antiderivative, and neither does the bell curve e^{-x^2}. No formula built from powers, roots, exponentials, logs and trig functions has either one as its derivative. The antiderivatives still exist, and they have names:
And one famous definite integral has an exact value:
Graph of e^(x²) and e^(−x²)
Why the usual methods fail
- Substitution. u = x^2 needs du = 2x\,dx, and there is no x to supply it. Compare \int xe^{x^2}\,dx = \frac{1}{2}e^{x^2} + C, which works.
- Dividing by the inside derivative. That shortcut only works for a constant inside slope, as in the integral of e²ˣ. Here the slope 2x changes.
- Integration by parts. Every choice of u and dv leads to a harder integral.
This is not bad luck. Joseph Liouville proved in the 1830s that \int e^{x^2}\,dx cannot be written in elementary terms. Other functions in the same family include \frac{\sin x}{x} and \frac{1}{\ln x}.
The error function
Since the antiderivative exists but has no formula, it gets its own name. The error function is
The factor \frac{2}{\sqrt{\pi}} is chosen so that \operatorname{erf}(x) \to 1 as x \to \infty. By the Fundamental Theorem of Calculus, Part 1, its derivative is \frac{2}{\sqrt{\pi}}e^{-x^2}, which gives the formula above. The imaginary error function \operatorname{erfi}(x) = \frac{2}{\sqrt{\pi}}\int_0^x e^{t^2}\,dt plays the same role for e^{x^2}.
The error function is everywhere in statistics, since the normal distribution is a stretched copy of e^{-x^2}. Your calculator's normal-distribution function is computing erf behind the scenes.
The power series answer
You can always get an antiderivative as a series. Start from e^u = \sum_{n=0}^\infty \frac{u^n}{n!} with u = x^2, then integrate term by term:
The series converges for every x. For e^{-x^2} the signs alternate: x - \frac{x^3}{3} + \frac{x^5}{10} - \frac{x^7}{42} + \cdots
Check by differentiating. The derivative of \frac{x^{2n+1}}{n!(2n+1)} is \frac{x^{2n}}{n!} = \frac{(x^2)^n}{n!}, and the sum of those is e^{x^2}.
Worked examples
Example 1: a definite integral by series. Put x = 1 into the series:
Example 2: the bell curve from 0 to 1. The alternating series gives
Since the series alternates, the error after stopping is smaller than the first term left out.
Example 3: the Gaussian integral. Call I = \int_{-\infty}^{\infty}e^{-x^2}\,dx. Multiply two copies, one in x and one in y, and switch to polar coordinates, where dx\,dy = r\,dr\,d\theta:
The extra r is exactly the factor that makes u = r^2 work. So I = \sqrt{\pi}. The polar double integrals lesson covers the change of coordinates.
Example 4: a scaled bell curve. With x = \frac{t}{\sqrt{a}}, \int_{-\infty}^{\infty}e^{-at^2}\,dt = \sqrt{\frac{\pi}{a}} for a > 0.
Common mistakes
- Writing \frac{e^{x^2}}{2x} + C. Differentiate it and you will see it does not work.
- Assuming every integral has a formula. Some do not. On a test, a definite integral of e^{x^2} usually means "use a series" or "use a calculator".
- Mixing up e^{x^2} and (e^x)^2. (e^x)^2 = e^{2x}, which integrates to \frac{1}{2}e^{2x}. e^{x^2} means e raised to x^2.
- Forgetting the x test. If the integrand is xe^{x^2} or xe^{-x^2}, a simple substitution works.
For series techniques, see the Taylor series guide. For the simpler exponentials, see the integral of eˣ and the integral of e⁻ˣ.
Practice it now
Common Maclaurin series
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