# If the difference quotient $\frac{f(y)-f(x)}{y-x}$ has a limit along a line $(x,y)\to(c,c)$, does the ordinary derivative $f'(c)$ exist?

Given a function $$f:\mathbb R\to\mathbb R$$, we define the difference quotient function

$$q(x,y)=\frac{f(y)-f(x)}{y-x}$$

for all $$(x,y)\in\mathbb R^2$$ not on the diagonal line $$x=y$$.

The ordinary derivative $$f'(c)$$ is defined as a limit of $$q$$ along a horizontal ($$y=c$$) or vertical ($$x=c$$) line through $$(c,c)$$.

The symmetric derivative is a limit along a diagonal line $$y-c=c-x$$.

The left derivative is a limit along a horizontal ray $$y=c,\,x.

The right derivative is a limit along a vertical ray $$x=c,\,y>c$$.

The strong derivative is the limit of $$q$$ at $$(c,c)$$, not along any particular path.

If the ordinary derivative exists, then $$q(x,y)\to f'(c)$$ along any line through $$(c,c)$$, or in any region (a "cone") separated from the diagonal by lines through $$(c,c)$$:

$$q(x,y)=\frac{y-c}{y-x}\cdot\frac{f(y)-f(c)}{y-c}+\frac{c-x}{y-x}\cdot\frac{f(c)-f(x)}{c-x}$$

$$=\frac{y-c}{y-x}\cdot q(c,y)+\frac{c-x}{y-x}\cdot q(x,c).$$

Note that the coefficients sum to $$1$$, and we're given $$q(c,x)-f'(c)\to0$$ as $$x\to c$$, so

$$q(x,y)-f'(c)=\frac{y-c}{y-x}\big(q(c,y)-f'(c)\big)+\frac{c-x}{y-x}\big(q(x,c)-f'(c)\big)$$

$$\to0,$$

provided that the coefficients $$\frac{y-c}{y-x}$$ and $$\frac{c-x}{y-x}$$ are bounded.

If $$q$$ has a limit $$f^*(c)$$ along a line, say $$y-c=k(x-c)$$ with $$0\neq|k|\neq1$$, does the derivative exist?

To simplify the notation, let's assume $$c=f(c)=f^*(c)=0$$. We're given, as $$x\to0$$,

$$\frac{f(kx)-f(x)}{kx-x}=\frac{1}{k-1}\cdot\frac{f(kx)-f(x)}{x}\to0,$$

and we want to know whether $$\frac{f(x)}{x}\to0$$.

There are discontinuous counter-examples: Let $$f(k^n)=1$$ for $$n\in\mathbb Z$$, and otherwise $$f(x)=0$$; then $$q(x,kx)=0\to0$$, but $$q(0,x)\not\to0$$. So let's assume that $$f$$ is continuous at $$c$$, and maybe in a neighbourhood of $$c$$.

Since $$q(x,y)=q(y,x)$$ is symmetric, the limit along a line with slope $$k$$ is the same as with slope $$1/k$$. So, without loss of generality, $$0<|k|<1$$.

If the limit is $$0$$ for two lines with slopes $$k$$ and $$l$$, then it's also $$0$$ for a line with slope $$k\cdot l$$:

$$\lim_{x\to0}\frac{f(klx)-f(x)}{x}=\lim_{x\to0}\frac{f(klx)-f(lx)+f(lx)-f(x)}{x}$$

$$=l\cdot\lim_{lx\to0}\frac{f(klx)-f(lx)}{lx}+\lim_{x\to0}\frac{f(lx)-f(x)}{x}=0.$$

Thus, the limit is $$0$$ for any line with slope $$k^n$$ where $$n\in\mathbb N$$.

Now the derivative is

$$f'(0)=\lim_{x\to0}\frac{f(x)-f(0)}{x}$$

$$=\lim_{x\to0}\frac{f(x)-f(\lim_{n\to\infty} k^nx)}{x}$$

and we assumed that $$f$$ is continuous at $$0$$:

$$=\lim_{x\to0}\frac{f(x)-\lim_{n\to\infty}f(k^nx)}{x}$$

$$=\lim_{x\to0}\lim_{n\to\infty}\frac{f(x)-f(k^nx)}{x}$$

$$\overset?=\lim_{n\to\infty}\lim_{x\to0}\frac{f(x)-f(k^nx)}{x}$$

$$=\lim_{n\to\infty}(0)=0.$$

Is swapping the limits valid here?

• Is there a mistake in your simplification? If I take $f$ to be a constant, then $\frac{f(kx)-f(x)}x=0$ for all $x\neq0$ but $\frac{f(x)}x$ diverges as $x\to0$ (unless $f=0$). – shibai Jul 10 '20 at 4:16
• @shibai - My simplification was for $f(0)=0$. And we can always reduce to this case: given $f$ and $c$ and the limit $f^*(c)$, define $$g(x)=f(c+x)-f(c)-f^*(c)x.$$ Then $g(0)=g^*(0)=0$. – mr_e_man Jul 12 '20 at 15:28
• (And also, importantly, the derivative $g'(0)$ exists if and only if $f'(c)$ exists.) – mr_e_man Jul 12 '20 at 15:40
• – Paramanand Singh Jul 13 '20 at 1:36
• I must also congratulate you for finding the solution to your problem yourself (almost). The last part (see linked answer in previous commen) was a bit tricky. – Paramanand Singh Jul 13 '20 at 1:38

The following is a well-known fact:

Claim. Let $$f$$ be a real-valued function defined on a neighboorhood of $$0$$. Suppose that $$f$$ is continuous at $$0$$ and there exist $$r$$ and $$L$$ with $$|r| \neq 1$$ such that $$\lim_{x\to0} \frac{f(rx) - f(x)}{(r-1)x} = L.$$ Then $$f$$ is differentiable at $$0$$ and $$f'(0)=L$$.

Proof. By replacing $$r$$ by $$1/r$$ if necessary, we may assume that $$0 < |r| < 1$$. Define

$$\varphi(x) = \begin{cases} \dfrac{f(x) - f(rx)}{(1-k)x}, & \text{if x \neq 0}, \\ L, & \text{if x = 0}. \end{cases}$$

Then $$\varphi$$ is continuous at $$0$$. Pick a neighborhood $$U$$ of $$0$$ and $$M > 0$$ such that $$U$$ lies in the domain of $$f$$ and $$\left| \varphi(x) \right| \leq M$$ on $$U$$. Then

$$\frac{f(x) - f(r^n x)}{x} = \sum_{k=1}^{n} (1-r)r^{k-1} \varphi(r^{k-1}x).$$

Since each term is bounded by $$M(1-r)|r|^{k-1}$$ on $$I$$ and $$\sum_{k=1}^{\infty} M(1-r)|r|^{k-1} < \infty$$, the right-hand side converges uniformly as $$n\to\infty$$ on $$U$$ by the Weierstrass M-test. So if $$x \in U$$, then by letting $$n\to\infty$$, we get

\begin{align*} \frac{f(x) - f(0)}{x} &= \lim_{n\to\infty} \frac{f(x) - f(r^n x)}{x} \\ &= \lim_{n\to\infty} \sum_{k=1}^{n} (1-r)r^{k-1} \varphi(r^{k-1}x) \\ &= \sum_{k=1}^{\infty} (1-r)r^{k-1} \varphi(r^{k-1}x). \end{align*}

Now we take limit as $$x \to 0$$. By the uniform convergence and the existence of term-wise limit, we can interchange the order of summation and limit, obtaining

\begin{align*} \lim_{x \to 0} \frac{f(x) - f(0)}{x} &= \sum_{k=1}^{\infty} \lim_{x \to 0} (1-r)r^{k-1} \varphi(r^{k-1}x) \\ &= \sum_{k=1}^{\infty} (1-r)r^{k-1} L \\ &= L. \end{align*}

This completes the proof. $$\square$$

Remark. The notion of uniform convergence is not a necessity here. Rather, it is utilized in order to make the proof more transparent.

• Yes uniform convergence is not needed. The proof in my answer (linked in comments to this question) avoids uniform convergence and instead show the exchange the limit and infinite sum directly. And +1 already for your answer. – Paramanand Singh Jul 13 '20 at 2:53

Thanks to @ParamanandSingh for the essence of this answer: https://math.stackexchange.com/a/1864092

From the definition of the limit, for any $$\varepsilon>0$$, there is $$\delta>0$$ such that, for all $$0<|x|<\delta$$,

$$\left|\frac{f(kx)-f(x)}{x}\right|<\varepsilon.$$

Since $$|k|<1$$ and thus $$|k^nx|<|x|<\delta$$ for $$n\in\mathbb N$$, this is also true if we replace $$x$$ with $$k^nx$$:

$$\left|\frac{f(k^{n+1}x)-f(k^nx)}{x}\right|<|k|^n\varepsilon.$$

Now we make a telescoping series:

$$\left|\frac{f(k^mx)-f(x)}{x}\right|=\left|\frac{\sum_{n=0}^{m-1}\big(f(k^{n+1}x)-f(k^nx)\big)}{x}\right|$$

$$\leq\sum_{n=0}^{m-1}\left|\frac{f(k^{n+1}x)-f(k^nx)}{x}\right|$$

$$<\sum_{n=0}^{m-1}|k|^n\varepsilon$$

$$=\frac{1-|k|^m}{1-|k|}\,\varepsilon$$

and let $$m\to\infty$$ (using continuity of $$f$$ at $$0$$) to get

$$\left|\frac{f(0)-f(x)}{x}\right|<\frac{\varepsilon}{1-|k|}$$

for all $$0<|x|<\delta$$. Thus, given any $$\varepsilon'>0$$, we can define $$\varepsilon=(1-|k|)\varepsilon'$$ to get a neighbourhood of $$0$$ within which $$\left|\frac{f(x)-f(0)}{x}\right|<\varepsilon'$$. That is, $$f'(0)=0$$.