Question: Code Provided In eLearning %find root of f(x) = 0 %using Bisection Method format long e %chosen error tolerance (TOL) TOL = .000001; %choose max

 Code Provided In eLearning %find root of f(x) = 0 %using

Code Provided In eLearning

%find root of f(x) = 0 %using Bisection Method

format long e

%chosen error tolerance (TOL) TOL = .000001;

%choose max number of iterations MAXIT = 50;

%initial bracket a = ; b = ;

%keep track of number of iterations count = 0;

%record iterates - a col vector of MAXIT length cits = zeros(MAXIT,1);

%evaluate func. at a and b fa = fbisect(a); fb = fbisect(b);

%stop if not appropriate interval if sign(fa)*sign(fb) >= 0 return end

%stop loop when error less than TOL or MAXIT reached while abs(b-a)/2 >= TOL & count

a = c; end end

%update count count = count + 1;

%get final midpoint(root estimate) c = (a+b)/2; %add to vector of iterates cits(count) = c; %display error estimate error = abs(b-a)/2

%display vector of iterates cits

%display number of iterates count

1) Modify the code bisect.m (provided in eLeaning) to write a new script, falposm that performs the Method of False Position. You will only need to add/modify a few lines of code. Run your script to compute approximations to the xcoordinates of any intersections of the ellipse (x-2 -(y-1). 1 and the parabola y=(x-2),1. For each intersection, you will need to 4 determine an initial bracket to use in your script (a sketch of the graphs would be helpful here) Also, write a separate function m-file, falpos.m to compute an appropriate function whose roots you will need to approximate for the xcoordinates of the intersections

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!