# Proving this Taylor-esque expansion for a $C^2$ function vanishing at 0 and 1

I am trying to prove the following (which I think is true!): if $f:[0,1]\rightarrow \mathbb{R}$ is twice continuously differentiable and $f(0)=0=f(1)$, then for every $x \in (0,1)$ there exists $\xi \in (0,1)$ such that $f(x) = \frac{1}{2}x(x-1) f''(\xi)$. Does anyone have a neat proof of this?

My idea, following the proof of the ordinary Taylor expansion, is to use the mean value theorem with some appropriately chosen function. For fixed $x$ we would like to have $g$ such that, say, $$g'(y) = \frac{1}{2}x(x-1)f''(y)-f(x),$$ and prove that $g'(y)=0$ for some $y$. It would be sufficient, by the mean value theorem, that $g(0)=0=g(1)$. The formula gives $$g(y) =\frac{1}{2}x(x-1)f'(y)-f(x)y + C_1,$$ which will not give $g(0)=0=g(1)$ for any $C_1$. Instead if we choose $$g'(y) = \left( \frac{1}{2}x(x-1)f''(y)-f(x) \right) (y-a),$$ we get $$g(y) = \frac{1}{2}x(x-1)\left( f'(y)(y-a)-f(y) \right) -f(x)\left( \frac{y^2}{2} -ay \right) + b.$$ We choose $a$ and $b$ to give us $g(0)=0=g(1)$. Indeed, we have (recalling that $f(0)=0=f(1)$), $$\begin{pmatrix} -\frac{1}{2}x(x-1) f'(0) &1 \\ -\frac{1}{2}x(x-1) f'(1)+f(x) &1 \end{pmatrix} \begin{pmatrix} a \\ b \end{pmatrix}= \begin{pmatrix} 0 \\ -\frac{1}{2}x(x-1) f'(1) + \frac{1}{2}f(x) \end{pmatrix}.$$ If the matrix here is not invertible, we have $$-\frac{1}{2}x(x-1) f'(0) = -\frac{1}{2}x(x-1) f'(1) + f(x)$$ $$\implies f(x) = \frac{1}{2}x(x-1) ( f'(1)-f'(0) ) = \frac{1}{2}x(x-1) f''(\xi)$$ by the MVT applied to $f'$ on $[0,1]$. If the matrix is invertible we can solve for $a$ and $b$. Then $g(0)=0=g(1)$ and so $g'(y)=0$ somewhere in $(0,1)$. Then if $y \neq a$, $$\left( \frac{1}{2}x(x-1)f''(y)-f(x) \right)=0,$$ which is what we want.

But, ugh. Not a nice proof. And we haven't shown that $y \neq a$....!

-

My friend has answered this nicely. The proof is along the same lines. Define $$g(y) = f(y) - \frac{y(y-1)}{2}\frac{2}{x(x-1)}f(x).$$ This function is designed so that $g(0)=g(x)=g(1)=0$, where we use the fact that $f(0)=f(1)=0$. So there exists, by the Mean Value Theorem, points $c_1 \in (0,x)$ and $c_2 \in (x,1)$ such that $g'(c_1)=g'(c_2)=0$. Next, by the Mean Value Theorem again, there exists $c_3 \in (c_1, c_2)$ such that $g''(c_3)=0$. But $$g''(y) = f''(y) -\frac{2}{x(x-1)}f(x) \implies f(x) = \frac{x(x-1)}{2} f''(c_3).$$