10

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)$$

Eric Auld
  • 28,997
  • 2
    If $f'$ exists and is continuous near $a$, then (1) holds. In this case you can use first order Taylor approximation. This assumption feels like an overkill though. – Joonas Ilmavirta Aug 13 '14 at 20:24
  • Why do you claim your function is differentiable at zero? The limit of $f'(x)$ as $x\to0$ doesn't exist (oscillatory). – Semiclassical Aug 13 '14 at 20:26
  • 2
    @Semiclassical, the derivative as the limit of difference quotients does exist at zero (and everywhere else). It just happens not to be continuous. – Joonas Ilmavirta Aug 13 '14 at 20:28
  • 3
    Use the definition of the derivative: $f'(0) = \displaystyle\lim_{x \to 0}\frac{f(x)-f(0)}{x-0} = \lim_{x \to 0}\frac{x^2\sin(\frac{1}{x})}{x} = \lim_{x \to 0} x\sin(\frac{1}{x}) = 0$. – JimmyK4542 Aug 13 '14 at 20:28
  • Differentiable but not continuous at zero? That seems wrong. (Though I don't see a hole in the previous comment's calculation.) – Semiclassical Aug 13 '14 at 20:32
  • 2
    $f$ is continuous at $0$, however $f'$ isn't continuous at $0$. – JimmyK4542 Aug 13 '14 at 20:34
  • @Semiclassical, The function in the counterexample is continuous and differentiable at zero. The oscillations are eliminated by the $x^2$ term. It is part of several examples where we see that $\sin(1/x)$ is not continuous at zero, $x\sin(1/x)$ is continuous but not differentiable at zero, and $x^2 \sin(1/x)$ is differentiable at zero (which can be seen via the definition of the derivative) – Joel Aug 13 '14 at 20:35
  • I concede the point. (This is why I should stay away from analysis questions.) I also just noticed that the Wikipedia page on differentiability includes a discussion of this very example. – Semiclassical Aug 13 '14 at 20:37

2 Answers2

8

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$.

TonyK
  • 68,059
1

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.

Eric Auld
  • 28,997