With $f(y)\le f(x)+\int_x^y g(t)\,\mathrm{d}t$, show that $\lim_{x\to +\infty} f(x)$ exists Given two non-negative functions $f(x)$ and $g(x)$ on $[0,+\infty)$, $\int_0^{+\infty}g(x)\,\mathrm{d}x<+\infty$, and $f(y)\le f(x)+\int_x^y g(t)\,\mathrm{d}t$ for $0<x<y$. Show that $\lim_{x\to +\infty}f(x)$ exists.
My idea is to use Cauchy's criterion. For each $\varepsilon>0$, we can find $M>0$ such that $\int_x^y g(t)\,\mathrm{d}t<\varepsilon$ for $y>x>M$. From this we have $f(y)-f(x)<\varepsilon$. However, we still need $f(y)-f(x)>-\varepsilon$. And the condition $f(x)\ge 0$ has not been used yet.
 A: Let $\epsilon>0$ be arbitrary and define
$$A=\liminf_{x\to\infty}f(x)\geq 0$$
By definition, there exists a sequence $x_n$ such that $x_n\to\infty$ and
$$\lim_{n\to\infty}f(x_n)=A$$
which implies there exists $N_1$ such that $n\geq N_1$ implies
$$f(x_n)<A+\frac{\epsilon}{2}$$
Additionally, there is $M_1$ such that $x>M_1$ implies
$$f(x)>A-\epsilon$$
From you, use Cauchy's Criterion to find $M_2$ such that $M_2<x<y$ implies
$$\int_{x}^y g(t)dt<\frac{\epsilon}{2}$$
Since $x_n\to\infty$, there exists $N_2$ such that $n\geq N_2$ implies $x_n>\max\{M_1,M_2\}$. Choose $r=\max\{N_1,N_2\}$. But then we have
$$A-\epsilon<f(y)\leq f(x_r)+\int_{x_r}^yg(t)dt<A+\frac{\epsilon}{2}+\frac{\epsilon}{2}=A+\epsilon$$
$$\Rightarrow |A-f(y)|<\epsilon$$
Since $\epsilon>0$ was arbitrary, we are done.
A: Once $g(t)\geq 0$ we have
$$
\int_{x}^{y} g(t) \,\mathrm{d} t 
\leq 
\int_{x}^{\infty} g(t) \,\mathrm{d} t 
\leq 
\int_{0}^{\infty} g(t) \,\mathrm{d} t
$$
and
$$
f(y)\leq f(x)+\int_{x}^{y} g(t) \,\mathrm{d} t 
\leq 
f(x)+\int_{x}^{\infty} g(t) \,\mathrm{d} t 
\leq 
f(x)+\int_{0}^{\infty} g(t) \,\mathrm{d} t
$$
Therefore there is $\limsup_{y\to \infty} f(y)$ and
$$
\limsup_{y\to \infty} f(y)
\leq 
f(x) + \int_{0}^{\infty} g(t) \,\mathrm{d} t 
$$
On the other hand, if $f$ is continuous we have that
$$
\limsup_{y\to \infty} f(y)= \liminf_{y\to \infty} f(y)=\lim_{y\to \infty} f(y)
$$
To prove that $f$ is continuous it is enough to observe that
$$
\lim_{y\to x}|f(y)-f(x)| \leq \lim_{y\to x}\left|\int_{x}^{y}g(t) \, \mathrm{d} t\right|=0
$$
A: I find an approach recently, which might be more skillful.
Set $h(x)=f(x)-\int_0^x g(t)\, dt$. Since $\int_0^{+\infty} g(t)\,dt$ converges, we need to prove that $\lim_{x\to+\infty}h(x)$ exists.
As $f(y)\le f(x)+\int_x^y g(t)\,dt$ for $0<x<y$, we see that $h(x)$ is monotone decreasing. Thus we are left to show that $h(x)$ is lower bounded.
This is obvious: $0\le \int_0^x g(t)\,dt\le \int_0^{+\infty} g(t)\,dt$ for each $x\ge 0$. From this we get $h(x)\ge -\int_0^{+\infty} g(t)\,dt$. This completes the proof.
