# Suppose that the average value on all intervals $[a,b]$ is equal to $f((a+b)/2)$. Prove that $f''(x) = 0$ for all $x \in \mathbb{R}$

I understand that $$f(x)$$ must be linear with a first derivative equal to a constant. I'm just not sure how I can use the mean value property of integrals to show something about $$f''(x)$$. The hint on this question is to use the fundamental theorem of calculus or Jensen's inequality.

• Welcome to Mathematics Stack Exchange! A quick tour will enhance your experience. Here are helpful tips to write a good question and write a good answer. – dantopa May 23 at 21:16
• You say that you understand that the first derivative must be a constant. Does this mean you have proven that part? I am not sure what you need help with. – InterstellarProbe May 23 at 21:17

Assuming $$f$$ is integrable and twice differentiable (otherwise your statement about average value doesn't make sense, nor your final statement*), $$\int_a^bf(x)\,\mathrm dx=(b-a)f\left(\cfrac{a+b}{2}\right)$$

Differentiate both sides w.r.t $$\,b$$, using the Leibniz integral rule (derived from fundamental theorem of calculus) for the LHS:

$$f(b)=\frac{b}{2}f'\left(\cfrac{a+b}{2}\right)+f\left(\cfrac{a+b}{2}\right)-\frac{a}{2}f'\left(\cfrac{a+b}{2}\right)$$

Now set $$b=0$$ and $$a=2x$$:

$$f(0)=f(x)-xf'(x)$$

Differentiate both sides w.r.t $$x$$:

$$0=f'(x)-f'(x)-xf''(x)$$

so $$f''(x)=0$$ for all $$x\neq 0$$.

Thus we have proven the function is linear everywhere except $$0$$. Since $$f'(0)$$ and $$f'(x)$$, $$f'(-x)$$ are constants for $$x>0$$ exists, we know $$f'(0)$$ has to be equal to each of these and thus $$f''(0)=0$$.

*I'm not sure if you're able to prove that $$f$$ has to be twice differentiable.

• I see why $f'(x)$ and $f'(-x)$ are constant, because you've shown $f''=0$ for $x\neq 0$. Why does $f'(0)$ have to be equal to each of these constants? Is it because if it is not, then $f''$ is discontinuous at $x=0$? – Frudrururu May 24 at 4:11
• You can apply mean value theorem to prove that. In general, Darboux theorem tells that derivatives (if exist on an interval) enjoy intermediate value property regardless of it's continuity, and so, no jump discontinuity can occur to them. – Sangchul Lee May 24 at 6:10

I will assume that $$f$$ is locally integrable for an obvious reason. Our aim is to prove that $$f$$ is linear, which is then enough to conclude that $$f$$ is twice-differentiable with $$f'' \equiv 0$$.

Let $$x < y$$ and $$0 < \lambda < 1$$ be arbitrary. Set

$$c = \lambda x + (1-\lambda) y, \qquad a = 2x - c, \qquad b = 2y - c.$$

Then $$a < x < c < y < b$$ and

$$\frac{a+b}{2} = (1-\lambda)x + \lambda y, \qquad \frac{a+c}{2} = x, \qquad \frac{c+b}{2} = y.$$

So it follows that

\begin{align*} f((1-\lambda)x+\lambda y) &= \frac{\int_{a}^{b} f(t) \, \mathrm{d}t}{b-a} \\ &= \frac{\int_{a}^{c} f(t) \, \mathrm{d}t + \int_{c}^{b} f(t) \, \mathrm{d}t}{b-a} \\ &= \frac{(c-a)f(x) + (b-c)f(y)}{b-a} \\ &= (1-\lambda) f(x) + \lambda f(y). \end{align*}

This proves that $$f$$ is linear.