Alternative derivation

An alternative route to the difference formulae uses Taylor series expansions:

> restart;

> tayl:=convert(taylor(f(x),x=x0,4),polynom);

[Maple Math]

The error term is given by

> err:=(D@@4)(f)(xi(x))*(x-x0)^4/4!;

[Maple Math]

so that,

> f(x)=tayl+err;

[Maple Math]

We can then evaluate this expansion at the two neighbouring points:

> expr1:=f(xo+h)=subs(x=x0+h,tayl+err);

[Maple Math]

> expr2:=f(x0-h)=subs(x=x0-h,tayl+err);

[Maple Math]

We can eliminate the first derivative terms by adding both expressions together:

> lhs(expr1)+lhs(expr2)=rhs(expr1)+rhs(expr2);

[Maple Math]

which gives the the same centered three-point difference formula, but with a less complicated error term. Moreover, when [Maple Math] is continuous over [Maple Math] then the Intermediate Value Theorem says that

[Maple Math] ,

with [Maple Math] in the interval [Maple Math] .

Therefore, the three-point difference formula becomes:

[Maple Math] .