Proving a 2nd order Mean-Value theorem 
Let $f\in C^1([a,b])$ have 2nd-order derivative in $(a,b)$. Prove that there exists $c\in (a,b)$ such that
  $$f(b)-2 f\left(\frac{a+b}{2}\right)+f(a)=\frac{1}{4} (b-a)^2 f''(c)$$

 A: Hint: As you say, generally $a+b\not\in[a,b]$, but $\frac{a+b}{2}$ divides $[a,b]$ to two. Consider, then, the function $g\in C^1([a,\frac{a+b}{2}])$ defined $g(x) = f(x+\frac{b-a}{2})-f(x)$.
Added (some more explicit remarks, please consider before reading everything)


*

*
 One notes that $g$ indeed is (twice-)differentiable on $(a,\frac{a+b}{2})$ and $$g^\prime(x) = f^\prime(x+\frac{b-a}{2})-f^\prime(x).$$


*
 One also notes $g(\frac{a+b}{2}) - g(a) = f(b)-2f(\frac{a+b}{2})+f(a)$.


*
 The mean value theorem implies that there exists some $c\in(a,\frac{a+b}{2})$ such that $$g(\frac{a+b}{2}) - g(a) = \frac{b-a}{2}g^\prime(c) = \frac{b-a}{2}\left(f^\prime(c+\frac{b-a}{2})-f^\prime(c)\right).$$


*This last part completes the problem:

 Another application of the mean value theorem for $f^\prime$ over the interval $[c,c+\frac{b-a}{2}]\subset[a,b]$, yields $\tilde{c}\in(c,c+\frac{b-a}{2})$ such that $$f^\prime(c+\frac{b-a}{2})-f^\prime(c) = \frac{b-a}{2}f^{\prime\prime}(\tilde{c}).$$

A: Let $p = (a + b)/2$ and $h = (b - a)/2$ so that $a = p - h, b = p + h$ then we have $$f(b) - 2f\left(\frac{a + b}{2}\right) + f(a) = f(p + h) - 2f(p) + f(p - h)$$ Let $g(x) = f(p + x) - 2f(p) + f(p - x)$ then $g(0) = 0$ and $g'(x) = f'(p + x) - f'(p - x)$ so that $g'(0) = 0$. It follows from Taylor's theorem that $$g(h) = g(0) + hg'(0) + \frac{h^{2}}{2}g''(c')$$ where $c' \in (0, h)$. Now $g''(x) = f''(p + x) + f''(p - x)$ and hence $g''(c') = f''(p + c') + f''(p - c')$ and since derivatives follow intermediate value theorem, there is a value $c \in [p - c', p + c']\subset (a, b)$ such that $f''(c) = \{f''(p + c') + f''(p - c')\}/2 = g''(c')/2$.
It follows that $$g(h) = h^{2}f''(c)$$ and putting value of $h = (b - a)/2$ we are done.
