# Convergence of $\int_{0}^{+\infty}f(x)dx$

How can I check convergence of $\int_{0}^{+\infty}f(x)dx$ for the following $f$?

1. $f(x)=\left(\frac{\sin x}{x}\right)^2$
2. $f(x)=\left(\frac{\cos x}{x}\right)^2$
3. $f(x)=\frac{1}{(1+x)^2}$
4. $f(x)=\frac{1-e^{-x}}{x}$
5. $f(x)=\frac{e^{x/2}}{x^{1/2}}$

What I've tried so far is write the improper integral as $$\int_{0}^1f+\int_{1}^{+\infty}f$$ I think one of 1 and 2 can not be both convergent since $\int_0^{\infty}\frac{1}{x^2}$ is not convergent. One can calculate that 3 is convergent. How about 4 and 5? I think one may use the comparison test to conclude that 4 and 5 are not convergent for $\int_0^1f$ and $\int_1^{\infty}f$. But how about $\int_0^{\infty}f$? Am I on the right track?

-
1 is convergent but 2 is not since $\cos(x)/x \to 1/x$ when $x \to 0$. – Patrick Li Nov 10 '12 at 4:30
4 is not since when $f(x) \sim 1/x$ when $x$ gets big. 5 is not convergent either. You can use expansion to check their asymptotic behaviors. – Patrick Li Nov 10 '12 at 4:31

As you pointed out, given functions have singularities possible at $x = 0$ and $x = \infty$. Thus it suffices to investigate the behavior of each function near these singularity candidates.

1. Since $\sin x = x + O(x^3)$ near $x = 0$, we have $\frac{\sin x}{x} = 1 + O(x^2)$. This proves that $x = 0$ is indeed a removable singularity of $f(x)$. It is also clear that $x = \infty$ is not a singularity since $$\int_{1}^{\infty} f(x) \, dx \leq \int_{1}^{\infty} \frac{dx}{x^2} = 1.$$ Therefore the improper integral of $f(x)$ over $(0, \infty)$ converges. Actually we can do more: $$\int_{0}^{\infty} \frac{\sin^2 x}{x^2} \, dx = \frac{\pi}{2}.$$

2. Since $\cos x = 1 + O(x^2)$ near $x = 0$, we have $\frac{\cos x}{x} = \frac{1}{x} + O(x)$. This obviously shows that $$\int_{0}^{1} f(x) \, dx = \int_{0}^{1} \left( \frac{1}{x} + O(x) \right) \, dx = \infty$$ and the integral does not converge.

4. Near $x = 0$, we have $e^{-x} = 1 - x + O(x^2)$, which implies that $f(x) = 1 + O(x)$ near $x = 0$. Thus it follows that $x = 0$ is a removable singularity. However, since $e^{-x} \leq e^{-1} < 1$ for $x \geq 1$, we can devise the following comparison: $$\int_{1}^{\infty} f(x) \, dx \geq \int_{1}^{\infty} \frac{1 - e^{-1}}{x} \,dx = \infty.$$ This proves that the integral diverges.
5. $f(x) \geq \frac{1}{x^{1/2}}$. Need more explanation?