Suppose that $n\geq 0$ ,and that $f$ is a real-valued function,defined and continuous on the closed interval $[a,b]$,such that the derivative of $f$ of order $n+1$ exists and is continuous on $[a,b]$.Then,given that $x_{n+1}\in [a,b]$,there exists $\xi=\xi(x_{n+1})$ in $(a,b)$ such that
\begin{equation}
f(x_{n+1})-p_n(x_{n+1})=\frac{f^{(n+1)}(\xi)}{(n+1)!}(x_{n+1}-x_0)\cdots(x_{n+1}-x_n).
\end{equation}
Proof:This result is closely related to 牛顿插值公式.According to Newton's interpolation method ,
\begin{align*}
f(x_{n+1})=f(x_0)&+(x_{n+1}-x_0)f[x_0,x_1]\\&+(x_{n+1}-x_0)(x_{n+1}-x_1)f[x_0,x_1,x_2]\\&+\cdots\\&+(x_{n+1}-x_0)(x_{n+1}-x_1)\cdots
(x_{n+1}-x_{n-1})f[x_0,x_1,\cdots,x_n]\\&+R_n(x_{n+1})
\end{align*}
Now we prove that
\begin{equation}
f[x_{n+1},x_0,x_1,\cdots,x_n]=\frac{f^{(n+1)}(\xi(x_{n+1}))}{(n+1)!},\forall x_{n+1}\in
[a,b],\exists \xi(x_{n+1})\in (a,b)
\end{equation}
When $n=0$,
\begin{equation}
f[x_1,x_0]=f'(\xi)
\end{equation}
This is simply the differential mean value theorem.When $n=1$ ,we just need to prove that
\begin{equation}
f(x_2)=f(x_0)+f[x_0,x_1](x_{2}-x_0)+\frac{f^{(2)}(\xi(x_2))}{2!}(x_{2}-x_0)(x_{2}-x_1)
\end{equation}
What to do next?We stop here to investigate what we did when we deal with the case of $n=0$.How did we prove differential mean value theorem?We use Rolle's theorem once to prove the differential mean value theorem which is shown below:
Let $f(x)$ be continous on $[a,b]$,differentiable on $(a,b)$,then there exists $\xi\in (a,b)$ such that
\begin{equation}
f[x_0,x_1]=f'(\xi)
\end{equation}
In order to prove this ,we construct a function
\begin{equation}
g(x)=f(x)-(f(x_0)+f[x_0,x_1](x-x_0))
\end{equation}
Then $g(x_0)=g(x_1)=0$,so we can use Rolle's theorem once to prove the differential mean value theorem.So similarly,We construct a function $g(x)$,such that
\begin{equation}
g(x)=f(x)-(f(x_0)+f[x_0,x_1](x-x_0)+f[x_0,x_1,x_2](x-x_0)(x-x_1))
\end{equation}
It is easy to verify that
\begin{equation}
g(x_0)=0,g(x_1)=0,g(x_2)=0
\end{equation}
So use Rolle's theorem twice,we can get that
\begin{equation}
f''(\xi(x_2))-2!f[x_0,x_1,x_2]=0
\end{equation}
So
\begin{equation}
f[x_0,x_1,x_2]=\frac{f''(\xi(x_2))}{2!}
\end{equation}
So in general,we construct a function
\begin{align*}
g(x)=f(x)-(f(x_0)+f[x_0,x_1](x-x_0)+f[x_0,x_1,x_2](x-x_0)(x-x_1)+\cdots+f[x_0,x_1,\cdots,x_n,x_{n+1}](x-x_0)(x-x_1)\cdots
(x-x_n))
\end{align*}
Then it is easy to verify that
\begin{equation}
g(x_0),g(x_1),\cdots,g(x_n)=0
\end{equation}(Why?)
So use Rolle's theorem $n+1$ times ,we can get that
\begin{equation}
f^{(n+1)}(\xi(x_{n+1}))=(n+1)!f[x_0,x_1,\cdots,x_n,x_{n+1}]
\end{equation}Done.
Remark:I also make some notes in Remainder term of Lagrange Interpolation Polynomial.