** Next:** Exercises
**Up:** Taylor Polynomials
** Previous:** Examples

> plot(abs(sin(x)-Taylor(sin(x),x=0,3)),x=-1..1);

For this example, the tolerance, *Tol*, is about 0.008, which you can
find out by looking at the graph.

Now suppose you were asked to determine the order required so that the Taylor polynomial approximation to had a tolerance of 0.005 on the interval [-1,1]. One simple method for doing this graphically is shown below.

> plot(abs(sin(x)-Taylor(sin(x),x=0,3)),x=-1..1,y=0..0.005);

If you look at the plot, you see that the curve goes out of the plot on the top of the window. This means that the tolerance is not satisfied. If the order is increased to 5, as in the following example, then the curve goes out of the plot on the sides, meaning that the tolerance is satisfied.

> plot(abs(sin(x)-Taylor(sin(x),x=0,5)),x=-1..1,y=0..0.005);

11/21/1997