A continuous function $f:[0,\infty)\to \mathbb{R}$ such that $\lim\limits_{x\to \infty} \left(f(x)+\int_0^x f(t) dt \right)=0$ Let $f:[0,\infty)\to \mathbb{R}$ be a continuous function such that $\lim\limits_{x\to \infty} \left(f(x)+\int_0^x f(t) dt \right)=0$. Prove that $$\lim \limits_{x\to \infty} \int_0^x f(t)dt=0.$$
I don't understand the solution presented in my book. They start by saying that $$\lim_{x\to\infty}\int_0^x f(t) dt= \lim_{x\to \infty} \frac{e^x \cdot \int_0^x f(t)dt}{e^x}$$and then they apply L'Hospital's rule. Why is this allowed? We don't know the limit of the numerator, so we can't be sure that this is $\frac{\infty}{\infty}$.
 A: I'll try to prove is directly,
avoiding L'Hopital.
Let
$g(x)
=f(x)+\int_0^x f(t) dt
=F'(x)+F(x)
$
where
$F(x)
=\int_0^x f(t) dt
$.
Then
$g(x) \to 0$
as $x \to \infty$.
Then
$(e^xF(x))'
=e^x(F'(x)+F(x))
=e^xg(x)
$
so
$$(e^xF(x))|_a^b
=\int_a^b e^xF(x) dx
=\int_a^b e^xg(x)dx
$$
For any $c > 0$,
choose $a$ such that
$|g(x)| < c$
for $x \ge a$.
Then,
for any $b > a$,
$\begin{array}\\
|\int_a^b e^xg(x)dx|
&\le c|\int_a^b e^xdx|\\
&=c(e^b-e^a)\\
&\le ce^b\\
\text{and}\\
|(e^xF(x))|_a^b|
&=|e^bF(b)-e^aF(a)|\\
&\ge|e^bF(b)|-|e^aF(a)|\\
\text{so}\\
|e^bF(b)|-|e^aF(a)|
&\le ce^b\\
\text{or}\\
|e^bF(b)|
&\le ce^b+|e^aF(a)|\\
\text{or}\\
|F(b)|
&\le c+e^{-b}|e^aF(a)|\\
&\le 2c
\qquad\text{by choosing }e^{b}>|e^aF(a)|/c\\
\end{array}
$
Therefore
$|F(b)| < 2c$
for all $b > \max(a, \ln(|e^aF(a)|/c))
$
where $|g(x)| < c$
for $x > a$,
so that
$F(x) \to 0$.
A: L'Hospital's rule can be applied here because it is sufficient that  the denominator diverges to $\infty$. This (perhaps not so well-known case) is hidden as a remark in L'Hôpital's rule – General proof on Wikipedia:

This means that if $|g(x)|$ diverges to infinity as $x$ approaches $c$ and both $f$ and $g$ satisfy the hypotheses of L'Hôpital's rule, then no additional assumption is needed about the limit of $f(x)$.

Here we have (for $x \to \infty$)
$$
 f(x) = \frac{e^x \cdot \int_0^x f(t)dt}{e^x} \sim \frac{e^x \cdot \int_0^x f(t)dt + e^x f(x)}{e^x} = f(x)+\int_0^x f(t) dt
$$
and the right-hand side converges to zero. L'Hospital's rule then implies that the left-hand side converges to zero as well.
