I have an Integrand involving two exponential terms:
$$ \int_{0}^{\infty} \frac{\exp(x^2)}{(1+\exp(x^2))^2} dx $$
I would like to know what is the best way to integrate such a function without blowing it up?
What if $x^2$ is replaced by two variables $(x^2 + y^2)$ and we have a double integral?
Will the method of integration remain the same?
I use python and matlab for calculations.
Thanks
Notation fixed.
You integral can be written as $$I=\frac{1}{4}\int_{0}^{+\infty}\frac{dx}{\cosh^2\left(\frac{x^2}{2}\right)}\,dx=\frac{1}{4\sqrt{2}}\int_{0}^{+\infty}\frac{dz}{\sqrt{z}\cosh^2(z)}=\frac{1}{8\sqrt{2}}\int_{0}^{+\infty}\frac{\tanh(z)}{z^{3/2}}\,dz $$ and due to the identity $$ \tanh(z) = \sum_{n\geq 0}\frac{8z}{(2n+1)^2 \pi^2+ 4z^2} $$ that follows from considering the logarithmic derivative of the Weierstrass product for the $\cosh$ function, we have: $$ I = \frac{1}{\sqrt{2}}\sum_{n\geq 0}\int_{0}^{+\infty}\frac{dz}{\sqrt{z}\left[(2n+1)^2 \pi^2+ 4z^2\right]}=\frac{1}{2\sqrt{2\pi}}\sum_{n\geq 0}\frac{1}{(2n+1)^{3/2}}$$ hence: $$ \boxed{I = \color{red}{\frac{2\sqrt{2}-1}{8\sqrt{\pi}}\,\zeta\left(\frac{3}{2}\right)}\approx 0.336859119428877} $$
For the two-variables integral you may ust switch to polar coordinates and apply the same technique, leading to a value of $\color{red}{\frac{\pi}{8}}$.