How do I evaluate this integral using simple calculus techniques such as substitution or parts?


I would not like any solution involving more advanced techniques such as the gamma function, the error function or polar coordinates.


closed as off-topic by Jack D'Aurizio, Daniel W. Farlow, user1551, heropup, user223391 Aug 28 '16 at 13:53

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Jack D'Aurizio, Daniel W. Farlow, user1551, heropup, Community
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Well, the part that's $e^{-x^2}$ you can do using the squaring and polar coordination trick. Not sure the other half $\endgroup$ – Alan Aug 25 '16 at 22:38
  • 1
    $\begingroup$ For the second piece you can integrate by parts to reduce it to the first case. $\endgroup$ – Ian Aug 25 '16 at 22:55
  • 1
    $\begingroup$ If you disallow polar coordinates, the error function and the $\Gamma$ function, you leave us without options. Where to get $\sqrt{\pi}$ from? Can we at least use $\int_{-\infty}^{+\infty}e^{-x^2}\,dx=\sqrt{\pi}$? $\endgroup$ – Jack D'Aurizio Aug 25 '16 at 23:01
  • $\begingroup$ @JackD'Aurizio Okay, fair enough. I was just looking for solutions that avoided those techniques where possible. $\endgroup$ – Cascadex Aug 25 '16 at 23:11
  • $\begingroup$ He didn't rule out complex analysis, right? mathoverflow.net/a/105462/454 $\endgroup$ – GEdgar Aug 25 '16 at 23:34

Integrate by parts $$\int_{-\infty}^{\infty} e^{-x^2} \; dx = \left. xe^{-x^2}\right|_{-\infty}^{\infty}-\int_{-\infty}^{\infty} -2x^2 e^{-x^2} \; dx.$$ Using the classic "switch to polar" trick for the first integral gives $$\sqrt{\pi} = 2\int_{-\infty}^{\infty} x^2 e^{-x^2} \; dx.$$ So your integral equals $\sqrt{\pi} - \sqrt{\pi}/2 = \sqrt{\pi}/2.$

  • $\begingroup$ And this shows that if you could do all this without the "polar trick", then you could integrate $e^{-x^2}$ without it as well, and no one seems to do that...suggesting that your question doesn't have a (known) answer. $\endgroup$ – John Hughes Aug 25 '16 at 23:19

Here, we use "Feynman's Trick" for Differentiating Under the Integral as a straightforward way to evaluate integrals of the form $\int_{-\infty}^\infty x^{2n}e^{-x^2}\,dx$. To that end, we proceed.

Let $I(a)$ be the integral defined by

$$I(a)=\int_{-\infty}^\infty e^{-ax^2}\,dx \tag 1$$

The integral in $(1)$ is a Gaussian integral, which can be evaluated a number of ways (SEE HERE for a way that avoids using polar coordinates or the Gammma function ) to obtain

$$I(a)=\sqrt{\frac{\pi}a} \tag 2$$

Now, differentiating the right-hand side of $(1)$ reveals

$$I'(a)=-\int_{-\infty}^{\infty}x^2e^{-ax^2}\,dx \tag 3$$

while differentiating the right-hand side of $(2)$ reveals

$$I'(a)=-\frac12 \sqrt{\pi}a^{-3/2} \tag 4$$

Upon equating $(3)$ and $(4)$ and setting $a=1$, we find

$$\bbox[5px,border:2px solid #C0A000]{\int_{-\infty}^\infty x^2e^{-x^2}\,dx=\frac{\sqrt{\pi}}{2}}$$

We can continue to differentiate $(1)$ to obtain

$$\begin{align} I^{(n)}(a)&=(-1)^n \int_{-\infty}^\infty x^{2n}e^{-ax^2}\,dx\\\\ &=(-1)^n\frac{(2n-1)!!}{2^n}a^{-(2n+1)/2} \end{align}$$

from which we arrive at

$$\int_{-\infty}^\infty x^{2n}e^{-ax^2}\,dx=\frac{\sqrt{\pi}\,(2n-1)!!}{2^n}\,a^{-(2n+1)/2} \tag 5$$

Setting $a=1$ in $(5)$ yields

$$\bbox[5px,border:2px solid #C0A000]{\int_{-\infty}^\infty x^{2n}e^{-x^2}\,dx=\frac{\sqrt{\pi}\,(2n-1)!!}{2^n} }$$


$\int_{-\infty}^{\infty} e^{-x^2} dx - \int_{-\infty}^{\infty} x^2e^{-x^2} dx$

Lets tackel this in pieces

$\int_{-\infty}^{\infty} x^2e^{-x^2} dx$ integrate by parts

$u = dx, dv = xe^{-x^2} dx\\ du = dx, v = -\frac 12 e^{-x^2}$

$-\frac x2 e^{-x^2} |_{-\infty}^{\infty} + \frac 12 \int e^{-x^2} dx \\ -\frac x2 e^{-x^2} |_{-\infty}^{\infty} = 0$

And what is left pairs with the piece we had not yet addressed.

Since the fucntion is even, $\frac 12 \int_{-\infty}^{\infty} e^{-x^2} dx = \int_{0}^{\infty} e^{-x^2} dx$

You said you don't want polar coordinates, which is actually the easy way to solve this one.


$F(t) = \int_0^{\infty} \frac {e^{-t^2(x^2+1)}}{1+x^2} dx\\ F'(t) = \int_0^{\infty} 2t e^{-t^2(x^2+1)} dx$

Note that we are differentiating with respect to t and now with respect to x.

$F'(t) = -2e^-t^2 \int_0^{\infty} te^{-(tx)^2} dx\\ u = tx\\ du = t dx\\ F'(t) = -2e^-t^2 \int_0^{\infty} e^{-u^2} du$

So... $F'(t) = e^-t^2 (-2I)$ where I is a constant (and I is also the number we are looking for.)

The fundamntal theorm of calucus says:

$\int_a^b F'(t) dt = F(b) - F(a)\\ F(b)- F(a) = -2I \int_b^a e^-t^2 dt $

Set $a = 0,$ and $b$ approaches infinity. $F(\infty) - F(0) = -2I\int_0^infty e^-t^2 dt = -2 I^2$

$F(0) = \int_0^{\infty} \frac {1}{1+x^2} dx$ Which integrates to an inverse tangent function and equals $\frac \pi 2$

$F(\infty) = \int_0^{\infty} 0 dx = 0$

$F(\infty) - F(0) = -\frac \pi 2 = -2 I^2\\ I^2 = \frac {\pi}4\\ I = \frac {\sqrt{\pi}}2$

  • $\begingroup$ Do you mean $\sqrt{\pi}/2$? $\endgroup$ – Hrhm Aug 25 '16 at 23:42
  • $\begingroup$ You mistyped the upper limit in one of your integrals. You meant $\infty$ but left off the \ symbol, so the limit is $i$ and there are extra letters in the integrand. $\endgroup$ – Oscar Lanzi Aug 26 '16 at 0:09
  • $\begingroup$ Thanks, I had to shut down before I had a chance to check my work. $\endgroup$ – Doug M Aug 26 '16 at 16:10

$$\int_{-\infty}^{\infty}\exp(-x^2)dx = \sqrt{\pi}$$

Substituting $x = \sqrt{a} t$ in here gives:

$$\int_{-\infty}^{\infty}\exp(-a t^2)dx = \sqrt{\frac{\pi}{a}}$$

Put $a = 1+u$ and expand both sides in powers of $u$. The integrand can be expanded as:

$$\exp\left[-(1+u)t^2\right]= \exp(-ut^2)\exp(-t^2)=\left[1-ut^2 +\mathcal{O}(u^2)\right]\exp(-t^2)$$

We also have:


Equating the integral to the result up to order $u$ yields:

$$\int_{-\infty}^{\infty}\left(1-ut^2\right)\exp(-t^2)dt =\sqrt{\pi}\left(1-\frac{1}{2}u\right)$$

The desired integral is thus $\frac{\sqrt{\pi}}{2}$.


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