$f'$ exists, but $\lim \frac{f(x)-f(y)}{x-y}$ does not exist

Suppose $f$ is differentiable at $a$, i.e. $\lim_{x\to a}\frac{f(x)-f(a)} {x-a}$ exists. I wondered whether it was necessarily true that
$$\lim_{\substack{x,y\to a\\x\neq y}}\frac{f(x)-f(y)}{x-y} \tag{1}$$ exists and equals the same thing. I believe that my friends and I have found a counterexample, which I'll place below the fold.

I believe we have found some conditions under which (1) must exist and equal $f'(a)$, and I wonder if anyone has some others:

  • If $x$ and $y$ approach from opposite sides of $a$, then I claim that the secant line from $x$ to $y$ has slope between the slope of the secant line from $x$ to $a$ and the slope of the secant line from $y$ to $a$. (Draw a picture.) Therefore a counter-example can only come where $x$ and $y$ do not approach $a$ from different sides.
  • (Wrong) Note that if $a,b\geq 0$ and $c,d>0$, then $\frac{a+c}{b+d}$ is between $\frac{a}{c}$ and $\frac{b}{d}$. So, assuming that $x$ and $y$ are approaching from the same side, if $f(x)-a$ and $f(y)-a$ have the same sign in a neighborhood of $a$, then (1) must exist and equal $f'(a)$. So a counter-example can only come when for all $\delta>0$, $f(x)-f(a)$ is both positive and negative either on $(a,a+\delta)$ or on $(a-\delta, a)$. From the definition of the derivative, this also shows that a counterexample can only come when $f'(a)=0$. Edit: TonyK has pointed out that I am in error here.

One of my friends conjectured that if $f$ were rectifiable, then a counterexample cannot exist. Does anyone have any thoughts on this?


Counterexample. Suppose $$f:x\mapsto \begin{cases}x^2\sin \left( 1/x \right) & x \neq 0 \\ 0 & x=0.\end{cases}$$

$f$ is differentiable at zero with $f'(0)=0.$ Take $x_n$ and $y_n$ to be adjacent peaks and valleys: $$x_n := \frac1{\pi/2 + 2\pi n}\\ y_n := \frac1{3\pi/2 + 2\pi n}.$$

$x_n$ and $y_n$ go to zero as $n\to \infty$. Then I claim $$\frac{f(x_n)-f(y_n)}{x_n-y_n} \xrightarrow{n\to\infty}\frac2\pi \neq f'(0)$$


Solution 1:

These things are tricky!

(i) Your counterexample $x^2\sin(1/x)$ is valid.

(ii) But $x^2\sin(1/x)$ is rectifiable, I think.

(iii) Your idea about $x$ and $y$ approaching $a$ from different sides looks right, but I don't think it is useful.

(iv) Your claim that all counterexamples must satisfy $f'(a) = 0$ is false: for instance, if $f$ is a counterexample with $f'(a)=0$, then so is $g(x) = f(x)+x$, which has $g'(a)=1$.

Solution 2:

I'd just like to add to the answers what was mentioned by a user in the comments: that a sufficient condition for the limit (1) to exist and equal $f'(a)$ is that $f'$ exists in a neighborhood of $a$ and is continuous at $a$. Then the mean value theorem (or Taylor's theorem with Cauchy remainder, if you prefer) shows that the limit (1) exists.