Question: USE FOLLOWING FORM %change Bisection to False Position format long e %chosen error tolerance (TOL) TOL = .000001; %choose max number of iterations MAXIT =

USE FOLLOWING FORM
%change Bisection to False Position
format long e
%chosen error tolerance (TOL)
TOL = .000001;
%choose max number of iterations
MAXIT = 50;
%provide initial bracket; for checking initial bracket beloww%%%%%%%%%%%%%%%
a0 = ;
b0 = ;
%transfer to a and b for the algorithm below
a = a0;
b = b0;
%keep track of number of iterations
count = 0;
%record iterates - a col vector of MAXIT length
cits = zeros(MAXIT,1);
%evaluate abs value of func just as a check below%%%%%%%%%%%%%%%
absfa = abs(ffalpos(a));
absfb = abs(ffalpos(b));
%transfer to fa and fb for the algorithm
fa = ffalpos(a);
fb = ffalpos(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
%get midpoint(root estimate)%%%%%%%%%%%%%%%
c = (a + b)/2;
%eval. func at midpoint
fc = ffalpos(c);
%stop if f(c)=0
if fc == 0
break
end
%update count
count = count + 1;
%add to list of iterates
cits(count) = c;
%if sign change between a and c make c the new right endpt
if sign(fa)*sign(fc)
b = c;
fb = fc;
%if sign chg betw c and b make c the new left endpt
else
a = c;
fa = fc;
end
end
%get final midpoint(root estimate)%%%%%%%%%%%%%%%
c = (a+b)/2;
%add to vector of iterates
cits(count) = c;
%update count
count = count + 1;
%display error estimate%%%%%%%%%%%%%%%
error = abs(b-a)/2
%display vector of iterates
cits
%display number of iterates
count
%Place function below
%Write your function as a polynomial in x
%Make sure the coefficient of the highest-degree term is 1
function y=fbisect(x)
y=(x-1).^2+(x.^-1).^2-1;
end
The given script file performs the Bisection Method to estimate a root. Modify this code to perform the Method of False Position. You will only need to modify a few lines of code. Run your script to compute approximations to only the greater of the x coordinates of intersections of the ellipse - (x - 2) +(y-1)2 = 1 and the parabola y=(x - 2) +1. Use the location of the 4 center and the right-most point of the ellipse for the endpoints of your initial bracket (a sketch of the graphs would be helpful here). Also, make sure to change the error measure from =to error measure 16-a (This is because the estimate, c, at each step could be anywhere in the interval (a,b)) Also, below the script, write a separate MATLAB function to compute an appropriate mathematical function whose root you will need to approximate for the x coordinate of the intersection. (The first line of this function will take the same form as a function m-file that would be written in the MATLAB software package.) as
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
