NOTE: type "format short e" before doing the following so you have five significant figures at all times!"
Start with n=101 meshpoints. For the left-hand rule, set the tolerance to 10^(-4). The routine prints out the error at each step that it tries. What is the ratio of the each error divided by the subsequent error? Present this in a table.
Start with n=101 meshpoints. For the trapezoidal rule, set the tolerance to 10^(-9). The routine prints out the error at each step that it tries. What is the ratio of the each error divided by the subsequent error? Present this in a table.
Start with n=51 meshpoints. For the Simpsons rule, set the tolerance to 10^(-14). The routine prints out the error at each step that it tries. What is the ratio of the each error divided by the subsequent error? Present this in a table.
Look in the code left_hand_filter.m How does h, the length of a subinterval, change with each attempt? (Check that it changes in the same way in trap_filter.m and simp_filter.m) Use your above work to write a rule of thumb that tells you how the error changes with each attempt. (Your rule will depend on the method.)
Now, modify left_hand_filter.m, trap_filter.m, and simp_filter.m so that the number of intervals *triples* with every attempt. Repeat the above exercise, modifying the tolerances, if need be, so you get at least five error-values for each method. How do your results relate to your rule of thumb? (Give me a printout of your modified left_hand_filter.m program!)