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). 
 A: 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}$$
A: 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$$
A: 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?
A: 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}$$
