| Download
All published worksheets from http://sagenb.org
Project: sagenb.org published worksheets
Views: 168690Image: ubuntu2004
The trapezoid approximation: is the function, the interval, the number of subintervals.
The trapezoid error: is an upper bound on the second derivative of .
An example: Let , on the interval .
Compute and plot the second derivative to find the maximum value of .
So the maximum appears to be 2. Now compute the approximation until the error is small; try increasing until the two values and round to the same value to two decimal places.
0.745119412436179
0.00462962962962963
0.740489782806550
0.749749042065809
The Simpson's rule function and error computation are similar. You must put in an even number for ; the function doesn't check for this.
The maximum value of appears to be 12.
0.746855379790987
0.000260416666666667
0.746594963124320
0.747115796457654
Let's see what Sage thinks the value is.
0.746824132812427