Question: 1. In this problem, you will compare three methods for root finding bisection, Newton, and secant method-on a suite of test problems (a) Implement bisection,

 1. In this problem, you will compare three methods for root

1. In this problem, you will compare three methods for root finding bisection, Newton, and secant method-on a suite of test problems (a) Implement bisection, Newton, and secant methods. Make sure you use good stopping crite- (b) Using the quadratic formula, compute the roots of f(x) = 4x2-3r-3. Verify that your (c) Compare the three methods on the following functions: (i) r3 - 2r - 2, (ii) exp(x) +x -7, ria; see Sauer, section 1.2.4 implementations find the correct roots with appropriate starting points and (iii) exp(x) +sin(x)- 4. The comparison should include some measure of cost and some measure of accuracy. For cost, you might use a counter variable to count the number of iterations. You might also use the number of function evaluations (which will be closely related to the number of iterations). You might also use wall clock time, which you can measure in Matlab using tic and toc. For accuracy, since you don't know the true roots, you might run the method with a very small tolerance (like 1e-12) to get a best guess at the true value to 10 or 11 digits. Then you can study the accuracy by looking at the difference between successive iterates and the computed best guess. Make a figure with axes cost and accuracy, and plot each method applied to each problem on this plot. Use this figure to argue for which method is best. (d) For the same functions as above, plot the error (or the error estimate best guess) as a function of the iteration using a logio scale on the vertical axis. Verify the expected convergence rates of the methods-i.e., linear, quadratic, or superlinear. 1. In this problem, you will compare three methods for root finding bisection, Newton, and secant method-on a suite of test problems (a) Implement bisection, Newton, and secant methods. Make sure you use good stopping crite- (b) Using the quadratic formula, compute the roots of f(x) = 4x2-3r-3. Verify that your (c) Compare the three methods on the following functions: (i) r3 - 2r - 2, (ii) exp(x) +x -7, ria; see Sauer, section 1.2.4 implementations find the correct roots with appropriate starting points and (iii) exp(x) +sin(x)- 4. The comparison should include some measure of cost and some measure of accuracy. For cost, you might use a counter variable to count the number of iterations. You might also use the number of function evaluations (which will be closely related to the number of iterations). You might also use wall clock time, which you can measure in Matlab using tic and toc. For accuracy, since you don't know the true roots, you might run the method with a very small tolerance (like 1e-12) to get a best guess at the true value to 10 or 11 digits. Then you can study the accuracy by looking at the difference between successive iterates and the computed best guess. Make a figure with axes cost and accuracy, and plot each method applied to each problem on this plot. Use this figure to argue for which method is best. (d) For the same functions as above, plot the error (or the error estimate best guess) as a function of the iteration using a logio scale on the vertical axis. Verify the expected convergence rates of the methods-i.e., linear, quadratic, or superlinear

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!