Integral involving exponentials and error function

error function

For the following integral,

$\displaystyle\int_{-\infty}^{\infty}e^{-ax^2}\mathrm{erf}\!\left(\dfrac{x+b}{\sqrt2}\right)\mathrm dx$

we were asked to prove that it yields the following closed form:

$\sqrt{\dfrac{\pi}a}\,\mathrm{erf}\!\left(b \sqrt{\dfrac{a}{2a+1}}\right)$

I am struggling with the lower limit starting from $-\infty$. I have tried to expand the error function in the question using its integral definition, then reverse the order of integration but the limits won't work.

How to prove such a relation?

Best Answer

Let $\;I(b)=\displaystyle\int_{-\infty}^{+\infty}e^{-ax^2}\mathrm{erf}\!\left(\!\dfrac{x+b}{\sqrt2}\!\right)\!\mathrm dx\,.$

By differentiating with respect to $\,b\,,$ we get that

$I’(b)=\displaystyle\int_{-\infty }^{+\infty}e^{-ax^2}\frac{\partial}{\partial b}\left[\mathrm{erf}\!\left(\!\dfrac{x+b}{\sqrt2}\!\right)\right]\!\mathrm dx=$

$=\dfrac2{\sqrt{\pi}}\displaystyle\int_{-\infty }^{+\infty}e^{-ax^2}\frac{\partial}{\partial b}\left(\!\int_0^{\frac{x+b}{\sqrt2}}e^{-t^2}\mathrm dt\!\right)\mathrm dx=$

$=\dfrac2{\sqrt{\pi}}\cdot\dfrac1{\sqrt2}\displaystyle\int_{-\infty }^{+\infty}e^{-ax^2}e^{-\frac{(x+b)^2}2}\mathrm dx=$

$=\dfrac{\sqrt2}{\sqrt{\pi}}\displaystyle\int_{-\infty }^{+\infty}e^{-ax^2-\frac12x^2-bx-\frac{b^2}2}\,\mathrm dx=$

$=\dfrac{\sqrt2}{\sqrt{\pi}}\displaystyle\int_{-\infty }^{+\infty}e^{-\frac{2a+1}2x^2-bx-\frac{b^2}2}\,\mathrm dx=$

$=\dfrac{\sqrt2}{\sqrt{\pi}}\displaystyle\int_{-\infty }^{+\infty}e^{-\frac{2a+1}2\left[x^2+\frac{2bx}{2a+1}+\frac{b^2}{(2a+1)^2}\right]+\frac{b^2}{2(2a+1)}-\frac{b^2}2}\,\mathrm dx=$

$=\dfrac{\sqrt2}{\sqrt{\pi}}\displaystyle\int_{-\infty }^{+\infty}e^{-\frac{2a+1}2\left(x+\frac b{2a+1}\right)^2-\frac{ab^2}{2a+1}}\,\mathrm dx=$

$=\dfrac{\sqrt2}{\sqrt{\pi}}\,e^{-\frac{ab^2}{2a+1}}\!\displaystyle\int_{-\infty }^{+\infty}e^{-\frac{2a+1}2\left(x+\frac b{2a+1}\right)^2}\,\mathrm dx=$

$\underset{\overbrace{\text{by letting }\,u=\sqrt{\frac{2a+1}2}\left(x+\frac b{2a+1}\right)}}{=}\dfrac{\sqrt2}{\sqrt{\pi}}\sqrt{\dfrac2{2a+1}}\,e^{-\frac{ab^2}{2a+1}}\!\displaystyle\int_{-\infty }^{+\infty}e^{-u^2}\,\mathrm du=$

$=\dfrac{\sqrt2}{\sqrt{\pi}}\sqrt{\dfrac2{2a+1}}\,e^{-\frac{ab^2}{2a+1}}\sqrt{\pi}=$

$=\dfrac2{\sqrt{\pi}}\sqrt{\dfrac{\pi}a}\sqrt{\dfrac a{2a+1}}\,e^{-\frac{ab^2}{2a+1}}=$

$=\displaystyle\dfrac2{\sqrt{\pi}}\sqrt{\dfrac{\pi}a}\!\cdot\!\dfrac{\partial}{\partial b}\left(\int_0^{b\sqrt{\frac{a}{2a+1}}}e^{-t^2}\mathrm dt\right)=$

$=\dfrac{\partial}{\partial b}\left[\sqrt{\dfrac{\pi}a}\,\mathrm{erf}\!\left(\!b\sqrt{\dfrac{a}{2a+1}}\right)\right].$

Consequently,

$I(b)=\sqrt{\dfrac{\pi}a}\,\mathrm{erf}\!\left(\!b\sqrt{\dfrac{a}{2a+1}}\right)+\mathrm{constant}\,.$

Since $\;I(0)=\displaystyle\int_{-\infty}^{+\infty}\underbrace{e^{-ax^2}\mathrm{erf}\!\left(\!\dfrac x{\sqrt2}\!\right)}_{\text{it is an odd function}}\,\mathrm dx=0= \sqrt{\dfrac{\pi}a}\,\mathrm{erf}\!\left(0\right)\,,\,$

it follows that $\;\mathrm{constant}=0\,,\,$ hence ,

$I(b)=\sqrt{\dfrac{\pi}a}\,\mathrm{erf}\!\left(\!b\sqrt{\dfrac{a}{2a+1}}\right)$

that is ,

$\displaystyle\int_{-\infty}^{+\infty}e^{-ax^2}\mathrm{erf}\!\left(\!\dfrac{x+b}{\sqrt2}\!\right)\!\mathrm dx=\sqrt{\dfrac{\pi}a}\,\mathrm{erf}\!\left(\!b\sqrt{\dfrac{a}{2a+1}}\right).$

Related Question