Calculus

Why Some Simple Functions Have No Elementary Antiderivative

Why integrals like e^(-x²) cannot be written with school functions, how that is proved, and what to do instead.

Key takeaways

  • Every continuous function on an interval has an antiderivative, given by its accumulated integral.
  • An elementary function is one built from algebraic functions, exponentials, logarithms and trigonometric functions by arithmetic and composition.
  • Liouville's theory shows that e^(−x²), eˣ/x and 1/ln x, among others, have no elementary antiderivative.
  • You can still compute these integrals to high accuracy with series, numerical rules or named special functions.

Some functions that look perfectly ordinary, such as e^(−x²), have antiderivatives that cannot be written using the familiar functions of algebra, trigonometry, exponentials and logarithms. The antiderivative exists. It is the toolbox of formulas that is too small to express it.

This is a proven fact, not a gap waiting for a clever student. Joseph Liouville laid the foundations for proving such statements in the 1830s, and the idea behind the best known case is within reach of anyone who knows the product rule.

What "elementary" means

An elementary function is anything you can assemble in finitely many steps from constants and x using addition, subtraction, multiplication, division, roots and solutions of polynomial equations, exponentials, logarithms, and composition. Trigonometric functions and their inverses are included, since with complex numbers they can be expressed through exponentials and logarithms.

So sin(e^(x²)) + ln(1 + √x) is elementary, however unpleasant it looks.

The class is closed under differentiation. The chain, product and quotient rules always turn an elementary formula into another one. Integration has no such property. Differentiating is a mechanical routine, while antidifferentiating is a search that may have no answer inside the class.

The antiderivative still exists

Take f(x) = e^(−x²). It is continuous everywhere, so by the fundamental theorem of calculus the function

F(x) = ∫₀ˣ e^(−t²) dt

is well defined and satisfies F′(x) = e^(−x²). You can graph it, tabulate it and compute with it. It rises steadily, passes through 0 at the origin and levels off as x grows.

The only thing missing is an expression for F in the older vocabulary. The same situation arises earlier in your education: 1/x is a simple function, yet no rational function has it as a derivative. If you had never met the logarithm, you would have to invent it, and you could define it as exactly such an integral.

Integrand Elementary antiderivative? Name often given to the integral
e^(−x²) No Error function, after scaling
(sin x)/x No Sine integral
1/ln x No Logarithmic integral
sin(x²) No Fresnel integral, up to scaling conventions
eˣ/x No Exponential integral
√(1 − k² sin²θ), with 0 < k < 1 No Elliptic integral

Close relatives behave completely differently. The function x e^(−x²) integrates at once to −e^(−x²)/2 by substitution. The function (ln x)/x integrates to (ln x)²/2. A single extra factor can open or close the door.

This is why guessing from appearance is unreliable. Length or complexity of the integrand tells you little.

Liouville's insight

Liouville asked what an elementary antiderivative could possibly look like, if one existed. Differentiation preserves exponentials: the derivative of R·e^g still contains e^g. It destroys a logarithm only when that logarithm appears by itself, multiplied by a constant. So the shape of any answer is tightly restricted.

For integrands of the form f·e^g, where f and g are rational functions and g is not constant, his result takes a clean form. An elementary antiderivative exists exactly when there is a rational function R such that the antiderivative is R·e^g. Differentiating gives the condition:

(R e^g)′ = (R′ + g′R) e^g
so we need:   R′ + g′R = f

A question about all possible formulas has become a question about one rational function.

How the impossibility proof for e^(-x²) works
1 Restrict the form Any elementary answer must be R times e^(-x²) 2 Differentiate This requires R′ − 2xR = 1 3 Rule out poles R cannot have a denominator that vanishes 4 Compare degrees A polynomial R cannot balance the two sides 5 Conclude No such R, so no elementary antiderivative Restrict the form Any elementary answer must be R times e^(-x²) 1 Differentiate This requires R′ − 2xR = 1 2 Rule out poles R cannot have a denominator that vanishes 3 Compare degrees A polynomial R cannot balance the two sides 4 Conclude No such R, so no elementary antiderivative 5

The proof for the bell curve

Apply the condition with f = 1 and g = −x². We need a rational function R with:

R′(x) − 2x·R(x) = 1

First, suppose R has a pole, a point (possibly complex) where its denominator vanishes and it blows up like 1/(x − p)^m with m ≥ 1. Then R′ blows up like 1/(x − p)^(m+1), which is strictly worse. The term 2xR blows up at most like order m, so it cannot cancel R′. The left side would then be unbounded near p, while the right side is 1. So R has no poles and is a polynomial.

Second, R is not zero, since that would give 0 = 1. If R is a nonzero polynomial of degree n, then 2xR has degree n + 1 and R′ has degree at most n − 1. The left side has degree n + 1, at least 1, but the right side has degree 0.

Neither option works. Given Liouville's theorem, which carries the heavy lifting, e^(−x²) has no elementary antiderivative.

The same method handles eˣ/x, where the condition is R′ + R = 1/x. A pole of R at 0 would create a pole of order at least 2 on the left. Without a pole at 0, the left side stays bounded there. Both are impossible.

How impossibility spreads

Once you know one integral is not elementary, substitution and parts hand you many more. The logic is simple: if a reversible step turns integral A into integral B plus elementary terms, then A is elementary exactly when B is.

Take 1/ln x for x > 1. Put x = e^t, so dx = e^t dt, and the integral becomes ∫ e^t/t dt. The two entries in the table are the same obstacle in different dress. The same substitution idea applied to ∫ e^(eˣ) dx, with u = eˣ, gives ∫ e^u/u du again, so that one is not elementary either.

Integration by parts produces another pair:

∫ x² e^(−x²) dx = −x e^(−x²)/2 + (1/2) ∫ e^(−x²) dx
∫ ln(ln x) dx   = x ln(ln x) − ∫ dx/ln x

Neither left side can be elementary. In contrast, x³e^(−x²) has the antiderivative −(x² + 1)e^(−x²)/2, as you can confirm by differentiating. The even power leaves the bad integral behind, while the odd power lets it drop out.

A sum of two non-elementary integrals can also be elementary. The functions 1/ln x and −1/(ln x)² together integrate to x/ln x, although neither does so alone.

What to do instead

You have several good options, and which is best depends on what you need.

Expand in a series. Replace the exponential by its power series and integrate term by term, which is legitimate for a convergent power series inside its interval of convergence:

∫₀ˣ e^(−t²) dt = x − x³/3 + x⁵/10 − x⁷/42 + x⁹/216 − …

At x = 1, the terms shown plus the next one, −1/1320, give about 0.74673. Adding two more terms gives about 0.74682. Because the series alternates with shrinking terms, the error is smaller than the first term you leave out.

Use a numerical rule. Simpson's rule with just four subintervals gets this same value to about four decimal places.

Use a named function. The error function is defined as erf(x) = (2/√π) times the integral above. Scientific software evaluates it as readily as a sine.

Some definite integrals are still exact

The absence of an antiderivative formula does not mean every definite integral is mysterious. The integral of e^(−x²) over the whole real line equals √π exactly. The standard proof squares the integral, views the result as a double integral over the plane and switches to polar coordinates, where the missing factor of r appears.

Likewise, the integral of (sin x)/x from 0 to infinity equals π/2. Special limits can have beautiful values even when general ones do not. These whole-line and half-line cases are improper integrals. The first one is the reason the normal distribution carries a factor involving √(2π), while its cumulative probabilities come from tables or software.

Can a computer decide?

To a large extent, yes. In the late 1960s Robert Risch described a procedure that, for a broad class of elementary integrands, either produces an elementary antiderivative or proves that none exists. It rests on Liouville's theorem.

There are practical and theoretical limits. A full implementation is long and intricate, and the procedure depends on being able to tell whether certain constant expressions equal zero, which is not always straightforward. When computer algebra software returns your integral unevaluated, that alone is not a proof of impossibility.

Misconceptions worth clearing up

  • "It cannot be integrated." It can. A continuous function is integrable, and its integrals have definite values.
  • "Nobody has found the formula yet." For the examples above, it is proven that no elementary formula exists.
  • "Numerical answers are second best." Values of sin 1 or ln 2 are also computed approximately. The difference is familiarity.
  • "A better substitution might work." No sequence of substitutions or integrations by parts can produce something that does not exist.

"Closed form" is always relative to a list of permitted functions. Add erf to the list, and e^(−x²) becomes easy. Some other integral will then be the one that falls outside, and the subject known as differential Galois theory studies exactly where those boundaries lie, in a spirit close to the classical question of which polynomial equations can be solved by radicals.

Written for 4Mathematics with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 39 articles in Calculus →

Latest news on this topic