The antiderivatives of certain elementary functions cannot themselves be expressed as elementary functions. A standard example of such a function is whose antiderivative is (with a multiplier of a constant) the error function, familiar from statistics. Other examples include the functions and .

Liouville's theorem states that elementary antiderivatives, if they exist, must be in the same differential field as the function, plus possibly a finite number of logarithms.

This has the form of a logarithmic derivative. Intuitively, one may think of t as the logarithm of some element s of F, in which case, this condition is analogous to the ordinary chain rule. But it must be remembered that F is not necessarily equipped with a unique logarithm; one might adjoin many "logarithm-like" extensions to F. Similarly, an exponential extension is a simple transcendental extension that satisfies

Dt = tDs.

With the above caveat in mind, this element may be thought of as an exponential of an element s of F. Finally, G is called an elementary differential extension of F if there is a finite chain of subfields from F to G where each extension in the chain is either algebraic, logarithmic, or exponential.

Suppose F and G are differential fields, with Con(F) = Con(G), and that G is an elementary differential extension of F. Let a be in F, y in G, and suppose Dy = a (in words, suppose that G contains an antiderivative of a). Then there exist c1, ..., cn in Con(F), u1, ..., un, v in F such that

In other words, the only functions that have "elementary antiderivatives" (i.e. antiderivatives living in, at worst, an elementary differential extension of F) are those with this form prescribed by the theorem. Thus, on an intuitive level, the theorem states that the only elementary antiderivatives are the "simple" functions plus a finite number of logarithms of "simple" functions.

A proof of Liouville's theorem can be found in section 12.4 of Geddes, et al.

The function , which exists in C(x), does not have an antiderivative in C(x). Its antiderivatives ln x + C do, however, exist in the logarithmic extension C(x, ln x).

Likewise, the function does not have an antiderivative in C(x). Its antiderivatives tan−1(x) + C do not seem to satisfy the requirements of the theorem, since they are not (apparently) sums of rational functions and logarithms of rational functions. However, a calculation with Euler's formula shows that in fact the antiderivatives can be written in the required manner (as logarithms of rational functions).

Liouville's theorem is sometimes presented as a theorem in differential Galois theory, but this is not strictly true. The theorem can be proved without any use of Galois theory. Furthermore, the Galois group of a simple antiderivative is either trivial (if no field extension is required to express it), or is simply the additive group of the constants (corresponding to the constant of integration). Thus, an antiderivative's differential Galois group does not encode enough information to determine if it can be expressed using elementary functions, the major condition of Liouville's theorem.