If f plus the integral of f has a finite limit, show that f tends to zero This is a problem from Pugh's Real Mathematical Analysis.

Let $f$ be a continuous real-valued function on $[0, \infty)$ such that $$\lim_{x \to \infty} \left( f(x) + \int_0^x f(t) \, dt \right)$$ exists (and is finite). Prove that $\lim_{x \to \infty} f(x) = 0$.

I found one solution to this problem by defining
\begin{gather}
g(x) = f(x) + \int_0^x f(t) \, dt \\
F(x) = \int_0^x f(t) \, dt
\end{gather}
and writing out the explicit solution to the ODE $F' + F = g$, then showing that $f = F' \to 0$ if $g \to L$, for some limit $L$. This solution is messy and involves showing that several terms that collectively bound $|f|$ can all be made arbitrarily small.
My gut feeling is that a nicer solution exists. Am I right?
 A: Let $ L = \lim_{x\to\infty} \left( f(x) + \int_{0}^{x} f(t) \, dt \right) $ denote the limit. We easily check that
$$ f(x) + \int_{0}^{x} f(t) \, dt = \frac{\frac{d}{dx} \left( e^{x} \int_{0}^{x} f(t) \, dt \right) }{\frac{d}{dx} e^{x}}. $$
Since $e^{x} \to \infty$ as $x \to \infty$, it satisfies the condition of L'hospital's rule and hence
$$ \lim_{x\to\infty} \int_{0}^{x} f(t) \, dt = \lim_{x\to\infty} \frac{e^{x} \int_{0}^{x} f(t) \, dt}{e^{x}} = L$$
Therefore
$$\lim_{x\to\infty} f(x) = \lim_{x\to\infty} \left( f(x) + \int_{0}^{x} f(t) \, dt - \int_{0}^{x} f(t) \, dt \right) = L - L = 0. $$
A: Let $L = \lim_{x \to \infty} f(x)+\int_0^x f(t)dt$.
Let $\phi(x) = e^x \int_0^x f(t)dt$, note that $\phi$ is differentiable, $\phi(0) = 0$ and $\lim_{x \to \infty} e^{-x}\phi'(x) = L$.
Let $\epsilon>0$, then for some $x_0$ if $x \ge x_0$ we have $|e^{-x}\phi'(x)-L| < \epsilon$, and so $|\phi'(x)-e^{x}L| < e^x \epsilon$. Integrating over $[x_0,x]$ gives
$| \phi(x)-\phi(x_0)-(e^x-e^{x_0})L| < (e^x-e^{x_0}) \epsilon$, and multiplying by $e^{-x}$ gives $| e^{-x}\phi(x)-e^{-x}\phi(x_0)-(1-e^{x_0-x})L| < (1-e^{x_0-x}) \epsilon$. Letting $x \to \infty$ shows that $\limsup_{x \to \infty} | e^{-x}\phi(x) -L| \le \epsilon$. Since $\epsilon>0$ was arbitrary, we have $\lim_{x \to \infty} e^{-x}\phi(x) = L$.
Consequently we see that $\int_0^x f(t)dt \to L$, from which we conclude that $f(x) \to 0$.
