Here is a question that really has puzzled me for quite a while. I happened to see this function defined in terms of an integral $$f(x):=\int_0^{\pi/2}\frac{2e^{x+e^x\cos y}}{1+\left(e^{e^x\cos y}\right)^2}dy.$$I want to analyze the behavior of the function when $x \rightarrow \infty$.
The strange thing is that when I used Mathematica to plot the function, the graph indicates that $\lim_{x\rightarrow \infty} f(x)=0$. However, it is easy to see that $\liminf_{x\rightarrow \infty}f(x) \ge \frac{\pi}{4}$, since $$\int_0^{\pi/2}\frac{2e^{x+e^x\cos y}}{1+\left(e^{e^x\cos y}\right)^2} \, dy \ge \int_0^{\pi/2}\frac{2e^{x+e^x\cos y}\sin y}{1+\left(e^{e^x\cos y}\right)^2}\, dy\\ =-\Big(\tan^{-1}\left(e^{e^x \cos y}\right)\Big)\Big|_{0}^{\pi/2}\\=\tan^{-1}\left(e^{e^x}\right)-\pi/4$$
Now I have two questions:
First, why the result from Mathematica is different from what I obtained?
Second, does $\lim_{x\rightarrow \infty} f(x)$ exist?
Maybe this question is not so suitable for mathoverflow, since it is just a calculus problem. However, I just feel so confused about the contradiction of numerical result and math. I want to understand the reason behind this situation. Any comments are really appreciated. Thank you very much.
Below is the code and picure I got from Mathematica....