# Proving $\forall x\in \mathbb R$ and $\forall A>0: \exists B>0 \ s.t \ \forall y\in \mathbb R, \ |y-x|\le A \Rightarrow |f(x)-f(y)|\le B$

Let $f:\mathbb R\to \mathbb R$ be a continuous function. Prove that $\forall x\in \mathbb R$ and $\forall A>0: \exists B>0 \ s.t \ \forall y\in \mathbb R, \ |y-x|\le A \Rightarrow |f(x)-f(y)|\le B$

So I notice that it's similar to the $\epsilon - \delta$ definition, so to make things easier, let's call $B=\epsilon$ and $A=\delta$. I understand that I need to show that there's some $B$ such that for all $y$ something is true.

A continuous function is differentiable for all $x$, I tried to work with the definitions but didn't get far:

If $f$ is differentiable then from the definition of a derivative: $\displaystyle\lim_{x\to y} \frac{f(x)-f(y)}{x-y}=f'(y)$

And from the defintion of a limit of a function: $\forall \epsilon>0:\exists\delta>0:\forall0<|x-y|<\delta\Rightarrow |f(x)-L|<\epsilon$

So if $L=f'(y)$ then $|f(x)-\frac{f(x)-f(y)}{x-y}|<\epsilon$ But that is leading me nowhere.

Any other ideas? Maybe I don't understand the question correctly ?

• Continuity does NOT imply differentiability. Commented Jun 11, 2014 at 16:00
• Something seems to be incorrect in the statement of your problem. Try with $f(x)=x$, the statement is not true. Commented Jun 11, 2014 at 16:02
• @Anurag I triple checked, everything is as it's written on my paper. It isn't true because if we'll take some $B$ it won't be true for every $y$ right ? Commented Jun 11, 2014 at 16:09
• sorry I misread the quantifier on $B$. Commented Jun 11, 2014 at 17:31

This follows from the fact that every continuous real-valued function defined on a closed interval is bounded on that interval. Indeed, since $f:\mathbb{R}\to\mathbb{R}$ is continuous, for any fixed $x\in\mathbb{R}$, the function $y\mapsto |f(x)-f(y)|$ is also continuous on $\mathbb{R}$, hence bounded on any interval of the form $[x-A,x+A]$ with $A >0$. Thus, given $x$ and $A$, define $$B_0 = B_0(x,A) = \sup \{\,|f(x)-f(y)|\;:\; y \in [x-A,x+A]\,\}.$$ Since $|f(x)-f(y)|\geq 0$, we have $B_0 \geq 0$. Now, take e.g. $B = \max\{B_0,1\}$, or $B = B_0+1$, if you prefer so, to ensure that $B$ is strictly positive.
• For $x,y \in \mathbb{R}$, the inequality $|y-x|\leq A$ is equivalent to $x-A\leq y \leq x+A$, which in turn is equivalent to $y \in [x-A,x+A]$. Anurag's first comment is absolutely correct. Their second comment does not contain a counter-example, as for $f(x) = x$, one can clearly take $B=A$. Commented Jun 11, 2014 at 17:12
• Even if the inequality relating $x$ and $y$ was $|x-y|<A$, which defines the open interval $(x-A,x+A)$ contained in $[x-A,x+A]$, observe that the function $y \mapsto |f(x)-f(y)|$ is continuous on the whole of $\mathbb{R}$, since so is $f$. Thus, one can take $B$ as defined in my answer, and the implication will still hold. Commented Jun 11, 2014 at 17:21
• Just to make sure I understand, the question asked us to show that there exist some $B$ such that it binds $|f(x)-f(y)|$ ? Commented Jun 12, 2014 at 9:26
• Yes, considering $|f(x)-f(y)|$ as a function of $y$ on a given closed interval $[x-A,x+A]$. Commented Jun 12, 2014 at 10:05