# Does $\int _1^{\infty }\left(\arctan\left(e^x\right)-\frac{\pi }{2}\:\right)\:dx$ converge?

I'm trying to understand if the following integral converges. $$\int _1^{\infty }\left(\arctan\left(e^x\right)-\frac{\pi }{2}\:\right)\:dx$$

I've tried using the integral test but not all conditions hold (it's not monotone decreasing).

• Side note: the integrand is monotone increasing, but negative, and thus qualifies for an integral test. – Jean-Claude Arbaut May 23 '18 at 20:19
• I see now that it's negative. But since it's increasing and not decreasing how can it still be qualified for the integral test? – Alon Weissfeld May 23 '18 at 20:26
• Consider the integral $$\int _1^{\infty }\left(\frac{\pi }{2}-\arctan\left(e^x\right)\:\right)\:dx$$ – Jean-Claude Arbaut May 23 '18 at 20:32
• @AlonWeissfeld We can simply refer to limit comparison test math.stackexchange.com/questions/1906781/… – gimusi May 23 '18 at 21:13
• Not only does it converge, but you could even have a closed-form expression of its value - that is, had you chosen the more natural lower limit of $0$. – Ivan Neretin May 24 '18 at 6:27

HINT

Note that for $x\to \infty$

$$\arctan\left(e^x\right)-\frac{\pi }{2}=\frac{\pi }{2}-\arctan\left(\frac1{e^x}\right)-\frac{\pi }{2}\sim -\frac1{e^x}$$

With $t=e^{-x}$, the integral turns to $$-I=\int_0^{1/e}\frac{\frac\pi2-\arctan\frac1t}tdt=\int_0^{1/e}\frac{\arctan t}tdt.$$

This is convergent as the integrand is bounded.

By integrating the Taylor series in $t$, you can even estimate the integral from $x$ to infinity as

$$e^{-x}-\frac{e^{-3x}}{9}+\frac{e^{-5x}}{25}-\frac{e^{-7x}}{49}+\cdots(-1)^n\frac{{e^{-(2n+1)x}}}{(2n+1)^2}+\cdots$$

Alternatively, since $e^x$ grows faster than $x^2$, $y=arctan(e^x)$ grows faster to $\pi/2$ than $y=arctan(x^2)$. But $\int _1^{\infty }\left(\arctan\left(x^2\right)-\frac{\pi }{2}\:\right)\:dx$ can be shown to be convergent (which then implies that the integral in question also has to be convergent). With integration by parts you get the term $\frac{2x^2}{1+x^4}$ behind the integral sign, which obviously is convergent on given interval. The only indeterminate form for $x$ to $\infty$ is $x(arctanx^2-\pi/2)$, but when the $x$ upfront is written as $1/x$ in the denominator, L'Hospital Rule will do the job. You can work out the details?

Hint

Use that $$\arctan (e^x)-\frac {\pi}{2}=-\text {arccot} (e^x)=-\arctan (e^{-x})$$

But as $x\to \infty$ ,$e^{-x}\to 0$

And hence $$-\arctan (e^{-x}) \to -e^{-x}$$