Question: code in matlab APPLIED NUMERICAL METHODS Assignment: Write your own program that performs fixed point iteration for a given function g(x). Check whether your program
code in matlab
APPLIED NUMERICAL METHODS
Assignment: Write your own program that performs fixed point iteration for a given function g(x). Check whether your program converges to a fixed point or if it diverges. The convergence criterion for your program is given by the condition |xn+1 xn| < tol, where tol is a given tolerance. When it diverges, your code should run up to a maximum number N of iterations or implement a line to stop the code. Print out a message in either case to say how many steps your program has run, and what solution it has found (if the method converges). Use your program to solve the following: (1) Which of the following three Fixed-Point Iterations converge to 2 ? Rank the ones that converge from faster to slowest and explain why ? Use an initial guess x0 = 1, a tolerance of 106 , and a maximum number of steps N = 50. a) g(x) = x/2 + 1/ x b) g(x) = 2x /3 + 2/ 3x c) g(x) = 3x/ 4 + 1/2x
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
