Asymptotes and uniform continuity

Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be a continuous function with oblique asymptotes for $x\rightarrow\pm\infty$. Prove that the function is uniformly continuous.

Proof: Let $\epsilon>0$. Since the function has obliquous asymptotes then $$\exists M>0 : |f(x)-(ax+b)| < \epsilon \quad \forall \; x>M$$ and $$\exists m>0 : |f(x)-(cx+d)| < \epsilon \quad \forall \; x<-m$$ Now, in the interval $[-m-1,M+1]$ the function is uniformly continuous because of the Heine-Cantor theorem. We deal with the case $+\infty$ since the other one is formally identical. We know that lines are uniformly continuous. So, using the $\delta$ that certainly exists for the line we have: \begin{align*} |f(x)-f(x_0)| &=|f(x)-(ax_0+b)+(ax_0+b)-f(x_0)| \\ &\leq |f(x)-(ax_0+b)|+|(ax_0+b)-f(x_0)| \\ &<|f(x)-(ax_0+b)|+\epsilon \\ \end{align*} But $$|f(x)-(ax_0+b)|\leq|f(x)-(ax+b)|+|(ax+b)-(ax_0+b)|<2\epsilon$$ So we are finished because if a continuous function is uniformly continuous in $A$ and $B$, then it is uniformly continuous in $A\cup B$.

• For the conclusion in your last line you should say "if a continuous function is uniformly continuous in $A$ and $B$ ..." – Hagen von Eitzen May 2 '14 at 16:11
• Doesn't uniform continuity imply continuity? – Gennaro Marco Devincenzis May 2 '14 at 16:12
• Consider $A=(-\infty 0]$, $B=(0,\infty)$ and $f(x)=\begin{cases}0&\text{if }x\le 0\\1&\text{if }x>0\end{cases}$. Fortunately for the problem statement we are given that $f$ is continuous - but it is really used at this step. Alternatively (and that is the case in your proof), one is lucky if $\partial A\subseteq B$ and $\partial B\subseteq A$. – Hagen von Eitzen May 2 '14 at 16:58
• Ok! Thank you. What about the rest of the proof? – Gennaro Marco Devincenzis May 2 '14 at 17:19

• The core idea of the proof is to show that the function is uniformly continuous on the sets $(-\infty, -m-1]$, $[-m-1, M+1]$, and $[M+1, \infty)$. Since $f$ is continuous at $M+1$ and $-m-1$, this is sufficient for it to be uniformly continuous everywhere. (See Hagen von Eitzen comments.) Alternatively, a perhaps easier way is to consider the intervals $(-\infty, -m-\tfrac12]$, $[-m-1, M+1]$, and $[M+\tfrac12, \infty)$. Since these intervals actually overlap, you can show more easily that the $f$ must be uniformly continuous on the union if it is uniformly continuous on the individual sets (just take $\delta$ to be the minimum of all the deltas for each set and the length of the overlap).