# calculating the integral $\int x^{-2} e^{-x^2}dx$

How can I calculate the integral $\int x^{-2} e^{-x^2}dx$. Is it possible to calculate? I think it is impossible.

• It's impossible to represent the result by means of "elementary" functions, however using partial integration one can deduce a representation involving the error function $\mathrm{erf}$, for which there are many rapidly converging approximations. – AlexR Jan 12 '14 at 18:56
• Ok AlexR. Thanks. So it is impossible to find an elementary function. – 6-0 Jan 12 '14 at 19:02
• By the usual notion of elementary function, yes. Only a sequence of elementary functions can be given which converges to the desired function. – AlexR Jan 12 '14 at 19:03

Integrate by parts. $u=e^{-x^2}$ and $dv=x^{-2}dx$. $$\int x^{-2}e^{-x^2}=-x^{-1}e^{-x^2}-2\int e^{-x^2}dx=-x^{-1}e^{-x^2}-\sqrt{\pi}\operatorname{erf}(x)$$

• erf(x) is the error function. but I have another question. Can we find Exact answer? – 6-0 Jan 12 '14 at 19:00
• @hamed: Gaffney already gave an exact answer in terms of Erf. – DumpsterDoofus Jan 12 '14 at 19:03

It's somewhat impossible to compute the integrand. Based on WolframAlpha, you get the following expression:

$$\int x^{-2}e^{-x^{2}}\,dx = -\dfrac{\sqrt{\pi}x\,\mathrm{erf}(x) + e^{-x^2}}{x} + \mbox{C}$$

• I'm not really sure of your first sentence. Nonelementary functions are just as valid as elementary ones. – Ayesha Jan 12 '14 at 19:45

Integrating by parts you'll get the general expression $$\int x^{-2}e^{-x^2}=-x^{-1}e^{-x^2}-2\int e^{-x^2}dx$$ but if you want to evaluate the integral over $[-\infty,+\infty]$, by the gaussian integral the result is $-2 \sqrt{\pi}$

• That would be surprising, as the integrand is always positive. I think the issue is that the integral diverges at zero. – Slade Jan 12 '14 at 19:08
• You're right, it's wrong, but where's the mistake? The use of the error function is essentially I imagine – Matheman Jan 12 '14 at 19:16
• Well, suppose I told you that $\int_{-\infty}^\infty x^{-2} = -x^{-1}|_{-\infty}^\infty = 0$. You can't do this when the thing you're integrating isn't defined everywhere. – Slade Jan 12 '14 at 19:19
• What a mistake! the function isn't defined in $(0,0)$. Forget it! – Matheman Jan 12 '14 at 19:41