Question: (15 marks) Write a MATLAB function , newton.bisect(0 that combines the Bisection and Newton's methods in a way that uses the best features of each

 (15 marks) Write a MATLAB function , newton.bisect(0 that combines the

(15 marks) Write a MATLAB function , newton.bisect(0 that combines the Bisection and Newton's methods in a way that uses the best features of each Starting with a bracketing interval [a, b.], select the first iterate r, -a,, then compute the next iterate ta using a Newton step. Ifx2e(a, , bil, proceed with either [a2, b.]-|a,a2] or [a2, ba] [c ,bi] whichever brackets the root. if xa [ai, b.], take a Bisection step and select za =-Set [a2m] = [a, [a,, b.] = [x2, b.] whichever brackets the root. The function should take the following arguments a and b, the end points of the interval where the root of /(x)-0 is being sought fname is the handle of the function that evaluates both f(x) and f(x) . tolx, a positive termination criteria . nmax, maximum number of function evaluations tolx, and nmax should be used to guarantee termination, i.e., the iterations should stop if the current interval has length smaller than tolk, or the number of times f(x) got evaluated exceeds nmax. newton bisect) should return .x, the approximate root of the equation () 0 . fx, the value of f at # . nf, the number of times f(r) and f'(r) have been evaluated . af and bf, the end points of the final bracketing interval Test your function on the equation with a# 0.5 and b# 3. The root is 2.380 061273 139339

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!