If $\lim\limits_{x \to \infty} f(x) = 1$, can we have function $f(x)$, such that $\int_0^{\infty}f(x)dx$ converges I know the Initiative answer, can anyone give a neat answer based on solid reasoning
EDIT : $f(x)$ is continuous
 A: No. The limit means there exists an $N$ such that for all $x > N$,  $x$ is arbitrarily close to $1$.
This implies that $\int_N^{N+k} f(x)\, \mathrm{d}x$ can be made arbitrarily close to $k$. To find the infinite limit we must let $k \to \infty$ which implies the integral is divergent.
A: Since $\lim\limits_{x\to\infty}f(x)=1$ then there's $A>0$ such that $f(x)\ge\frac12$ for $x>A$ so for $\alpha>A$ we have
$$\int_0^\alpha f(x)dx=\int_0^Af(x)dx+\int_A^\alpha f(x)dx\ge \int_0^Af(x)dx+\frac12(\alpha-A)\xrightarrow{\alpha\to\infty}\infty$$
so the answer to your question is No!
A: If  $\lim\limits_{x \to \infty} f(x) = 1$,you can find such $y$, that for $x>y$ you have $f(x)>\frac{1}{2}$, so:
$$\int_0^{\infty}f(x)dx=\lim_{a \to \infty}\int_0^{a}f(x)dx=\\ =\lim_{a \to \infty}\int_{0}^{y} f(x) dx+\int_{y}^{a}f(x)dx=\int_{0}^{y} f(x) dx+\lim_{a \to \infty}\int_{y}^{a}f(x)dx< \\
\\ \int_{0}^{y} f(x) dx+\lim_{a \to \infty}\int_{y}^{a}\frac{1}{2}dx=\int_{0}^{y} f(x) dx+\lim_{a \to \infty}\frac{1}{2}(a-y)=\infty$$
A: No. 
If $\lim_{x\rightarrow\infty}f\left(x\right)=1$ then some $x_{0}$
exists with $x>x_{0}\Rightarrow f\left(x\right)\geq\frac{1}{2}$.
Consequently $\int_{x_{0}}^{\infty}f\left(x\right)dx=+\infty$ contradicting the convergence of $\int_{0}^{\infty}f\left(x\right)dx$.
A: Okay, I'll assume that $f$ is locally integrable (to ensure that $\int_0^R f$ is defined for every $R>0$), By assumption, there exists $R_0>0$ such that $f(x)>1/2$ for every $x>R_0$. Now,
$$
\int_0^\infty f(x)\, dx = \int_0^{R_0} f(x)\, dx + \int_{R_0}^\infty f(x)\, dx > \int_0^{R_0} f(x)\, dx + \int_{R_0}^\infty \frac{dx}{2},
$$
and the right-hand side is infinite.
A: So, what's missing in these various answers, is that there's an indeterminate case in addition to the case where the integral tends to $\infty$. You can construct the left-hand addend in everyone else's examples so that that integral tends to $-\infty$ as the lower bound of the integral goes to $0$. Then you end up with $-\infty + \infty$, which the OP originally interpreted as $0$, hence their confusion.  
Problem is, you've gone from the total integral $\to \infty$ (so doesn't converge) to the integral is indeterminate. Remember, a limit that $\to \infty - \infty$ does not $= 0$, it's indeterminate, and therefore it still doesn't converge.
