

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Due February 18
In this assignment, we will address two issues with the Bisection method and Newton’s method:
function [a,b]=findbracket(f,x0)
which finds an interval [a, b] around x 0 such that f (a) and f (b) have different signs. Use the following strategy:
function p=newtonbisection(f,df,a,b,tol)
combining Newton’s method and the Bisection method according to the following strategy:
Use the functions newton and bisection on the course web page as a starting point, this function will be like a combination of the two.
f=@(x) sin(x)-exp(-x); df=@(x) cos(x)+exp(-x); x=newtonbisection(f,df,1.9,30,1e-8);
Present the result in a table showing for each iteration the method used (Newton or Bisect), a, b, p, and f (p).
Turn page −→
f=@(x) sin(x)-exp(-x); df=@(x) cos(x)+exp(-x); for x0=-3: [a,b]=findbracket(f,x0); x=newtonbisection(f,df,a,b,1e-8); [x0,a,b,x] end
Present your results in a table showing x 0 , a, b, and x.
Reporting requirements:
The GSIs will not run any submitted MATLAB codes. Prepare a report showing the requested information, which is essentially just your MATLAB functions and the computed tables. Give brief comments if things do not work as expected.