Question: For the following two problems, use Matlab.Problem 1.Given a function f(x) =x 3 3x+ 1, we know one root offis located in (1,1). Write a
For the following two problems, use Matlab.Problem
1.Given a function f(x) =x33x+ 1, we know one root offis located in (1,1). Write a function called x0=hybrid(n,eps) that first runs bisection method with the starting interval (1,1) for n iterations to get a rough approximation of the root. Then use the Newtons method to further get an accurate estimate where the error |f(x0)|< eps. For the Newtons method, choose initial guess as the ending point with positive function value from the bisection method. Your code should give wrong approximation for n= 0.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
