8

How to integrate $\displaystyle 1-e^{-1/x^2}$ ?

as hint is given: $\displaystyle\int_{\mathbb R}e^{-x^2/2}=\sqrt{2\pi}$

If i substitute $u=\dfrac{1}{x}$, it doesn't bring anything:

$\,\displaystyle\int\limits_{-\infty}^{\infty}\left(1-e^{-1/x^2}\right)dx=\int\limits_{-\infty}^{0}\left(1-e^{-1/x^2}\right)dx+\int\limits_{0}^{\infty}\left(1-e^{-1/x^2}\right)dx\overset{?}=2\int\limits_{0}^{\infty}\left(1-\frac{e^{-u^2}}{-u^2}\right)du$

$2\displaystyle\int\limits_{0}^{\infty}\left(1-\frac{e^{-u^2}}{-u^2}\right)du=?$

How to continue ?

$\textbf{The original exercise was}$:

If a probability has a density $f(x)=C(1-e^{-1/x^2})$ then determine the value of constant $C$

Since $\displaystyle\int f\overset{!}=1$, i thought first to calculate the expression above.

($\textbf{ATTENTION:}$ Question edited from integrating $e^{-1/x^2}$ to integrating $1-e^{-1/x^2}$)

derivative
  • 2,450
  • 1
    @Git Gud No gamma function please. – derivative Mar 20 '14 at 15:52
  • the value of the integral $ \int_{0}^{\infty} e ^{- u^2}$ is $\sqrt{\pi} / 2$ , if i dont forget. (but i dont remenber how to evaluate )) – math student Mar 20 '14 at 15:54
  • 2
    In your integration by parts, you incorrectly calculated the boundary term to be zero. It's actually infinite, and so your integral diverges. – David H Mar 20 '14 at 15:58
  • @derivative there is one easy way to evaluate the above integral using double integrals – happymath Mar 20 '14 at 15:58
  • @DavidH you mean $2e^{-u^2}\frac{1}{u}\Biggr|_0^{\infty}=\infty$ – derivative Mar 20 '14 at 16:01
  • @derivative: your integral is infinite, as the integrand goes to $1$ at both ends of the interval. Do you mean to integrate $\exp(-x^2)$? That one is finite. See this – Ross Millikan Mar 20 '14 at 16:05
  • 1
    You definitely need to integrate $1-\exp(\frac {-1}{x^2})$ That one converges. It looks like you should be able to transform it to something involving $\exp(-x^2)$ because the answer is $2\sqrt \pi$ from Alpha – Ross Millikan Mar 20 '14 at 16:18
  • @2012ssohn When I edited question I set $e^{-1/x^2}$ because $e^{-\frac{1}{x^2}}$ looks to small to my eyes (that $x$ looks like $z$ in second variant). Now, I see that is again $e^{-\frac{1}{x^2}}$. I just want to say that. – Cortizol Mar 20 '14 at 18:08
  • @Cortizol - Sorry about that. Looks like our revisions were submitted almost simultaneously. Less than a second apart, as a matter of fact! I'll edit that. – 2012ssohn Mar 20 '14 at 18:24

6 Answers6

11

First integrate by part and then substitute $x$ by $1/y$. $$\begin{align} \int_0^\infty (1-e^{-1/x^2})dx &= \left[(1-e^{-1/x^2})x\right]_0^\infty - \int_0^\infty x \left(-\frac{2}{x^3}\right) e^{-1/x^2} dx\\ &= 2\int_0^\infty e^{-y^2} dy = \sqrt{\pi} \end{align} $$

achille hui
  • 122,701
6

Here is another technique of introducing a parameter. Indeed, let us consider the integral

$$ I(s) = \int_{-\infty}^{\infty} (1 - e^{-s/x^{2}}) \, dx $$

instead. We then want to find the value if $I(1)$. To this end, we calculate $I'(s)$ and appeal to the Fundamental Theorem of Calculus.

We first simplify $I(s)$ by using change of variable. Let $u = 1/x$. Then by symmetry,

$$ I(s) = 2\int_{0}^{\infty} (1 - e^{-s/x^{2}}) \, dx = 2\int_{0}^{\infty} \frac{1 - e^{-su^{2}}}{u^{2}} \, du. $$

Then we differentiate both sides with respect to $s$. Exploiting Leibniz's integral rule yields

$$ I'(s) = 2\int_{0}^{\infty} \frac{\partial}{\partial s} \frac{1 - e^{-su^{2}}}{u^{2}} \, du = 2\int_{0}^{\infty} e^{-su^{2}} \, du. $$

Now with the additional substitution $v = \sqrt{2s}u$ (where $s > 0$), we have

$$ I'(s) = \sqrt{\frac{2}{s}} \int_{0}^{\infty} e^{-v^{2}/2} \, dv = \frac{1}{\sqrt{2s}} \int_{-\infty}^{\infty} e^{-v^{2}/2} \, dv = \sqrt{\frac{\pi}{s}}. $$

But it is trivial that $I(0) = 0$ (since the integrand vanishes identically). Therefore by the Fundamental Theorem of Calculus,

$$ I(1) = I(0) + \int_{0}^{1} I'(s) \, ds = \int_{0}^{1} \sqrt{\frac{\pi}{s}} \, ds = \left. 2\sqrt{\pi s} \vphantom{\int} \right|_{0}^{1} = 2\sqrt{\pi}. $$

Sangchul Lee
  • 167,468
4

Hint: What is $\lim_{x\rightarrow \infty}e^{{-1}/{x^2}}$ ?

1

$\int\left(1-e^{-\frac{1}{x^2}}\right)dx$

$=\int\left(1-\sum\limits_{n=0}^\infty\dfrac{(-1)^nx^{-2n}}{n!}\right)dx$

$=\int-\sum\limits_{n=1}^\infty\dfrac{(-1)^nx^{-2n}}{n!}dx$

$=-\sum\limits_{n=1}^\infty\dfrac{(-1)^nx^{1-2n}}{n!(1-2n)}+c$

$=\sum\limits_{n=1}^\infty\dfrac{(-1)^n}{n!(2n-1)x^{2n-1}}+c$

$\because\int_{-\infty}^\infty\left(1-e^{-\frac{1}{x^2}}\right)dx$

$=\int_{-\infty}^0\left(1-e^{-\frac{1}{x^2}}\right)dx+\int_0^\infty\left(1-e^{-\frac{1}{x^2}}\right)dx$

$=\int_\infty^0\left(1-e^{-\frac{1}{(-x)^2}}\right)d(-x)+\int_0^\infty\left(1-e^{-\frac{1}{x^2}}\right)dx$

$=\int_0^\infty\left(1-e^{-\frac{1}{x^2}}\right)dx+\int_0^\infty\left(1-e^{-\frac{1}{x^2}}\right)dx$

$=2\int_0^\infty\left(1-e^{-\frac{1}{x^2}}\right)dx$

$=2\int_\infty^0\left(1-e^{-x^2}\right)d\left(\dfrac{1}{x}\right)$

$=2\left[\dfrac{1-e^{-x^2}}{x}\right]_\infty^0-2\int_\infty^0\dfrac{1}{x}d\left(1-e^{-x^2}\right)$

$=4\int_0^\infty e^{-x^2}~dx$

$=2\sqrt\pi$

$\therefore C=\dfrac{1}{2\sqrt\pi}$

Harry Peter
  • 7,819
0

The integral $$\int_{-\infty}^\infty \exp(-1/x^2)dx$$diverges, because $\exp(-1/x^2)\ge \frac 1e$ whenever $|x|>1$ and hence $$\int_{-\infty}^\infty \exp(-1/x^2)dx> 2\int_1^\infty \frac{dx}{e}=+\infty. $$

TZakrevskiy
  • 22,980
0

$$\int_0^\infty\bigg(1-e^{^{-\tfrac1{x^2}}}\bigg)dx=\sqrt\pi.$$ This can relatively easily be proven by letting $t=e^{^{-\tfrac1{x^2}}}$, and then using Euler's initial logarithmic expression for the $\Gamma$ function. But you said that this is apparently not allowed and I'm afraid that I don't know any other approaches either. :-(

Lucian
  • 48,334
  • 2
  • 83
  • 154