0

Question:

Using the normalization integration for a Gaussian random variables, find an analytic expression (closed-form solution) for the following integral $I=\int^{\infty}_{-\infty}e^{-(ax^2+bx+c)}dx$

Solution:

$e^{-(ax^2+bx+c)}=e^{-a(x^2+\frac{b}{a}x+(\frac{b}{2a})^2+c-\frac{b^2}{4a^2})}=e^{-a(x+\frac{b}{2a})^2} \times {e^{\frac{b^2}{4a}-c}}$,so

$\int^{\infty}_{-\infty}e^{-(ax^2+bx+c)}dx=e^{\frac{b^2}{4a}-c}\times \sqrt{\frac{2\pi}{2a}} \int^{\infty}_{-\infty}\frac{1}{\sqrt{\frac{2\pi}{2a}}}e^{-\frac{(x+\frac{b}{2a})^2}{\frac{1}{a}}}dx=e^{(\frac{b^2}{4a}-c)} \times \sqrt{\frac{\pi}{a}}$

For these formulas, it is not logical for me. I think lots of people have to calculate by rote to solve or calculate this question, is there a more logical way to solve this? I mean, by definition, and solve it not just calculate it by rote.

XM551
  • 219
  • 2
    I'm not sure how to interpret your question. However, the way you show seems to be the only generally known way to solve it. The steps are: (i) Recognize this kind of integral resembles a Gaussian PDF; (ii) complete the square to get a Gaussian PDF. The hint before the question indeed reminds you to think about integrating Gaussian PDFs. There is no closed form anti-derivative for such $e^{-x^2}$ functions, so it seems there really is no other way to proceed. [Other ways would likely be more complex and would secretly re-derive the Gaussian result, so it is easier to just use that result] – Michael May 14 '18 at 14:04
  • 2
    Of course the derivation requires $a>0$. If $a=0$ you integrate an exponential (which is easy), and if $a<0$ the total integral is $\infty$. – Michael May 14 '18 at 14:06
  • (commenting on a 6 year old question...) another thing is without loss $c=0$ (obviously) and also without loss $a=1$ by scaling. So the required completing the square is 'not so hard' – Calvin Khor Sep 11 '24 at 19:37
  • What if a,b,c are complex numbers? – Marc Navarro Mar 18 '25 at 10:45

1 Answers1

1

Another way to interpret the provided hint is to observe that the density for the normal$(\mu,\sigma^2)$ distribution integrates to unity: $$ \int_{-\infty}^\infty \frac1{\sqrt{2\pi\sigma^2}}\exp\left\{ -\frac{(x-\mu)^2}{2\sigma^2}\right\}dx=1.\tag1 $$ Rearrange this into the identity $$ \int_{-\infty}^\infty \exp\left\{-\left(\frac{x^2-2\mu x}{2\sigma^2}\right)\right\}dx =\sqrt{2\pi\sigma^2}\exp \left\{\frac{\mu^2}{2\sigma^2}\right\}.\tag2$$ If $a>0$ the expression $\exp\{-(ax^2+bx)\}$ matches the integrand in the LHS of (2), with $a=\frac1{2\sigma^2}$ and $b=-\frac\mu{\sigma^2}$. Solving for $\sigma^2=\frac1{2a}$ and $\mu=-\frac b{2a}$ and substituting yields:

$$\int_{-\infty}^\infty \exp\{-(ax^2+bx)\}dx = \sqrt{\frac\pi a}\exp\left\{\frac {b^2}{4a}\right\}$$ which leads immediately to $$\int_{-\infty}^\infty \exp\{-(ax^2+bx+c)\}dx = \sqrt{\frac\pi a}\exp\left\{\frac {b^2}{4a}-c\right\},\qquad a>0\tag3 $$ and the generalization $$\int_{-\infty}^\infty \exp\left\{-\left(\frac{ax^2+bx+c}d\right)\right\}dx = \sqrt{\frac{d\pi} a}\exp\left\{\frac {b^2-4ac}{4ad}\right\},\qquad \frac ad>0.\tag4 $$

grand_chat
  • 40,909