# Determining the convergence or divergence of three improper integrals

I am trying to use the comparison test to determine the convergence or divergence of three improper integrals:

1. $\int_{-\infty}^{\infty}\frac{dx}{e^x+e^{-x}}$
2. $\int_{-\infty}^{\infty}\frac{dx}{e^x-e^{-x}}$
3. $\int_{-\pi}^{\pi}\frac{dx}{\sin x}$

For the first one, we have $\int_{-\infty}^{\infty}\frac{dx}{e^x+e^{-x}}\le\int_{-\infty}^{0}\frac{dx}{e^{-x}}+\int_{0}^{\infty}\frac{dx}{e^x}=e^x\vert_{-\infty}^0-e^{-x}\vert_0^{\infty}=1+1=2$. Therefore, it converges.

The second one seems to diverge on the graph. I need a smaller function to test it. $-\frac12e^x$ is smaller for $(-\infty,0]$ and $\frac12e^{-x}$ is smaller for $[0,\infty)$, but unfortunately both of them converge.

The thrid one, too, seems to diverge on the graph. But the only smaller functions I can think of are $\sin x$ and $\cos x$, both of which converge.

How should I proceed?

For the second one and using the Limit Comparison Test: $$\lim_{x\to 0^+}\frac{\dfrac{1}{e^x-e^{-x}}}{\dfrac{1}{x}}=\lim_{x\to 0^+}\frac{x}{e^x-e^{-x}}\underbrace{=}_{\text{L'Hopital}}\frac{1}{2}\ne 0\Rightarrow \int_{0}^{1}\frac{dx}{e^x-e^{-x}}\sim \int_{0}^{1}\frac{dx}{x}.$$ $$\displaystyle\int_{0}^{1}\frac{dx}{x} \text{ divergent}\Rightarrow \displaystyle\int_{0}^{1}\frac{dx}{e^x-e^{-x}} \text{ divergent}$$ $$\Rightarrow \displaystyle\int_{0}^{+\infty}\frac{dx}{e^x-e^{-x}}\text{ divergent}\Rightarrow \displaystyle\int_{-\infty}^{+\infty}\frac{dx}{e^x-e^{-x}}\text{ divergent}.$$ For the third one, same arguments: $$\lim_{x\to 0^+}\frac{\dfrac{1}{\sin x}}{\dfrac{1}{x}}=1\Rightarrow\ldots$$
• Actually, I tried $\frac1x$, but $\frac1x\ge\frac{1}{e^x-e^{-x}}\ge0$. Does divergence of $\frac1x$ really imply that of $\frac{1}{e^x-e^{-x}}$? – W. Zhu Jan 11 '17 at 6:26