Taylor polynomials
We already know that we can approximate a function near a given point by a Taylor series:
> f(x)=taylor(f(x),x=c,5);
From this approximation, we can define a Taylor Polynomial by truncating the series after a number of terms, e.g.
> P[4](x):=convert(taylor(f(x),x=c,5),polynom);
with the error term given by
> R[4](x)=((D@@5)(f)(xi(x))/(`5!`))*(x-c)^5;
with
between
and
. In general, the error term is given by
> R[n](x)=((D@@(n+1))(f)(xi(x))/((n+1)!))*(x-c)^(n+1);
with
between
and
.
This formula is of some theoretical importance, and can lead to upper estimates for the truncation error of the approximation. It can not be use to calculate the actual error since
is an unknown quantity.
In Worksheet 3, we have seen that this approximation can be good close to
, but will fail rapidly for values of
which do not lie close to
. The obvious disadvantage is that the Taylor Polynomial only approximates a function around one given point and does not take other data points into account.