# Is the function $f$ differentiable?

let $$f\colon \Bbb R \to \Bbb R$$ be a function having a property as given $$\lim_{h \to 0} {f(x+h)-f(x-h)\over h}$$ exists for all $$x \in \Bbb R$$ then $$f(x)$$ is differentiable for all $$x \in \Bbb R$$. True/false??

I think its true as $$\lim_{h\to 0} {f(x+h)-f(x-h)\over h} ...(1)$$ exists for all $$x \in \Bbb R$$ so put $$x=x+h$$ in $$(1)$$ so $$\lim_{h\to 0} {f(x+2h)-f(x)\over h}$$ exists i.e $$2\lim_{h\to 0} {f(x+2h)-f(x)\over 2h}$$ exists and taking $$k=2h$$ then $$2\lim_{k\to 0} {f(x+k)-f(x)\over k}$$ exists i.e $$2f^{'}(x)$$ exists so $$f^{'}(x)$$ exists for all $$x \in \Bbb R$$.
Is this is right??

• – Hans Lundmark Oct 3 '18 at 12:10

Think of $$f(x) = \begin{cases}0 \text{ if } x \ne 0\\1 \text{ if } x = 0\end{cases}$$. It obeys your property (easy to prove) but it's not even continuous in $$0$$.
In you reasoning, replacing $$x+h$$ by $$x$$ is illegal, because you're changing a term that is variable in $$h$$ with a term independent of $$h$$.
Consider $$f(x) = \begin{cases}x \text{ if } x \geq 0 \\ -x \text{ if } x < 0 \end{cases}.$$ Then at $$x=0$$ $$\lim_{h \to 0} \frac{f(h)-f(-h)}{h} = \lim_{h \to 0} \frac{h-h}{h}=0.$$ But $$f$$ is not differentiable at $$x=0$$. In the rest of its domain $$f$$ is trivially smooth.