** Next:** Exercises
**Up:** Labs and Projects for
** Previous:** Background

> rs:=evalf(rightsum(f(x),x=1..5,100));

> ls:=evalf(leftsum(f(x),x==1..5,100));

The absolute value of their difference will give the accuracy. For one decimal place accuracy the absolute value of the difference should be less than 0.05.

> rs-ls;

Experimenting with the number of subintevals, the minimum number of subintevals needed is 192.

> rs:=evalf(rightsum(f(x),x=1..5,1920));

> ls:=evalf(leftsum(f(x),x==1..5,1920));

> rs-ls;

3/24/1998