Question

In: Advanced Math

For the equation e^x =x+2, (a) use the fixed point iteration method to determine its two...

For the equation e^x =x+2,
(a) use the fixed point iteration method to determine its two roots to eight correct decimal places (you may need to write this equation in two different ways of x = g(x) in order to obtain these two roots);
(b) numerically calculate the convergence rates for your converged iterations; (c) compare these numerical convergence rates with the theoretical conver- gence rates we presented in class (also see Theorem 1.6 on page 38 of the textbook).

Solutions

Expert Solution

%%Matlab code for fixed point iteration
%function for fixed point iteration
clear all
close all
fprintf('\nFunction for which we have to find the root\n')
f1=@(x) exp(x)-(x+2);
disp(f1)
fprintf('\nFixed point iteration function \n')
f2=@(x) log(x+2);
disp(f2)

xx=0.3;%Initial guess
%loop for iterations
xx(1)=0.3;
c=1;
err=1;
%loop for fixed point iterations
while err>=10^-7
  
    c=c+1;
    xx(c)=double(f2(xx(c-1)));
    err=abs(xx(c-1)-xx(c));
    fprintf('\tRoot using fixed point method after %d iteration is %f.\n',c-1,xx(c))
    
end

%%%%%%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%%%%%


Related Solutions

Use a fixed-point iteration to determine the solution (in [0,1])ofthe equation x = 1.5cos(x). Use a...
Use a fixed-point iteration to determine the solution (in [0,1])ofthe equation x = 1.5cos(x). Use a starting value of 0.5. How many iterations does it take before you have an answer which is accurate in the first 2 digits? ...in the first 3 digits?...in the first 4 digits? What happens if you change the starting value to 0.7?...to 0.0? Does the fixed-point iteration converge? If not, modify the equation so that x = cos(x)/30 + 44x/45. Does the iteration converge...
Use the Fixed-Point Iteration Method to find the root of f ( x ) = x...
Use the Fixed-Point Iteration Method to find the root of f ( x ) = x e^x/2 + 1.2 x - 5 in the interval [1,2].
Create a python code that calculates fixed point iteration method using a for loop.
Create a python code that calculates fixed point iteration method using a for loop.
Finally, consider the following fixed point iteration xk+1 = g(xk) = arccos −1 1 + e...
Finally, consider the following fixed point iteration xk+1 = g(xk) = arccos −1 1 + e 2x and show that finding a fixed point of g(x) is equivalent to finding a root of f(x) = 0. Use the code fixedpt.m to try to approximate the root using an initial guess of x0 = −3. Can you explain why your iteration behaves as it does? Hint: Plot the fixed-point function and think convergence! Code in fixedpt.m:- function [xfinal, niter, xlist] =...
use muller's method to find the roots of the equation f(x) = sin x - x/2...
use muller's method to find the roots of the equation f(x) = sin x - x/2 =0 near x=2
Suppose we modified the Pollard rho method, so the iteration would be f(x) = x^2 mod...
Suppose we modified the Pollard rho method, so the iteration would be f(x) = x^2 mod n instead of f(x) = x^2 + 2 mod n. How well would it perform, and why? (You are encouraged to try some moderately large examples using a computer.)
Suppose we modified the Pollard rho method, so the iteration would be f(x) = x^2 mod...
Suppose we modified the Pollard rho method, so the iteration would be f(x) = x^2 mod n instead of f(x) = x^2 + 2 mod n. How well would it perform, and why?
Determine a differential equation that has x = 0 as a regular singular point and that...
Determine a differential equation that has x = 0 as a regular singular point and that the roots of the index equation are i and i. Find a solution around x = 0.
2. For the information below, use the high-low method to determine the mixed cost equation. You...
2. For the information below, use the high-low method to determine the mixed cost equation. You must use both data for the high point, and the low point. You must show the equation (for both the high point and low point - meaning, you must to have TWO equations), not just what the variable cost is. – 4 marks Units Cost 26 2400 40 3400 28 2600 36 3000 24 2200 Please show your work
For f(x)=x^2+x-2/x^2-4, determine the equation for any vertical asymptotes, the equation for any horizontal asymptotes, and...
For f(x)=x^2+x-2/x^2-4, determine the equation for any vertical asymptotes, the equation for any horizontal asymptotes, and the x-coordinates of any holes
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT