# Prove that $f$ is linear when$\frac1{t-s}\int_s^tf(x)\,dx=\frac{f(s)+f(t)}2$ for all reals $s < t$

Let $f:\mathbb R\to\mathbb R$ have a continuous second derivative. Suppose for all $s,t \in \mathbb R$ with $s<t$ we have $$\frac1{t-s}\int_s^tf(x)\,dx=\frac{f(s)+f(t)}2.$$ Show there exist $\alpha$ and $\beta$ such that $f(x)=\alpha x+\beta$.

I think I use second fundamental theorem of calculus or I use the mean value theorem of integrals. Another thing I thought is the right hand side is the midpoint between two functions; so I think the function has to have the midpoint of the two endpoints involved.

• Have you tried applying any of these ideas? – robjohn May 24 '18 at 14:49
• Please provide a meaningful title next time your post a question. Requesting for help isn't providing good knowledge on your question! – mathcounterexamples.net May 24 '18 at 14:53
• @robjohn So what I have is by the FTC, for any $p$ which $s \leq p \leq t$, then $\int_{s}^{x} f(p) dp = f(x)$. Then, $f(x) = \frac{d}{dx} (t - s) \frac{f(s) + f(t)}{2}$. Am I on the right track? – stevieman5933 May 24 '18 at 14:59
• This is the integral version of the well-known series result: $\frac{1}{n-m+1}\sum_{k=m}^n a_k = \frac{a_m + a_n}{2}$ when $a_k$ is an arithmetic progression (a linear function). – Winther May 24 '18 at 15:09
• @stevieman The FTC should read $\int_s^x f'(p)dp=f(x)-f(s)$ or $\partial_x\int_s^x f(p)dp=f(x)$. – J.G. May 24 '18 at 15:29

Since $\int_s^t fdx=(t-s)(f(t)+f(s))/2$, differentiating with respect to $t$ gives $f(t)=(f(t)+f(s))/2+(t-s)f'(t)/2$ so $f(t)-f(s)=(t-s)f'(t)$. Differentiating with respect to $s$ gives $-f'(s)=-f'(t)$, so $f'$ is constant.