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

It appears by numerical evaluation that:

$$\int_0^\infty \exp \left(-x^2 \left( 1-\frac{4}{x^2-2}\right)^2 \right) dx=\int_0^\infty \exp (-x^2) dx=\frac{\sqrt{\pi}}{2}$$

The plot of the difference between functions on the RHS and the LHS can be seen below: It's easy to see that $x=2$ is the positive solution to $\left( 1-\frac{4}{x^2-2}\right)^2=1$.

I don't know how to solve the first integral, but maybe we can prove the equality by some indirect means?

If any substitution is possible, I don't know what that is. I've tried several, but they just lead to more complicated expressions.

Also, I would like to know if this integral has a closed form (at least in terms of known special functions):

$$\int_0^2 \left( \exp (-x^2)- \exp \left(-x^2 \left( 1-\frac{4}{x^2-2}\right)^2 \right) \right)dx$$

Edit

What if we just prove by some substitution that:

$$\int_0^2 \left( e^{-x^2}- \exp \left(-x^2 \left( 1-\frac{4}{x^2-2}\right)^2 \right) \right)dx= \\ =\int_2^\infty \left( \exp \left(-u^2 \left( 1-\frac{4}{u^2-2}\right)^2 \right)-e^{-u^2} \right)du$$

• $-x^2 \cdot \left( 1-\frac{4}{x^2-2}\right)^2$=$-x^2+8-\frac{32}{x^4}+...$ when series-expanded at infinity. Not certain if they're identical so much as asymptotically similar. – KR136 Jun 9 '16 at 18:24
• @Αδριανός, the integrals are equal, but the exponents are obviously not. I've tried the series approach, but it didn't work for me – Yuriy S Jun 9 '16 at 18:27

Hint. One may recall G. Boole's result, for any integrable function $f$, we have
$$\int_{-\infty}^{+\infty}f\left(x-\sum_{k=0}^n\frac{a_k}{x-b_k}\right)\mathrm{d}x=\int_{-\infty}^{+\infty} f(x)\: \mathrm{d}x, \quad a_k>0. \tag1$$
Then apply $(1)$ with $f(x)=e^{-x^2}$, $a_0=a_1=2$, $b_0=-\sqrt{2}=-b_1$.