# Problem

Suppose

$f:\Bbb R^+\to\Bbb R$ satisfies $$\forall\epsilon>0,\exists E>0,\forall x_0>E,\exists\delta>0,\forall x(\left|x-x_0\right|<\delta): \left|f(x)-f(x_0)\right|<\epsilon\tag1$$

Can we conclude that

there's some continuous function $g:\Bbb R^+\to\Bbb R$ such that $$\lim_{x\to+\infty}(f(x)-g(x))=0\tag2$$

# Re-describe

Let $\omega_f(x_0)=\limsup_{x\to x_0}\left|f(x)-f(x_0)\right|$, we can re-describe the first condition (1) as this: $$\lim_{x_0\to+\infty}\omega_f(x_0)=0\tag3$$

# Motivation

In fact, I'm discovering the sufficient and necessary condition of (2). It's easier to show that (2) implies (3), i.e. (1), because $$\left|f(x)-f(x_0)\right|\le\left|f(x)-g(x)\right|+\left|g(x)-g(x_0)\right|+\left|g(x_0)-f(x_0)\right|$$ Take $\lim_{x_0\to+\infty}\limsup_{x\to x_0}$ for both sides, we'll get the result.

-

Choose $E_0 := 0$, $(E_n)_n \uparrow \infty$ corresponding to $\varepsilon_n := \frac{1}{n}$ for $n \geq 1$ using (1). If $E_n < x \leq E_{n+1}$, choose $\delta_x > 0$ such that $f(y) \in B_{1/n}(f(x))$ for all $y \in B_{\delta_x} (x)$, according to (1). For $n \geq 1$, the balls $(B_{\delta_x}(x))_{x \in [E_n, E_{n+1}]}$ cover $[E_n, E_{n+1}]$, so we can choose $E_n = x^{(n)}_1 < x^{(n)}_2 < \ldots < x^{(n)}_{M_n} \leq E_{n+1}$ such that $$\bigcup_{k=1}^{M_n} {B_{\delta_{x^{(n)}_k}}(x^{(n)}_k)} \supseteq [E_n, E_{n+1}].$$ Set $M_0 = 1$, $x^{(0)}_1 = 0$. The set of points $\{x^{(n)}_k \: | \: n \geq 0,\, 1 \leq k \leq M_n\}$ partitions $\mathbb{R}^+$, so we can define the graph of $g:\: \mathbb{R}^+ \rightarrow \mathbb{R}$ as the polygon joining the points $(x^{(n)}_k, f(x^{(n)}_k)$ in the order of the $x^{(n)}_k$. The function $g$ is continuous by definition and it is easy to see that the limit of $f(x) - g(x)$ for $x \to \infty$ is $0$.
I cannot get the clear idea of the construction of $x_1^{(n)}\cdots x_{M_n}^{(n)}$, but we can construct in another way: Since $[E_n,E_{n+1}]$ is compact, we could find the Lebesgue number $\eta$ of the open cover, then we can cut $[E_n,E_{n+1}]$ into some pieces, where each piece is less than $\eta$, so the amplitude is smaller than $\epsilon_n$. Thanks! –  Frank Science Dec 6 '12 at 15:03
The $x^{(n)}_k$ were supposed to be the centers of the finitely many balls that cover the interval plus the endpoints of said interval. But perhaps using the Lebesgue number makes it a nicer argument. –  Thomas Dec 6 '12 at 15:39