Question: Problem 1. Use the following pseudocode for the bisection method to write MATLAB code to approximate the cube root 3 a of a given number

Problem 1. Use the following pseudocode for the bisection method to write MATLAB code to approximate the cube root 3 a of a given number a on an appropriate interval with accuracy roughly within 108. Use at most 100 iterations. Explain steps by commenting on them. Use f(x) = x3 a. Choose a = 2 + w where w is the last digit of your NAU user name.

Problem 2. Use the following pseudocode for the fixed point method to write MATLAB code to approximate a solution to x4 3x2 3 = 0 on the interval [1, 2] with accuracy roughly within 108 using x0 = 1. Use maximum number of iteration of 100. Explain steps by commenting on them. Algorithm : Bisection Method Input: f(x)=ex x2,interval[0,2],tolerance103,maximumnumberofiterations50 Output: an approximate root of f on [0, 2] within 103 or a message of failure set a = 0 and b = 2; xold = a; for i = 1 to 50 do set x = (a + b)/2; if |x xold|

Algorithm : Fixed-point Iteration Input: g(x) = ln(x + 2), interval [0, 2], an initial approximation x0, tolerance 103, maximum number of iterations 50 Output: an approximate fixed point of g on [0, 2] within 103 or a message of failure setx=x0 andxold=x0; for i = 1 to 50 do x = g(x); if |x xold|

end if

Problem 1. Use the following pseudocode for the bisection method to write

Problem 1. s the following pseudocode for the bisection method to write MATLAB code to appeoximate the cube root a of a given mber a on an appeopelate interval with aceuracy roughly within 10-Use at most 100 iterations. Explain steps by commenting on the Use fa)- -a Choose a-2+w whee a is the lust digit of your NAU user name Problem 2. Use the following approximate a solution tor for the fied polnt method to write MATLAB code to 3-0 on the intervl,2] with aecuracy ronghly within 10- using -1. Use maximu mamber of iteration of 100. Explain steps by commenting on them Algorithm: Bisection Method luput: fx)-e2, interval (0,2,tolerance 10,mach mber of iteratlons 50 Output: an approximate root of f oa ID within 10-a or a mesage of failure zold-a for-1 to 30 do set -(a )/2 % checking requind accuracy %dane FoundSolution-true % kase for enviroilliit end if a-a and b- else end if % update zodd for the next iteration end for print the roquired accuracy is not reached in 30 iteratlos end if Input: g(z)-n(z + 2), interval (0.21, an initial appeuximation fo, tolerance 10 a maximum l umber of Output: an apprcodmate fixed point of g on 0,2 within 10 or a message of fallure set z-o and zold- for-1 to 30 do -9(x) f old 10 then % checking equired accuracy %dae becak end if % update zodd for the next iteration end for f FoundSolution then print the roquired accuracy is not reached in 30 iteratlons end if

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!