Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We know the solutions of this integral (Bronstein-Semendijajev mathematics manual [page474]):

\begin{align} \int\limits_{0}^{\infty}x^n \cdot e^{-ax^2}dx = \frac{1\cdot3\dots(2k-1)\,\,\sqrt{\pi}}{2^{k+1}a^{k+1/2}}\longleftarrow\substack{\text{$n$ is the exponent over $x$}\\\text{while $k=n/2$}} \end{align}

But how do I calculate the integral if I change the upper limit from $\infty$ to $x_1$ which is constant - for example how do I calculate this integral:

\begin{align} \int\limits_{0}^{x_1}x^2 \cdot e^{-ax^2}dx \end{align}

share|cite|improve this question
One does not simply change the limit from ∞ to x_1 – N3buchadnezzar Aug 12 '13 at 13:48
I din't change it. I have to solve the later integral which has $x_1$ for limit. But i found the first integral in the mathematics manual. – 71GA Aug 12 '13 at 14:01


$$I(a) = \int_0^{x_1} dx \, e^{-a x^2} = \frac12 \sqrt{\frac{\pi}{a}} \text{erf}(\sqrt{a} x_1)$$

Then the integral in question is $-\partial I/\partial a$, which is

$$\frac14 \sqrt{\frac{\pi}{a^3}} \text{erf}(\sqrt{a} x_1) - e^{-a x_1^2} \frac{x_1}{2 a}$$

This may be used for even $n$, using successively higher derivatives with respect to $a$. For odd $n$, you may rather use derivatives with respect to $a$ of the integral

$$\int_0^{x_1} dx \, x \, e^{-a x^2} = \frac12 \frac{1-e^{-a x_1^2}}{a}$$

share|cite|improve this answer
Thank you. Is the error function really necessary :/ ??? – 71GA Aug 12 '13 at 14:20
@71GA: as far as I know, yes, no way around it I am afraid. – Ron Gordon Aug 12 '13 at 14:20
Does this mean this can only be solved using numerical methods? – 71GA Aug 12 '13 at 14:25
@71GA: The error function is used so often that every math package has it built in. Simple routines exist that compute its value to as many decimal places as you like with a few simple operations. So, do you need numerical integration? Heaven's no! It's like having a Bessel function - actually, even easier. – Ron Gordon Aug 12 '13 at 14:50
Well my calculator lacks it :) – 71GA Aug 12 '13 at 15:02






share|cite|improve this answer

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.