# Liouville's theorem (differential algebra)

In mathematics, Liouville's theorem, originally formulated by French mathematician Joseph Liouville in 1833 to 1841, places an important restriction on antiderivatives that can be expressed as elementary functions.
The antiderivatives of certain elementary functions cannot themselves be expressed as elementary functions. These are called nonelementary antiderivatives. A standard example of such a function is $e^{-x^{2}},$ whose antiderivative is (with a multiplier of a constant) the error function, familiar from statistics. Other examples include the functions ${\frac {\sin(x)}{x}}$ and $x^{x}.$
Liouville's theorem states that elementary antiderivatives, if they exist, are in the same differential field as the function, plus possibly a finite number of applications of the logarithm function.

## Definitions

For any differential field $F,$ the constants of $F$ is the subfield $\operatorname {Con} (F)=\{f\in F:Df=0\}.$ Given two differential fields $F$ and $G,$ $G$ is called a logarithmic extension of $F$ if $G$ is a simple transcendental extension of $F$ (that is, $G=F(t)$ for some transcendental $t$) such that $Dt={\frac {Ds}{s}}\quad {\text{ for some }}s\in F.$
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. However, $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 ${\frac {Dt}{t}}=Ds\quad {\text{ for some }}s\in F.$
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.

## Basic theorem

Suppose $F$ and $G$ are differential fields with $\operatorname {Con} (F)=\operatorname {Con} (G),$ and that $G$ is an elementary differential extension of $F.$ Suppose $f\in F$ and $g\in G$ satisfy $Dg=f$ (in words, suppose that $G$ contains an antiderivative of $f$). Then there exist $c_{1},\ldots ,c_{n}\in \operatorname {Con} (F)$ and $f_{1},\ldots ,f_{n},s\in F$ such that $f=c_{1}{\frac {Df_{1}}{f_{1}}}+\dotsb +c_{n}{\frac {Df_{n}}{f_{n}}}+Ds.$
In other words, the only functions that have "elementary antiderivatives" (that is, antiderivatives living in, at worst, an elementary differential extension of $F$) are those with this form. 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. See Lützen's scientific bibliography for a sketch of Liouville's original proof (Chapter IX. Integration in Finite Terms), its modern exposition and algebraic treatment (ibid. §61).

## Examples

As an example, the field $F:=\mathbb {C} (x)$ of rational functions in a single variable has a derivation given by the standard derivative with respect to that variable. The constants of this field are just the complex numbers $\mathbb {C} ;$ that is, $\operatorname {Con} (\mathbb {C} (x))=\mathbb {C} ,$
The function $f:={\tfrac {1}{x}},$ which exists in $\mathbb {C} (x),$ does not have an antiderivative in $\mathbb {C} (x).$ Its antiderivatives $\ln x+C$ do, however, exist in the logarithmic extension $\mathbb {C} (x,\ln x).$
Likewise, the function ${\tfrac {1}{x^{2}+1}}$ does not have an antiderivative in $\mathbb {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 $e^{i\theta }=\cos \theta +i\sin \theta$ shows that in fact the antiderivatives can be written in the required manner (as logarithms of rational functions). ${\begin{aligned}e^{2i\theta }&={\frac {e^{i\theta }}{e^{-i\theta }}}={\frac {\cos \theta +i\sin \theta }{\cos \theta -i\sin \theta }}={\frac {1+i\tan \theta }{1-i\tan \theta }}\\\theta &={\frac {1}{2i}}\ln \left({\frac {1+i\tan \theta }{1-i\tan \theta }}\right)\\\tan ^{-1}x&={\frac {1}{2i}}\ln \left({\frac {1+ix}{1-ix}}\right)\end{aligned}}$

## Relationship with differential Galois theory

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.