# Do these conditions imply function is continuous?

I have two separate conditions:

a) $\lim\limits_{h\to 0}|f(x+h)-f(x-h)|=0$ for every $x \in \Bbb R$ and

b) $\lim_\limits{h\to 0}|f(x+h)+f(x-h)-2f(x)|=0$ for every $x \in \Bbb R$.

My question is do the each of them imply $f$ is continuous? $f(x)$ is said to be continuous at $x_0$ if $\lim_\limits{x\to x_0} f(x) = f(x_0) = c$ For a) it seems correct but I don't know how to prove it. For b), it seems wrong but I can't think of a counterexample.

• I think both conditions combined imply continuity. Sep 26, 2017 at 11:40
• @M.Herzkamp I agree. Because then $\lim|f(x+h)-f(x)|=\frac{1}{2}\lim|f(x+h)+f(x-h)-2f(x)+f(x+h)-f(x-h)|\le \frac{1}{2}\lim(|f(x+h)+f(x-h)-2f(x)|+|f(x+h)-f(x-h)|)=\frac{1}{2}\lim|f(x+h)+f(x-h)-2f(x)|+\frac{1}{2}\lim|f(x+h)-f(x-h)|=0+0=0$. Sep 26, 2017 at 12:11

Both of them do not imply continuity.

For (a), consider $f(x)=a$ for $x \ne x_0$ and $f(x_0) =b \ne a$.

A simple example may be $f(x)=0$ for $x \ne 0$ and $f(0) =1$.

For (b), consider $f(x)=c$ for $x>x_0$ and $f(x)=d \ne c$ for $x<x_0$ and $f(x_0)=\frac{c+d}{2}$.

A simple example may be $f(x)=1$ for $x>0$ and $f(x)=-1$ for $x<0$ and $f(0)=0$.

Both are counterexamples that satisfy your conditions but are not continuous at $x=x_0$.

• Ah yes thanks I understand perfectly, I just posted another qns about continuity of functions as well hope you may answer! Sep 26, 2017 at 8:01