Derivation
Take the result of Theorem 10 with the quadratic Lagrange Polynomial:
.
Now, we take the second order derivative of both sides to obtain a formula for
. First, consider the Lagrange Polynomial:
> restart;
> P2:=xx->((xx-x[1])*(xx-x[2])/((x[0]-x[1])*(x[0]-x[2])))*f(x[0])+((xx-x[0])*(xx-x[2])/((x[1]-x[0])*(x[1]-x[2])))*f(x[1])+((xx-x[0])*(xx-x[1])/((x[2]-x[0])*(x[2]-x[1])))*f(x[2]);
> dP2:=diff(P2(xx),xx,xx);
or, with equidistant points such that
> x[0]:=x[1]-h;x[2]:=x[1]+h;
> dP2;
The error term can also be dealt with:
> err:=(D@@3)(f)(xi(xx))/(3!)*(xx-x[0])*(xx-x[1])*(xx-x[2]);
> derr:=diff(err,xx,xx);
This error term is difficult to manipulate, but can be simplified by evaluating the expression at the center point:
> dfx:=dP2+derr;
> dfx0:=subs(xx=x[1],dfx);
Therefore, we obtain the centered difference formula
,
but the error term becomes rather awkward to manipulate. This will only get worse when deriving formulae for higher order derivatives. Therefore, we will consider an alternative approach for deriving these formulae.