## Slope Equals Derivative at Midpoint

Problem? Find all differentiable functions $f:\mathbb{R}\to\mathbb{R}$ such that

$f(x)-f(y)=f'\left(\frac{x+y}2\right)(x-y)$

for all $x,y\in\mathbb{R}$.

Solution? First we prove two lemmas.

Lemma 1. Suppose a differentiable function $g$ satisfies $g(x)-g(y)=g'\left(\frac{x+y}2\right)(x-y)$ for all $x,y\in\mathbb{R}$. If $g'(a)=g'(b)=0$ ($a< b$), then $g(a)=g(b)$ and $g'\left(\frac{a+b}2\right)=0$.

Proof of lemma 1. For any $\epsilon>0$, there exists $\delta$ such that $\left|\frac{g(x)-g(a)}{x-a}\right|<\epsilon$ for $x\in(a,a+\delta)$ and $\left|\frac{g(x)-g(b)}{x-b}\right|<\epsilon$ for $x\in(b-\delta,b)$. So, if $x\in(a,a+\delta)$, we have

$g(a)-\epsilon(x-a)< g(x)< g(a)+\epsilon(x-a)$

and

$g(b)-\epsilon(x-a)< g(a+b-x)< g(b)+\epsilon(x-a).$

Therefore,

$g(b)-g(a)-2\epsilon(x-a)< g(a+b-x)-g(x)< g(b)-g(a)+2\epsilon(x-a)$

$g(b)-g(a)-2\epsilon(x-a)< g'\left(\frac{a+b}2\right)(a+b-2x)< g(b)-g(a)+2\epsilon(x-a).$

Since $g(b)-g(a)=g'\left(\frac{a+b}2\right)(b-a)$, then

$g(b)-g(a)-2\epsilon(x-a)< \frac{g(b)-g(a)}{b-a}(a+b-2x)< g(b)-g(a)+2\epsilon(x-a)$

$-2\epsilon(x-a)<\frac{g(b)-g(a)}{b-a}(2a-2x)<2\epsilon(x-a)$

$-\epsilon<\frac{g(b)-g(a)}{a-b}<\epsilon$

Since we choose $\epsilon$ arbitrarily, then $\frac{g(b)-g(a)}{a-b}=0$, which implies $g(a)=g(b)$. This further implies $g'\left(\frac{a+b}2\right)$.

Lemma 2. If $g'(a)=g'(b)=0$ ($a< b$), then $g$ is constant on $[a,b]$.

Proof of lemma 2. From lemma 1, we know that $g(a)=g(b)=:c$. Call a number $x\in[a,b]$ good if $g(x)=c$ and $g'(x)=0$. From lemma 1, if $x$ and $y$ are good, then $\frac{x+y}2$ is good.

We prove by induction on $n$ that for any positive integer $k<2^n$, the number $x+\frac{k}{2^n}(b-a)$ is good.

This is clearly true for $n=1$. Suppose it is true for smaller $n$. Then $a+\frac1{2^{n-1}}(b-a)$ and $a+\frac{k-1}{2^{n-1}}(b-a)$ are good, which implies that $a+\frac{k}{2^n}(b-a)$ is good, as desired.

The numbers of the form $a+\frac{k}{2^n}(b-a)$ are dense on $[a,b]$. By continuity, we get that $g$ is constant on $[a,b]$. Hence, lemma 2 is proved.

Now we will prove that $f$ is a quadratic function. Assume the opposite. Then there exists an interval $[a,b]$ such that $f$ does not coincide with any quadratic function. Let $u,v\in\mathbb{R}$ be such that $f'(a)=2ua+v$ and $f'(b)=2ub+v$. Let $g(x)=f(x)-ux^2-vx$. Then $g'(a)=g'(b)=0$. It is easy to see that $g$ satisies $g(x)-g(y)=g'\left(\frac{x+y}2\right)(x-y)$. By lemma 2, $g$ is constant, say $g(x)=m$. Thus $f(x)=ux^2+vx+m$ for all $x\in[a,b]$, which is a contradiction to the assumption that $f$ does not coincide with any quadratic function.

Therefore, $f$ must be a quadratic function. Conversely, it is easy to check that any quadratic function satisfies the required properties.

Source? A. Y. Dorogvstev, Mathematical Analysis (Russian)