# Comparison test on $1/(e^x)$ vs $1/(e^x+1)$

Comparison test says that if bigger function is convergent then smaller one must be convergent.But here in this example it doesn't work and I want to know why?

$$1/(e^x)$$ is bigger or equal to $$1/(e^x+1)$$ ( between zero and infinite) Improper integral $$\int_0^\infty \frac{1}{(e^x)} dx$$ is convergent and it is $$1$$ however, improper integral $$\int_0^\infty\frac{ 1}{ (e^x+1)}dx$$ is divergent.

• The second integral is not divergent. It is equal to $ln(2)$. Please check your computations.
– maq
May 26 '17 at 7:57
• thanks but :( i cant understand how , because there is inf-inf . lim(t->inf)[t-ln(1+e^t)+ln(2)] May 26 '17 at 8:23

One has $$0<\frac1{e^x+1}<\frac1{e^x},\qquad x\ge0,$$ giving $$0<\int_0^\infty\frac1{e^x+1}\:dx<\int_0^\infty\frac1{e^x}\:dx=\lim_{M\to\infty}\left[-e^{-x} \right]_0^M=\color{red}{-0}+1<\infty$$ and one may observe that $$\int_0^\infty\frac1{e^x+1}\:dx=\lim_{M\to\infty}\int_0^M\frac{e^{-x}}{1+e^{-x}}\:dx=\lim_{M\to\infty}\left[-\ln(1+e^{-x}) \right]_0^M=\color{red}{-0}+\ln 2.$$