How to find $\int \frac{e^{-x^2}}{x^2 + 1} dx$? I have a question about improper integrals:
How can we find $\lim_{n \rightarrow +\infty}\int_{-n}^{n} \frac{1 - e^{-nx^2}}{x^2(1+nx^2)}dx$?
$\textbf{Some effort:}$
$\lim_{n \rightarrow +\infty}\int_{-n}^{n} \frac{1}{n} \frac{1 - e^{-nx^2}}{x^2(1+nx^2)}dx = \lim_{n \rightarrow +\infty} \frac{2}{n}\int_{0}^{n}  \frac{1 - e^{-nx^2}}{x^2(1+nx^2)}dx $ $~~~~~~~~~\textbf{(1)}$
By setting $nx^2 = u$, we have $dx = \frac{1}{2\sqrt{n}} \times \frac{1}{\sqrt{u}}$ and $x = \frac{\sqrt{u}}{\sqrt{n}}$. So by substituting these in $\textbf{(1)}$ we have (I will not put bounds and at the end will come back to the initial bounds and also I will drop the constant in integrals)
$\textbf{(1)} = \lim_{n \rightarrow +\infty} \frac{2}{n} \int   \frac{1 - e^{-u}}{\frac{u}{n}(1+u)} \times \frac{1}{2 \sqrt{n}}\times \frac{1}{ \sqrt{u}} du = \lim_{n \rightarrow +\infty}  \frac{1}{\sqrt{n}} \int  \frac{1 - e^{-u}}{ u \sqrt{u}(1+u)}   du $ 
$= \lim_{n \rightarrow +\infty}  \frac{1}{\sqrt{n}} \int  ( \frac{1 }{ u \sqrt{u}(1+u)}  - \frac{e^{-u} }{ u \sqrt{u}(1+u)}) du$ $~~~~~~~~~\textbf{(2)}$
By setting $\sqrt{u} = v$, we have $\frac{1}{2\sqrt{u}}du = dv$. So by substituting these in $\textbf{(2)}$ we have
$\textbf{(2)} = \lim_{n \rightarrow +\infty}  \frac{2}{\sqrt{n}} \int (\frac{1}{v^2(1+v^2)} - \frac{e^{-v^2}}{v^2(1+v^2)} dv) $ $~~~~~~~~~\textbf{(3)}$
$\textbf{(3)}= \lim_{n \rightarrow +\infty}  \frac{2}{\sqrt{n}} \int ( \frac{1}{v^2} - \frac{1}{1+v^2}  - \frac{e^{-v^2}}{v^2} +  \frac{e^{-v^2}}{v^2 + 1})  dv$
Now we will calculate each term separately.
First part:


For to find $\int \frac{1}{v^2} dv $, by setting $k_1=-\frac{1}{v}$, we have $dk_1 =\frac{1}{v^2} dv$ and so we have $\int \frac{1}{v^2} dv = \int dk_1= k_1= -\frac{1}{v}= -\frac{1}{\sqrt{u}}= -\frac{1}{\sqrt{nx^2}} = -\frac{1}{\sqrt{n}|x|} $


Second part:


For to find $-\int \frac{1}{1+v^2} dv$, by setting  $k_2 = \arctan(v)$, we have $dk_2 = \frac{1}{1 + v^2}dv$ and so we have $-\int \frac{1}{1+v^2} dv = -int dk_2= -k_2= -\arctan(v) = -\arctan(\sqrt{u}) = -\arctan(\sqrt{nx^2}) = -\arctan(\sqrt{n}|x|) $


Third part:


For to find $-\int \frac{e^{-v^2}}{v^2} dv $, by setting $\begin{cases}
               k_3=e^{-v^2}\\
               -\frac{1}{v^2}=dk_4
            \end{cases}$ we will have $\begin{cases}
               dk_3=-2ve^{-v^2}\\
               k_4= \frac{1}{v}
            \end{cases}$ and our integral will transform to $-\int \frac{e^{-v^2}}{v^2} dv = \frac{e^{-v^2}}{v} - 2 \int e^{-v^2} dv =  \frac{e^{-v^2}}{v} - 2(\frac{\sqrt{\pi}}{2}) = \frac{e^{-v^2}}{v} - \sqrt{\pi} =  \frac{e^{-(\sqrt{u})^2}}{\sqrt{u}} - \sqrt{\pi} = \frac{e^{-u}}{\sqrt{u}} - \sqrt{\pi} =\frac{e^{-nx^2}}{\sqrt{nx^2}} - \sqrt{\pi}=\frac{e^{-nx^2}}{\sqrt{n}|x|} - \sqrt{\pi}$


Forth part:


For to find $\int \frac{e^{-v^2}}{v^2 + 1} dv$, I cannot find it!


Can someone please help me to find $\int \frac{e^{-v^2}}{v^2 + 1} dv$?
Thanks!

Unfortunately, this integral has no closed form in terms of known functions, elementary or non-elementary. You'd have to integrate it numerically if you want to do anything practical with it.
The series expansion of the integral (at $x=0$), while by no means a closed form, is, according to W|A:
$$\int \frac{e^{-v^2}}{v^2 + 1} dv \approx x - \frac{2 x^3}3 + \frac{x^5}2 - \frac{8x^7}{21} + \frac{65 x^9}{216} - \frac{163 x^11}{660} + O(x^{13}) $$
And of your original integral:$$\int \frac{e^{-nx^2}}{x^2(1 + nx^2)} dx \approx -\frac 1x - 2 n x + \frac{5 n^2 x^3}6 - \frac{8 n^3 x^5}{15} + O(x^6) $$
