# If "averaged" derivative is zero, the function is constant?

It is a simple elementary fact that if a function $$\mathbb{R}\rightarrow\mathbb{R}$$ is differentiable everywhere and its derivative is everywhere zero, then it is constant. But I have just discovered a new interesting concept which resembles derivative a lot and I wonder if it shares this property with the standard derivative.

Let $$f:\mathbb{R}\rightarrow\mathbb{R}$$ be continuous. We say $$f$$ has "averaged" derivative $$C$$ at point $$x_0$$ iff $$t\mapsto\frac{2}{t}\int_{x_0}^{x_0+t}f(x)dx$$ has derivative $$C$$ at $$t=0$$ (this function converges to $$2f(x_0)$$ as $$t\rightarrow0$$, so we define $$0\mapsto 2f(x_0)$$ and then take the derivative at $$t=0$$). This derivative agrees with the standard derivative if the standard derivative exists at a point. My question is: if a function has "averaged" derivative 0 at all points, is it necessarily constant?

I have proven this in case when the function locally has bounded variation because then I can use AC-singular decomposition, play with it a bit and derive a contradiction easily, but general case obviously requires another idea.

• If $f$ is constant $C$, then the function you defined is constant $2C$ because the integral is $t\cdot C$ Commented Jul 23 at 3:42
• @Callus-ReinstateMonica You are right, I messed up the definiton because my intuition is geometric, not analytical. I am sorry, give me a minute to fix this. EDIT: Actually, it was good. You should take the derivative of $2C$, not the $2C$ itself. Commented Jul 23 at 3:43
• I haven't thought this through but the definition seems related to en.wikipedia.org/wiki/Lebesgue_differentiation_theorem Commented Jul 23 at 3:45
• @ronno I thought that too but could not find a useful connection between the two. I believe there exists an essential difference. I might be wrong. Commented Jul 23 at 3:47
• @VarunVejalla My bad, I fixed it now. Thank you Commented Jul 23 at 4:05

For continuous $$f: \Bbb R \to \Bbb R$$ and $$x_0 \in \Bbb R$$ we consider the function
\begin{align} F_{x_0}(t) &= \begin{cases} \frac{2}{t}\int_{x_0}^{x_0+t}f(x) \, dx & \text{ if } t \ne 0 \\ 2 f(x_0) & \text{ if } t = 0 \end{cases} \\ &= 2 \int_0^1 f(x_0 + ty) \, dy \, . \end{align} We want to show that if $$F_{x_0}'(0)$$ exists and is zero for all $$x_0 \in \Bbb R$$ then $$f$$ is constant.
If $$a < b$$ and $$F_{x_0}'(0)$$ exists for all $$x_0 \in (a, b)$$ then $$f(b)-f(a) = F_{x_0}'(0) \cdot (b-a)$$ for some $$x_0 \in (a, b)$$.
Proof: Let $$a < b$$ and assume that $$F_{x_0}'(0)$$ exists for all $$x_0 \in (a, b)$$. Similarly as in the proof of the mean value theorem we define the function $$g(x) = f(x) - \frac{f(b)-f(a)}{b-a} (x-a)$$ which is continuous and satisfies $$g(a) = g(b)$$, and for $$x_0 \in(a, b)$$ the corresponding function $$G_{x_0}(t) = 2 \int_0^1 g(x_0 + ty) \, dy$$ A simple calculation shows that $$G_{x_0}(t)$$ and $$F_{x_0}(t)$$ are related by $$G_{x_0}(t) = F_{x_0}(t) - 2 \frac{f(b)-f(a)}{b-a} (x_0 - a + \frac 12 t)$$ and therefore $$\tag{*} G_{x_0}'(0) = F_{x_0}'(0) - \frac{f(b)-f(a)}{b-a} \, .$$
It remains to show that $$G_{x_0}'(0)=0$$ for some $$x_0 \in (a, b)$$. Remember that $$g(a) = g(b)$$, so that $$g$$ necessarily has a (weak) maximum or a (weak) minimum at some point $$x_0 \in (a, b)$$. In the case of a maximum we have, with some $$\delta > 0$$, \begin{align} &g(x) \le g(x_0) \text{ for } |x - x_0| < \delta \\ \implies &G_{x_0}(t) \le G_{x_0}(0) \text{ for } |t| < \delta \\ \implies &G_{x_0}'(0) = 0 \, . \end{align} In the same way we get $$G_{x_0}'(0) = 0$$ if $$g$$ has a minimum at $$x_0$$, and that finishes the proof.
• Wow! Turned out the answer was elementary and simple just like with the standard derivative. Excellent solution. I'll just add the conclusion I see now: If function $f$ is "averaged"-differentiable everywhere and its "averaged" derivative is equal to standard derivative of some function, then "averaged" and standard derivative agree for that function $f$. Commented Jul 23 at 11:16