Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I was confused about an integral showing on my teacher's slide, could anyone tell me how is the following integral derived?

$$ \int^\infty_{-\infty} x^{2k} e^{-\frac{x^2}{2\sigma^2}} \; \mathrm{d}x = 1 \cdot 3 \; \ldots \; (2k-1) \sigma^{2k+2} \sqrt{2\pi} $$


share|improve this question
Have you tried to use integration by parts to treat the integral? Repeated integration by parts would probably give you the desired result. –  Sheheryar Zaidi Sep 5 at 4:55
@SheheryarZaidi Yes.. I have tried integration by parts directly, but it does not yield a simple form as the approach Deepak uses here. –  Wei Zhong Sep 8 at 22:06

5 Answers 5

up vote 2 down vote accepted

Hint: Express the integrand as:

$$x^{2k-1}\cdot (x e^{-\frac{x^2}{2\sigma^2}})$$

and apply integration by parts repeatedly. Induction will help a lot.

share|improve this answer
Doing this will let you write the integral with a given $k$ in terms of the integral for $k = 0$, but evaluating the latter necessarily involves a trick, as the integrand does not have a closed-form antiderivative. –  Travis Sep 5 at 5:06
@Travis The Gaussian integral should be a well known result, and often may be assumed unless one is explicitly required to derive it. –  Deepak Sep 5 at 5:08
Yes, I agree. I only mention it here because I suspect the poster might not have learned this trick yet, given that, as you know, it can be used together with elementary tools to evaluate the integral the poster is asking about. –  Travis Sep 5 at 5:16
Thanks very much. From my point of view, even if I do not have the Gaussian integral knowledge, I would still choose this way because it is the most intuitive approach to derive the integral further, and finally get a much simple form and apply Gaussian integral to solve. Which divides the problem in separate steps. –  Wei Zhong Sep 8 at 22:04

Starting with the value of the Gaussian integral, deduce by using the simple substitution $x=t\sqrt a$,

that $~I(a)=\displaystyle\int_{-\infty}^\infty e^{-ax^2}~dx=\sqrt{\frac\pi a},~$ then differentiate both sides with regard to a, k times. Lastly,

replace a by $\dfrac1{2\sigma^2},$ and you're done!

share|improve this answer
This is an especially nice application of differentiating under the integral! –  Travis Sep 5 at 5:17
Amazing insight! +1 –  Deepak Sep 5 at 5:24
@Lucian, Actually, I did not get through it using this way, I would be appreciate if you can give me the first 3 or 4 steps to allow me go further. –  Wei Zhong Sep 8 at 21:58
@Deepak, Such a deep insight that I don't want to rely on... –  Wei Zhong Sep 8 at 21:58
@WeiZhong: Differentiate $a^{^{-\tfrac12}}$ a few times, to see what pattern emerges, then prove it by induction. At the same time, notice what happens each time when you differentiate with regard to a inside the integral sign. –  Lucian Sep 9 at 0:56

Let $I_k$ be the integral, and write

$$I_k^2 = \int_{-\infty}^{\infty} x^{2k} e^{-\frac{x^2}{2 \sigma^2}} \,dx \int_{-\infty}^{\infty} y^{2k} e^{-\frac{y^2}{2 \sigma^2}} \,dy = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x^{2k} + y^{2k}) e^{-\frac{x^2 + y^2}{2 \sigma^2}} \,dx \,dy.$$

In polar coordinates this is

$$\int_0^{2 \pi} (\cos^{2k} \theta + \sin^{2k} \theta)\,d\theta \int_0^{\infty} r^{2k + 1} e^{-\frac{r^2}{2 \sigma^2}} dr.$$

The first integral can be handled with trigonometric identities, and the second be handled with the $u$-substitution $u = \frac{r}{\sqrt{2} \sigma}$ and then $k$ applications of integration by parts (induction makes quicker work of this).

Alternatively, you can apply this trick find $I_0$ and then apply integration by parts $k$ times to write $I_k$ in terms of $I_0$.

share|improve this answer
Thanks, it is an interesting way, I really benefit. However, handle the second part would also require "integration by parts", which is not appealing compared to the one with directly integration by parts. –  Wei Zhong Sep 8 at 22:12


To simplify the antiderivative, start writing $x=\sqrt{2} \sigma y$. This makes $$I_k=\int x^{2k} e^{-\frac{x^2}{2\sigma^2}} \; \mathrm{d}x =2^{k+\frac{1}{2}} \sigma ^{2 k+1} \int y^{2k}e^{-y^2}\; \mathrm{d}y$$ and let $$J_k=\int y^{2k}e^{-y^2}\; \mathrm{d}y$$

Integrating by parts with $u=e^{-y^2}$, $v'=y^{2 k}$, so $u'=-2 e^{-y^2} y$, $v=\frac{y^{2 k+1}}{2 k+1}$, we obtain $$J_k=\int y^{2k}e^{-y^2}\; \mathrm{d}y=\frac{e^{-y^2} y^{2 k+1}}{2 k+1}+\int\frac{2 e^{-y^2} y^{2 k+2}}{2 k+1}\; \mathrm{d}y$$ Using the infinite bounds, the term in the middle disappears and we are left with $$J_k=\frac{2}{2k+1}J_{k+1}$$ that is to say $$J_{k+1}=\frac{2k+1}{2}J_k$$ with $J_0=\sqrt{\pi }$. So, still using the bounds and continuing that way, you will arrive to $$I_k=(2 k-1) \sigma ^2 I_{k-1}$$ with $I_0=\sigma\sqrt{2 \pi}$.

I am sure that you can take from here.

share|improve this answer
In order to get the iteration form, you did a fancy substitution, but how can you get close to it at the beginning? In another word, $x=2\sqrt{\sigma}y$, explain it would be more intuitive. –  Wei Zhong Sep 8 at 21:54
This has been chosen in order to only have $e^{-y^2}$ –  Claude Leibovici Sep 9 at 4:02

Consider the Gaussian integral $\displaystyle F(t):=\frac{1}{\sqrt{2\pi \sigma^2}}\int_{-\infty}^\infty e^{-(1-t)x^2/2\sigma^2}\,dx$. For $t=0$ we have the usual Gaussian integral and so $F(0)=1$. Consequently $F(t)$ can then evaluated via a scaling substitution to obtain yielding $$F(t)=\frac{1}{\sqrt{1-t}}=\sum_{k=0}^\infty \binom{k-1/2}{k}t^k=\sum\limits_{k=0}^\infty \frac{(k-1/2)_{k}}{k!}t^k$$ where we have expressed the Taylor series expansion of the reciprocal square root by means of the falling factorial $(n)_{k}=n(n-1)\cdots (n-k+1)$. At the same time, we can express $F(t)$ as

$$F(t)=\frac{1}{\sqrt{2\pi \sigma^2}}\int_{-\infty}^\infty e^{t x^2/2\sigma^2}e^{-x^2/2\sigma^2}\,dx =\sum_{k=0}^\infty \frac{t^k}{k!} \cdot \frac{1}{\sqrt{2\pi \sigma^2}}\int_{-\infty}^\infty\,\left(\frac{x^2}{2\sigma^2}\right)^k e^{-x^2/2\sigma^2}\,dx$$

where we have Taylor-expanded the first Gaussian. Identifying coefficients of the two expressions for $F(t)$ then yields the desired conclusion:

$$\int_{-\infty}^\infty\,x^{2k} e^{-x^2/2\sigma^2}=(2\sigma^2)^k(k-1/2)_{k}\sqrt{2\pi \sigma^2}=1\cdot 3\cdots (2k-1)\sigma^{2k+2}\sqrt{2\pi}$$

To clarify the last equality, note that $$2^k (k-1/2)_k=2(k-1/2)\cdot 2(k-3/2)\cdots 2(1/2)=1\cdot 3\cdots (2k-1).$$

share|improve this answer
thanks for your answer very much. You provide me the intuition (as the discrete formula shows) to use the Taylor-expanded to solve the problem, but I prefer the problem to be solved in a more basic and more simple way whenever it can be done in that way. –  Wei Zhong Sep 8 at 22:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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