Calculus · real student question

Find the integral of e^(-x^2) with respect to x.

Question

Find

ex2dx\int e^{-x^{2}}\,dx

Step-by-step solution

  1. Try the obvious substitution and see it fail. Setting u=x2u=-x^{2} gives du=2xdxdu=-2x\,dx, but there is no xx factor in the integrand to absorb, so the substitution cannot be completed. Integration by parts also loops without ever simplifying. This is not a lack of cleverness: the failure is structural.

  2. Know the theoretical statement. By Liouville theorem on integration in finite terms, ex2e^{-x^{2}} has no elementary antiderivative — none can be written with polynomials, roots, exponentials, logarithms and trigonometric functions in finitely many operations. Compare xex2dx=12ex2+C\int xe^{-x^{2}}dx=-\tfrac12e^{-x^{2}}+C, which is elementary precisely because the extra xx makes the substitution work.

  3. Introduce the error function as a definition. Mathematicians name the missing antiderivative:

    erf(x)=2π0xet2dt\operatorname{erf}(x)=\frac{2}{\sqrt{\pi}}\int_{0}^{x}e^{-t^{2}}\,dt

    The prefactor 2π\tfrac{2}{\sqrt{\pi}} is chosen so that erf()=1\operatorname{erf}(\infty)=1, which makes erf a probability in statistics.

  4. Invert the definition to answer the question. Differentiating the definition gives erf(x)=2πex2\operatorname{erf}'(x)=\tfrac{2}{\sqrt{\pi}}e^{-x^{2}}, so multiplying by π2\tfrac{\sqrt{\pi}}{2} undoes the normalisation:

    ex2dx=π2erf(x)+C\int e^{-x^{2}}\,dx=\frac{\sqrt{\pi}}{2}\operatorname{erf}(x)+C

  5. Contrast with the definite integral over the whole line. Although no elementary antiderivative exists, the definite integral is famously exact:

    ex2dx=π\int_{-\infty}^{\infty}e^{-x^{2}}dx=\sqrt{\pi}

    obtained by squaring and switching to polar coordinates. Having a closed-form definite integral is entirely compatible with having no closed-form indefinite one.

Answer

ex2dx=π2erf(x)+C\int e^{-x^{2}}\,dx=\frac{\sqrt{\pi}}{2}\operatorname{erf}(x)+C

Need to solve a different problem like this? Open the solver →