Home /
Expert Answers /
Advanced Math /
numerical-analysis-4-consider-the-fixed-point-iteration-methods-for-solving-f-x-x3x2-x1-0-pa722
(Solved): Numerical Analysis 4. Consider the fixed point iteration methods for solving f(x)=x3x2+x1=0, ...
Numerical Analysis
4. Consider the fixed point iteration methods for solving f(x)=x3?x2+x?1=0, starting from the initial guess x0?=2 and using - g(x)=x?f(x) - g(x)=x?f(x)/10 - g(x)=x?f(x)/2 - g(x)=x?f(x)/f?(x) (a) Implement the iterations in MATLAB (sample code posted on Canvas). For each g(x), output the errors, convergence rate, and converegence order at each iteration step. (b) Based on your numerical results from (a), for which g(x) option(s), the iteration is convergent? Which g(x) converges faster than the others? (c) For each g(x), use the fixed-point iteration theorem to determine the convergence of iterations. What is the expected convergence rate? Does this match your numerical results above?
clearvars 0?? removes all variables from the current w format long o more digits after the decimal point fo clc ??? clean command window f=@(x)x?3?x?2?1;g=@(x)?x?3+x?2+1;fp=a(x)(3?x?2)?2?x+1; o derivative of f(x)gp=a(x)?x(3?x?2);0o? derivative of g(x)x _exact = fzero(f, 1); 0?? exact solution ? initialize the simulation x0=2; Nmax=10; x=NaN(Nmax,1); x(1)=x0; ? fixed point iterations for k=2: Nmax x(k)=g(x(k?1)); end ? calculate the absolute error and order below ???? ? output to command window ? x