% % Written by: % -- % John L. Weatherwax 2009-04-21 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % % Problem on EPage 62; Solutions on EPage 161 % %----- close all; clc; clear all; addpath('../../BookCode'); fn = @(x) ( x^5 - 5*x^4 + 10*x^3 - 10*x^2 + 5*x - 1 ); fn_prime = @(x) ( 5*x^4 - 20*x^3 + 30*x^2 - 20*x + 5 ); [x_schroder_root, niter_schroder] = schroder(fn,fn_prime,5,2,5.e-7) [x_newton_root, niter_newton] = fnewton(fn,fn_prime,2,5e-7)