enter image description here

I have this integral that I am trying to evaluate by hand, but I am encountering some difficulties. According to Wolfram Alpha, the answer seems to be:

enter image description here

However, I do not understand how they got the indefinite integral. What integration technique should be used to approach this problem? Could anyone explain how to find the definite integral with work? All help would be greatly appreciated.

  • 2
    $\begingroup$ Try to complete the square with the quadratic function in the argument of the exponential first. Then relate it to an error functions (This integral does not have a closed form anti-derivative in terms of simple functions). $\endgroup$ Apr 10 '14 at 3:56
  • $\begingroup$ If you want to integrate $e^{-x^2}$, you're gonna have a bad time. $\endgroup$
    – Ian Coley
    Apr 10 '14 at 3:56
  • 1
    $\begingroup$ Note that $e^{\frac {2x-x^2}{2}}=e^{-\frac {(x-1)^2}{2}}\cdot e^{\frac 12}$ $\endgroup$ Apr 10 '14 at 3:58

If we complete the square in the exponent, we have

$$\frac 1 2(2x - x^2) = \frac 1 2 \Big(-(x - 1)^2 + 1\Big) = -\left(\frac{x - 1}{\sqrt 2}\right)^2 + \frac 1 2$$


\begin{align*} \int e^{\frac 1 2(2x - x^2)} dx &= \sqrt e \int e^{-\left(\frac{x - 1}{\sqrt 2}\right)^2} dx \end{align*}

Make the change of variables

$$u = \frac{x - 1}{\sqrt 2},\quad \sqrt 2 \, du = dx$$

and we'll find that our integral is

$$\sqrt{2e} \int e^{-u^2} du$$

Unfortunately, there is no closed form for this integral, but it can then be expressed in terms of the error function, which is defined to be

$$\operatorname{erf}(t) = \frac{2}{\sqrt{\pi}} \int_0^t e^{-u^2} du$$

Alternatively, since you do have bounds on your integral, you should look at the Gaussian integral, which gives that

$$\int_{-\infty}^{\infty} e^{-u^2} du = \sqrt{\pi}$$

  • $\begingroup$ Thanks for this in-depth answer. This makes a lot more sense now. $\endgroup$ Apr 10 '14 at 4:07
  • $\begingroup$ @sameetandpotatoes You're very welcome. $\endgroup$
    – user61527
    Apr 10 '14 at 4:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.