Question: CODE IN MATLAB APPLIED NUMERICAL METHODS Write your own program that performs fixed point iteration for a given function g(x). Check whether your program converges

CODE IN MATLAB

APPLIED NUMERICAL METHODS

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:

2-2) Each of the following have a fixed point equal to 5. Do the Fixed-Point Iterations converge? If so, rank them from fastest to slowest. Use x0 = 2.5 and a tolerance of 108

. a) g(x) = 5 + x x^2

b) g(x) = 5/x

c) g(x) = 1 + x (1/ 5 )* x^2

d) g(x) = (1 /2 )(x+ 5/x)

(4) Solve the fixed point iteration g(x) = (1/3 + (x 1/3)^3 ), up to a tolerance 10^6 or maximum number of iterations N = 50, with (a) x0 = 1, (b) x0 = 1.4. Which execution is better? And why? Analytically find all the fixed points and analyze (without computing iterates) to which of these fixed points the method should converge if the initial guess is close enough to the root.

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!