# Supposedly simple integral

While working on a differential equation I stumbled on this integral: $$\int_0^x\frac{e^{-t^2}}{a^2+t^2}dt,$$ where $a\in \mathbb{R_{>0}}$.

At first glance it looks so simple that it's ridiculous that I can't find closed form expression for it.

Can someone help me with this beast?

$Edit:$From the comments, it doesn't seem to exist a closed form. I tried a series expansion by writing the integrand as $e^{-t^2}g(t)$ and take the Taylor expansion of the function $g(t)$. It's a good approximation and it's possible to integrate the expression found but it's only valid for small values of $x$ since the series diverge.

• I'm not sure it has a closed expression. Try to exchange the integrals, hopefully the other direction gets you some $t$ as multiplier. – Berci Jun 13 '13 at 23:25
• Or, perhaps, do you want its limit as $x\to\infty$? – Berci Jun 13 '13 at 23:27
• @Berci Well, there's no other integration to be made. I have a ODE whose solution is $f(x)=\int_0^x \frac{e^{-t^2}}{a^2+t^2}dt+...$. So I can't take the limit. I'm sorry if I misled you with the way I wrote the question. – PML Jun 13 '13 at 23:32
• I would guess that this does not have an expression in terms of elementary functions. – parsiad Jun 13 '13 at 23:33
• @par I wasn't implying that it does. I was just answering the first two comments. – PML Jun 13 '13 at 23:36

$\int_0^x\dfrac{e^{-t^2}}{a^2+t^2}dt=\int_0^x\dfrac{1}{a^2+t^2}\sum\limits_{n=0}^\infty\dfrac{(-t^2)^n}{n!}dt=\int_0^x\sum\limits_{n=0}^\infty\dfrac{(-1)^nt^{2n}}{n!(a^2+t^2)}dt$

Consider $\int\dfrac{t^{2n}}{a^2+t^2}dt$ ,

Let $t=a\tan\theta$ ,

Then $dt=a\sec^2\theta~d\theta$

$\therefore\int\dfrac{t^{2n}}{a^2+t^2}dt$

$=\int\dfrac{(a\tan\theta)^{2n}}{a^2+(a\tan\theta)^2}a\sec^2\theta~d\theta$

$=\int a^{2n-1}\tan^{2n}\theta~d\theta$

$=\sum\limits_{k=0}^{n-1}\dfrac{(-1)^ka^{2n-1}\tan^{2n-2k-1}\theta}{2n-2k-1}+(-1)^na^{2n-1}\theta+C$

$=\sum\limits_{k=0}^{n-1}\dfrac{(-1)^ka^{2k}t^{2n-2k-1}}{2n-2k-1}+(-1)^na^{2n-1}\tan^{-1}\dfrac{t}{a}+C$

Hence $\int_0^x\sum\limits_{n=0}^\infty\dfrac{(-1)^nt^{2n}}{n!(a^2+t^2)}dt$

$=\left[\sum\limits_{n=1}^\infty\sum\limits_{k=0}^{n-1}\dfrac{(-1)^{n+k}a^{2k}t^{2n-2k-1}}{n!(2n-2k-1)}+\sum\limits_{n=0}^\infty\dfrac{a^{2n-1}}{n!}\tan^{-1}\dfrac{t}{a}\right]_0^x$

$=\sum\limits_{n=1}^\infty\sum\limits_{k=0}^{n-1}\dfrac{(-1)^{n+k}a^{2k}x^{2n-2k-1}}{n!(2n-2k-1)}+\dfrac{e^{a^2}}{a}\tan^{-1}\dfrac{x}{a}$

• This is outstanding!Thank you very much, really. I hope you get many upvotes for the work you've put into this answer. Thank you once again. – PML Jun 15 '13 at 0:50

I'll tackle the case of the large values of $x$. Let's express the integral as follows:

$$\int_0^x\frac{e^{-t^2}}{a^2+t^2}dt=\int_0^{\infty}\frac{e^{-t^2}}{a^2+t^2}dt-\int_x^{\infty}\frac{e^{-t^2}}{a^2+t^2}dt=$$

$$=I(a)-\int_x^{\infty}\frac{e^{-t^2}}{a^2+t^2}dt$$

The next step is evaluate the last integral by parts:

$$-\int_x^{\infty}\frac{e^{-t^2}}{a^2+t^2}dt=\frac{1}{2}\int_x^{\infty}\frac{d(e^{-t^2})}{t(a^2+t^2)}dt=$$

$$=-\frac{e^{-x^2}}{2x(a^2+x^2)}+\frac{1}{2}\int_x^{\infty}\frac{(3t^2+a^2)e^{-t^2}}{t^2(a^2+t^2)^2}dt$$

In the last expression, the first term dominates for large $x$ and we have approximately:

$$\int_0^x\frac{e^{-t^2}}{a^2+t^2}dt\approx I(a)-\frac{e^{-x^2}}{2x(a^2+x^2)}$$

We'll get a better result if we continue the integration by parts in the penultimate expression.

Now, consider

$$I(a)=\int_0^{\infty}\frac{e^{-t^2}}{a^2+t^2}dt$$

Let's introduce the parameter $b$ so that

$$J(b)=\int_0^{\infty}\frac{e^{-bt^2}}{a^2+t^2}dt$$

and $I(a)=J(1)$

By differentiating with respect to $b$ we will see that $J$ satisfies the following differential equation:

$$\frac{dJ}{db}-a^2J+\frac{\sqrt{\pi}}{2\sqrt{b}}=0$$

Taking into account that

$$J(0)=\int_0^{\infty}\frac{dt}{a^2+t^2}=\frac{\pi}{2a}$$ we get a solution of this diff-eq:

$$J(b)=\sqrt{\pi}\frac{e^{a^2b}}{a}\int_{a\sqrt{b}}^{\infty}e^{-y^2}dy$$

Finally

$$I(a)=J(1)=\sqrt{\pi}\frac{e^{a^2}}{a}\int_{a}^{\infty}e^{-y^2}dy=\frac{\pi}{2}\frac{e^{a^2}}{a}\text{erfc}(a)$$ where $\text{erfc}(x)=\frac{2}{\sqrt{\pi}}\int_{x}^{\infty}e^{-y^2}dy$ is so called "the complementary error function"

• I'm learning a lot with your answers. I thank you very much with the time you took on your answer. Your approach is very interesting and pedagogical. Thank you once again – PML Jun 17 '13 at 21:12