# Integral evaluation with exponentials

I want to evaluate the integral $\int_0^T e^{-ax}e^{-bx^2} \, dx$. I found a direct solution:

$$\int_{0}^{\infty} e^{-ax}e^{-bx^2} \, dx = \sqrt\frac{\pi}{b} \exp\left(\frac{a^2}{4b}\right) Q\left(\frac{a}{\sqrt{ 2b}}\right)$$

But I don`t know how to evaluate when the integration is taken in $[0,T]$.

• There is no closed form in terms of elementary functions. One can get a closed form in terms of the error function. – André Nicolas Sep 9 '14 at 16:31
• This integral can not be solved analytically. You can find the solution in term of Error function – Mojtaba Golshani Sep 9 '14 at 16:36

Outline: We assume that $b$ is positive. There is no closed form for the integral from $0$ to $T$ in terms of elementary functions.
To start, rewrite $bx^2+ax$ as $b\left(x^2+\frac{a}{b}x\right)$. Complete the square, obtaining $$bx^2+ax=b\left(x+\frac{a}{2b}\right)^2-\frac{a^2}{4b},$$ and make the substitution $u=\sqrt{b}\left(x+\frac{a}{2b}\right)$.
• You are welcome. Note that just as in the expression you gave for the integral from $0$ to $\infty$, there will be an $\exp\left(\frac{a^2}{4b}\right)$ factor, which comes from the expression for $b^2+ax$ in the answer. – André Nicolas Sep 9 '14 at 18:45