# Help for integral

1. Feb 21, 2008

### yf920

Integral of exp{-(a*x^2+b*x+c)} from 0 to infinite

i know the answer of Integral of exp{-(a*x^2+b*x+c)} from -inf to inf
= sqrt(pi/a)*exp((b^2-4ac)/4a)

thanks!!

2. Feb 21, 2008

### rocomath

3. Feb 22, 2008

### ssd

Write the exponent in the form -g(kx+d)^2 + f. Put g(kx+d)=u. Then the integral
(-inf to inf) becomes twice the same integral over (0 to inf), since the integrand is
now of the form e^(-u^2) which is symmetric about 0.

4. Feb 23, 2008

### coomast

@ssd, if you mean that the end result of the integral in the original post is half the result of the other one given in there, you are making a calculation error.

OK yf920, let's calculate the result given. The argument of the exponential function can be written as:

$$-ax^2-bx-c=-a\left(x+\frac{b}{2a}\right)^2 +\frac{b^2-4ac}{4a}$$

Putting this into the integral gives then:

$$I=e^{\frac{b^2-4ac}{4a}}\int_{-\infty}^{\infty} e^{-a\left(x+\frac{b}{2a}\right)^2}dx$$

Putting as ssd said:

$$\sqrt{a}\left(x+\frac{b}{2a}\right)=t$$

gives now:

$$I=\frac{e^{\frac{b^2-4ac}{4a}}}{\sqrt{a}}\int_{-\infty}^{\infty} e^{-t^2}dt$$

The following integral is known:

$$\int_{-\infty}^{\infty} e^{-t^2}dt=\sqrt{\pi}$$

Giving the final result as:

$$I=\sqrt{\frac{\pi}{a}} e^{\frac{b^2-4ac}{4a}}$$

Now, the original question was:

$$I=\int_{0}^{\infty} e^{-\left(ax^2+bx+c\right)}dx$$

Which is not the double of the one just derived. Just go through all the steps with this new integral limits and use the result:

$$erf(x)=\frac{2}{\sqrt{\pi}} \int_{0}^{x}e^{-z^2}dz$$

Do these calculations, and come back with the result you found, it will be our pleasure to check it.