Mean value theorem for twice differentiable function Let $f:(0,\infty)\to \Bbb R$ be a twice differentiable function. In this answer, it is asserted that the MVT lets one write $$f(x+h)=f(x)+f'(x)h+\frac12 f''(\xi)h^2$$ for some $\xi\in (x,x+h)$.
It is not clear to me why this should be the case. Using the MVT, one can write $f''(\xi)h=f'(x+h)-f'(x)$ for some $\xi\in (x,x+h)$. Using that, the claim rephrases to $$f(x+h)=f(x)+\frac{1}{2}f'(x)h+\frac{1}{2}f'(x+h)h$$ and I don't see why that should hold.
I'm sure I'm being stupid, therefore I much welcome clarification.
 A: The basic arguments of the exact proof (which I do not give here) that this works, go as follows: Taylor's theorem says that $$f(x+h)=f(x)+f'(x)h+\underbrace{\frac12f''(x)h^2+ο(h^2)}$$ If we replace $x$ with $ξ$ (where $ξ$ is given by the MVT) in the underlined term we can get rid of the remainder $ο(h^2)$ and achieve an exact calculation of $f(x+h)$: 
$$f(x+h)=f(x)+f'(x)h+\frac12f''(ξ)h^2$$ Why then the approximation in the first place? The MVT says there exists such an $ξ$ but does not give a way to find it, so the approximation in Taylor's theorem is indeed useful.
A: What the answer uses is not really Lagrange's M.V.T. but rather Taylor's Theorem, that too upto the third term i.e. the second derivative since it has been explicitly mentioned that the function is twice differentiable.
As for your second part i.e.

It is not clear to me why this should be the case. Using the MVT, one can write $f''(\xi)h=f'(x+h)-f'(x)$ for some $\xi\in (x,x+h)$. Using that, the claim rephrases to $$f(x+h)=f(x)+\frac{1}{2}f'(x)h+\frac{1}{2}f'(x+h)h$$ and I don't see why that should hold.

There is no valid reason why this should not hold. If you arrange the expression a little bit, 
$$f(x+h)=f(x)+\frac{1}{2}f'(x)h+\frac{1}{2}f'(x+h)h$$ or 
$$\frac{f(x+h)-f(x)}{h}=\frac{1}{2}f'(x)+\frac{1}{2}f'(x+h)$$
$$2f'(\alpha)=f'(x)+f'(x+h)$$
for some suitable $\alpha \in (x,x+h)$
So there is nothing wrong with this.
