# With the condition $\lim_{x\to\infty}(f(x+a)−f(x))=0$, how to prove that $f(x)$ is uniformly continuous?

Assume $$f\in C[0,+\infty)$$, and for all $$a>0$$, we have $$\lim_{x\to\infty}(f(x+a)−f(x))=0.$$ Prove that $$f(x)$$ is uniformly continuous.

One hint is that we can use Baire category theorem, but I still don't know how to use it. Maybe there is another way to answer this question, I'm not sure. Looking forward to your answer.

Fix $$\epsilon>0$$. We want to find $$\delta>0$$ such that
$$|x-y|<\delta\Rightarrow |f(x)-f(y)|<\epsilon$$
For every $$N\in \Bbb N$$, let $$E_N=\{a\mid x\geq N\Rightarrow |f(x+a)-f(x)|\leq\epsilon/4\}$$. $$E_N$$ is closed (by continuity of $$f$$) and $$\bigcup_{N\in\Bbb N} E_N=[0,\infty)$$. By Baire Category Theorem, at least one of them, say, $$E_N$$ contains a closed interval $$[b,c]$$. For $$x,y\geq N+c$$, without loss of generality, say $$y\geq x$$, if $$|y-x|, there always exists $$z\geq N$$ such that $$[x,y]\subset[z+b,z+c]$$. Then $$|f(x)-f(y)|\le |f(x)-f(z)|+|f(y)-f(z)|=|f(z+d)-f(z)|+|f(z+e)-f(z)|\le \epsilon/2$$ where $$d,e\in [b,c]$$. For $$x,y\le N+c$$, as $$[0,N+c]$$ is compact, $$f$$ restricted to $$[0,N+c]$$ is uniformly continuous, hence there exists $$\delta'>0$$ satisfing the requirements in the quote box. Let $$\delta=\min(c-b,\delta')$$, we are done.