# Nice result that I can't prove: $\int_{-2}^{2} \tan^{-1} \bigg( \exp(-x²\text{erf}(x)) \bigg) \;dx=\pi$

I'm always trying to find the integral representation of $$\pi$$ using some interesting special function, at this time I have got the below representation $$I=\int_{-2}^{2} \tan^{-1} \bigg( \exp(-x^2\text{erf}(x)) \bigg) \;dx=\pi$$ and according to Wolfram alpha its numerical value is very close to $$\pi$$.

The problem that I have accrossed is the closed form of : $$\exp(-x^2\text{erf}(x))$$ in the range $$[-2,2]$$ , I have used $$\mathrm{erf}\!\left(x\right)^2\approx1-\exp\Big(-\frac 4 {\pi}\,\frac{1+\alpha x^2}{1+\beta x^2}\,x^2 \Big)$$ $$\alpha=\frac{10-\pi ^2}{5 (\pi -3) \pi }$$ $$\beta=\frac{120-60 \pi +7 \pi ^2}{15 (\pi -3) \pi }.$$ The value of the corresponding error function is $$1.1568\times 10^{-7}$$ that is to say almost $$250$$ times smaller than with the initial formulation. The maximum error is $$0.00035$$. But when we try to replace that approximation in $$\tan^{-1}$$ for evaluation the formula would be complicat to integrate it. My question here is if this result is known. Is it $$\pi$$? If no any simple way for integration ?

• That approximation of the erf is out by a factor of 250!? That's not a very good approximation then ... or have I misunderstood you? – AmbretteOrrisey Dec 3 '18 at 22:03

Yes, the integral $$I$$ is equal to $$\pi$$. Note that for $$t>0$$ $$\arctan(t)+\arctan(1/t)=\pi/2.$$ and after letting $$y=-x$$ we get $$I:=\int_{-2}^{2} \tan^{-1} \bigg( \exp(-x^2\text{erf}(x)) \bigg) \;dx =\int_{-2}^{2} \tan^{-1} \bigg( \exp(y^2\text{erf}(y)) \bigg) \;dy.$$ Hence $$I=\frac{1}{2}\int_{-2}^{2}\arctan(t(x))+\arctan(1/t(x))dx=\frac{\pi/2\cdot 4}{2}=\pi$$ where $$t(x)=\exp(-x^2\text{erf}(x))$$.
The same argument holds if we replace $$-x^2\text{erf}(x)$$ with any odd function (see Michael Seifert's comment below).
• Note that this argument would still work, and the integral would still be $\pi$, if you replaced $x^2 \mathrm{erf}(x)$ by any odd function $f(x)$. – Michael Seifert Dec 3 '18 at 20:01