# How do you determine if the following integral is convergent or divergent using the comparison theorem? int_0^oo (arctan(x))/(2+e^x)dx

Convergent!

#### Explanation:

The first thing to do is get rid of the arctan. We can do this by realizing that as $x \to \infty$, $\arctan \left(x\right) \to \frac{\pi}{2}$. We can see this from the graph (or just by knowing that tan(x) has horizontal asymptotes at $x = \frac{\pi}{2}$):

This means that $\arctan \left(x\right)$ on $\left[0 , \infty\right) \le \frac{\pi}{2}$ and therefore

${\int}_{0}^{\infty} \arctan \frac{x}{2 + {e}^{x}} \mathrm{dx} \le \frac{\pi}{2} {\int}_{0}^{\infty} \frac{1}{2 + {e}^{x}} \mathrm{dx}$

This is still a bit tricky to integrate, so we can simplify further:

$2 + {e}^{x} > {e}^{x}$ which means

$\frac{1}{2 + {e}^{x}} < \frac{1}{e} ^ x$ so,

$\frac{\pi}{2} {\int}_{0}^{\infty} \frac{1}{2 + {e}^{x}} \mathrm{dx} \le \frac{\pi}{2} {\int}_{0}^{\infty} \frac{1}{{e}^{x}} \mathrm{dx}$

Now we have:

${\int}_{0}^{\infty} \arctan \frac{x}{2 + {e}^{x}} \mathrm{dx} \le \frac{\pi}{2} {\int}_{0}^{\infty} \frac{1}{{e}^{x}} \mathrm{dx}$

and $\frac{\pi}{2} {\int}_{0}^{\infty} \frac{1}{{e}^{x}} \mathrm{dx}$ is something we can integrate!

$\frac{\pi}{2} {\int}_{0}^{\infty} \frac{1}{{e}^{x}} \mathrm{dx} = {\lim}_{t \to \infty} \frac{\pi}{2} {\int}_{0}^{t} {e}^{-} x \mathrm{dx}$

$= {\lim}_{t \to \infty} \frac{\pi}{2} {\left[- {e}^{-} x\right]}_{0}^{t}$

$= {\lim}_{t \to \infty} \frac{\pi}{2} \left[- {e}^{-} t - \left(- {e}^{0}\right)\right]$

$= \frac{\pi}{2} \left[0 + 1\right]$

$= \frac{\pi}{2}$ so

${\int}_{0}^{\infty} \arctan \frac{x}{2 + {e}^{x}} \mathrm{dx} \le \frac{\pi}{2}$

and therefore it is convergent :)