Next: Exercises
Up: Labs and Projects for
Previous: Background
As done in class, to find one decimal place accuracy take the right and leftsums using the same number of subintervals
> 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;
Christine M Palmer
3/24/1998