Question: Problem 5 : Error analysis in the Riemann Sum Algorithm When using the left Riemann sum algorithm, one does not know a priori what step

Problem 5: Error analysis in the Riemann Sum Algorithm
When using the left Riemann sum algorithm, one does not know a priori what step size or number of intervals to choose so that the result is accurate to within a desired error tolerance (the maximum error that can be tolerated). This choice depends on the given function to integrate. For example, if one integrates the constant function, an algorithm using N=1 produces the exact result, i.e., no error.
a) Modify the rmlsum file to include a while-loop so that the program code terminates when an accuracy based on relative approximate error is achieved. In each iteration of the whileloop, double the number of the intervals (i.e., the step size h is reduced by one half) in the numerical integration algorithm. The function's input/output structure should be:
function fun, a,b, maxtol
 Problem 5: Error analysis in the Riemann Sum Algorithm When using

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!