7

I know that this has been asked many times, but I am very interested in the indefinite integral of $e^{-x^2}$. It is stated and proved that there is not elementary way to solve this. So does this imply the fact that there is a way to solve this integral. Has this been done before? Since this is a continuous function, I presume that it must have a solution. Can someone direct me to where I can find the solution to this? I have looked everywhere and I get it in terms of the error function.

  • This is an example of an integral which defines a function, but does not have an expression which can be written in terms of polynomials, "trigonometric" (including hyperbolic) functions, radicals of polynomials, other exponential functions, or logarithmic functions, etc. This is why it's called a "non-elementary" anti-derivative. – colormegone Aug 11 '15 at 01:38
  • @RecklessReckoner What does it mean to be non-elementary? – idealmathematician Aug 11 '15 at 01:39
  • I don't think there is an elementary solution. The "trick" that allows one to compute $\int_{-\infty}^{\infty}{e^{-x^2}}$ cannot be used for the indefinite integral, i.e. for finite limits of integration. – Marconius Aug 11 '15 at 01:40
  • The list I gave constitute what are called the "elementary functions" for historical reasons; see, for instance, https://en.wikipedia.org/wiki/Elementary_function – colormegone Aug 11 '15 at 01:40
  • @RecklessReckoner So there must be a way using non-elementary methods to calculate this integral. Right? – idealmathematician Aug 11 '15 at 01:41
  • That is not what "elementary" means in this context. This is why I said the integral is used to define a particular function, the so-called Gaussian "error function". The anti-derivative can be described by an infinite series, for example, but there is not some way to express this anti-derivative finitely. Another simple example of such an integral is $$ \int \ \frac{\sin x}{x} \ \ dx \ \ = \ \ Si(x) \ \ . $$ This is a definition for a function, but there is not some other finite way to express the result. – colormegone Aug 11 '15 at 01:44
  • it was a competition at ENS France in 1995 that you can see here : http://pomux.free.fr/corriges-1995/pdf/m95lm1ea.pdf But you can begin by : https://en.wikipedia.org/wiki/Liouville%27s_theorem_(differential_algebra) – Hamza Aug 11 '15 at 01:46
  • An elementary function is one that is built out of polynomials, constants, $+$, $-$, $\times$, $\div$, exponents, roots, logarithms, and trigonometric functions. This integral is not an elementary function. – Akiva Weinberger Aug 11 '15 at 01:50
  • 2
    Nobody said anything about elementary methods! The problem is that it's not an elementary function, as defined above. – Akiva Weinberger Aug 11 '15 at 01:51

5 Answers5

10

It depends what you mean by "solution". It should be noted that it is easy to compute $\int_{0}^k e^{-x^2}\,dx$ for any $k$ - the integrand is well behaved, so you can just compute it numerically. If you choose a fine enough covering and use a Riemann sum, you can get as accurate an evaluation as you want. And this isn't too different from more familiar examples - I'll bet you wouldn't have much more luck computing $\cos(1)$ than $\operatorname{erf}(1)$ if you weren't allowed a computer. Yes, it's not in the familiar forms, but that's precisely what "no elementary solution" means - we just can't express analytically it with our usual machinery (to be precise, it cannot be written using addition, multiplication, subtraction, division, exponentiation, logarithms, trigonometric functions, and constants)

For a slightly more sophisticated approach, one might notice that $e^{-x^2}$ has a nice Taylor series: $$e^{-x^2}=\sum_{i=0}^{\infty}\frac{(-1)^ix^{2i}}{i!}$$ so its integral has a nice Taylor series too $$\int_{0}^ke^{-x^2}\,dx = \sum_{i=0}^{\infty}\frac{(-1)^ik^{2i+1}}{i!\cdot (2i+1)}$$ which makes it easy to evaluate - just sum up a lot of those terms until you get the desired precision - plus, it's easy to find explicit bounds and show that convergence is reasonably quick, since consecutive terms will eventually be decreasing by a ratio of $2$ due to the factorial growth of the denominator and the only exponential growth of the numerator.

But generally, we just hide all this behind the error function - we don't care how we evaluate, we just know that we can do so efficiently. Just the same as any function like $\log$ or $\sin$ or $e^x$ that we might consider more elementary.

Milo Brandt
  • 60,888
6

The Error Function is defined as the integral

$$\text{erf}(x)=\dfrac{2}{\sqrt{\pi}}\int_0^xe^{-t^2}\,dt=\dfrac{1}{\sqrt{\pi}}\int_{-x}^xe^{-t^2}\,dt$$

which has no representation in terms of elementary functions as proven by Liouville.

A very robust expansion of the error function that converges much more rapidly than a Taylor series is given by the Burmann Series

$$\text{erf}(x)=\frac{2}{\sqrt{\pi}}\text{sgn}(x)\sqrt{1-e^{-x^2}}\left(\frac{\sqrt{\pi}}{2}+\sum_{k=1}^{\infty}c_ke^{-kx^2}\right)$$

where the first two terms are $c_1=\dfrac{31}{200}$ and $c_2=-\dfrac{341}{8000}$. In fact, this series is so robust that using only the first two terms yields a maximum relative error of less than $3.7\times 10^{-3}$. Thus, we can write

$$\bbox[5px,border:2px solid #C0A000]{\text{erf}(x)\approx \frac{2}{\sqrt{\pi}}\text{sgn}(x)\sqrt{1-e^{-x^2}}\left(\frac{\sqrt{\pi}}{2}+\dfrac{31}{200}e^{-x^2}-\dfrac{341}{8000}e^{-2x^2}\right)}$$

It is well-known that the error function tends has the following limit given by the improper integral

$$\dfrac{1}{\sqrt{\pi}}\int_{-\infty}^{\infty}e^{-t^2}dt=1$$

and is related to the Cumulative Normal Distribution Function $\Phi(x)$ through the relationship

$$\Phi(x)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^xe^{-t^2/2}dt=\frac12 \text{erf}\large(\frac{x}{\sqrt{2}}\large)+\frac12$$

Therefore, the error function is implicated often in statistical analysis for which random variables are normally distributed. Inasmuch as solution to the Heat-Diffusion Equation is also a solution to the Feynman-Kac Equation, which is a Stochastic Differential Equation governed by a Wiener Process, the error function is intimately embedded into the process of thermal diffusion.

Mark Viola
  • 179,405
5

Since you mention indefinite integral of $e^{-x^{2}} $, I assume you are talking about antiderivative $\displaystyle \int_{-\infty}^{+\infty }e^{-x^{2}} \, dx$, and not about Gaussian Integral $ \displaystyle \int_{-\infty}^{+\infty }e^{-x^{2}} \, dx$.

As you probably already know, antiderivative of $e^{-x^{2}} $ cannot be expressed in elementary functions. It is closely related to so-called Error Function defined as $\displaystyle \operatorname{erf} x = \frac{2}{\sqrt{\pi}} \int_{0}^{x} e^{-t^{2}} \, dt $.

The simplest way to compute an explicit expression for antiderivative of $e^{-x^{2}} $ is to expand the exponent into Taylor series and to integrate the series element wise. Denote $t: =-x^2 $, then

$$ e^{-x^{2}} = e^{t} = \sum_{n=0}^{\infty} \frac{t^n}{n!} = \sum_{n=0}^{\infty} \frac{\left( -x^2\right) ^n}{n!} = \sum_{n=0}^{\infty} \frac{\left( -1\right)^n}{n!} x^{2n}, \\ \int e^{-x^{2}} \, dx = \int \sum_{n=0}^{\infty} \frac{\left( -1\right)^n}{n!} x^{2n} \, dx = \sum_{n=0}^{\infty} \frac{\left( -1\right)^n}{n!} \int x^{2n} \, dx = \sum_{n=0}^{\infty} \frac{\left( -1\right)^n}{n!} \frac{x^{2n+1}}{2n+1}. $$

Thus, one possible explicit expression of antiderivative of $ e^{-x^{2}}$ is given as its Taylor series: $$ \bbox[5px, border:2.5px solid #FF0000]{\ \color{black}{\int e^{-x^{2}} \, dx = \sum_{n=0}^{\infty} \frac{\left( -1\right)^n}{n!} \frac{x^{2n+1}}{2n+1}}} \ = x - \frac{x^3}{3} + \frac{x^5}{10} - \frac{x^7}{42} + \frac{x^9}{216} - \dots $$

Vlad
  • 6,710
3

An elementary function is one that is built out of polynomials, constants, $+$, $-$, $\times$, $\div$, exponents, roots, logarithms, and trigonometric functions. This integral is not an elementary function.

Nobody said anything about elementary methods! The problem is that it's not an elementary function, as defined above.

A simple example on a nonelementary function is the factorial function $!$, with domain $\mathbb N$. (I don't know a proof that it's nonelementary, unfortunately…) The factorial function can be extended to all of the reals using the Gamma function.

3

As already said, the indefinite integral of $e^{-x^2}$ cannot be expressed on the form of a finite number of elementary functions. This is the case of the vast majority of the indefinite integrals. However, some of them are especially useful in maths or physics and one attributes a specific name to those which are frequently encountered, for example : Error function, Bessel functions, Gamma function and many others.

The approach is similar to the old case of the indefinite integral of the function $\frac{1}{x}$ to which the name of "logarithm" was attributed. The difference is that "logarithm" is so commonly used and is so usefull that it is now considered as an elementary function.

The non-elementary functions which are well-known, recorded and doccumented are referred as "special functions" : A discussion for general public can be found pp.18-36 in : https://fr.scribd.com/doc/14623310/Safari-on-the-country-of-the-Special-Functions-Safari-au-pays-des-fonctions-speciales

JJacquelin
  • 66,221
  • 3
  • 37
  • 87