next up previous
Next: Exercises Up: Labs and Projects for Previous: Background

Decimal Place Accuracy

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));

\begin{maplelatex}
\begin{displaymath}
rs:=45.81440000\end{displaymath}\end{maplelatex}
  > ls:=evalf(leftsum(f(x),x==1..5,100));

\begin{maplelatex}
\begin{displaymath}
ls:=44.8544000\end{displaymath}\end{maplelatex}
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;

\begin{maplelatex}
\begin{displaymath}
0.96000000\end{displaymath}\end{maplelatex}
Experimenting with the number of subintevals, the minimum number of subintevals needed is 192.
  > rs:=evalf(rightsum(f(x),x=1..5,1920));

\begin{maplelatex}
\begin{displaymath}
rs:=45.35833622\end{displaymath}\end{maplelatex}
  > ls:=evalf(leftsum(f(x),x==1..5,1920));

\begin{maplelatex}
\begin{displaymath}
ls:=45.30833622\end{displaymath}\end{maplelatex}
  > rs-ls;

\begin{maplelatex}
\begin{displaymath}
0.05000000\end{displaymath}\end{maplelatex}


Christine M Palmer
3/24/1998