Alternative form of the Integral of Gaussian function

97 Views Asked by At

On Wikipedia, there is an alternative form of the integral of the Gaussian function, which is $$\begin{align} \int_{-\infty}^{\infty} k\exp\left(-fx^2 + gx + h \right)dx &=\int k\exp\left( (-f(x-g/(2f))^2 + g^2/(4f) + h\right)dx \\ &= k\sqrt{\frac{\pi}{f}}\exp\left(\frac{g^2}{4f}+h\right) \end{align}$$ For the case where $gx+h=0$, this can be solved using polar coordinates. For $h=0$, I can complete the square. For the case where neither are zero, I'm not sure what to do.