Question: *****************************MAT LAB HELP PLEASE********************************** THESE ARE THE TWO PSUEDO CODES FOR THE NEWTON AND SECANT METHODS AS MENTIONED ABOVE: Find the root(s) of the following

*****************************MAT LAB HELP PLEASE**********************************

*****************************MAT LAB HELP PLEASE********************************** THESE ARE THE TWO PSUEDO CODES FOR THE

THESE ARE THE TWO PSUEDO CODES FOR THE NEWTON AND SECANT METHODS AS MENTIONED ABOVE:

NEWTON AND SECANT METHODS AS MENTIONED ABOVE: Find the root(s) of the

following functions using both Newton's method and the secant method, using tol-

Find the root(s) of the following functions using both Newton's method and the secant method, using tol- eps You wil need to experiment with the parameters pO, p1, and maxits For each root, visualize the iteration history of both methods by plotting the absolute errors, as a function of iteration number, on a (single) semilogy plot. Label the two curves (Newton's method and secant method) using a legend, describing the po and p1 values you used, e.g., "Newton's (po-7)" and "Secant (po-0, p1-1)" (a) f: 2-2, which has two roots, = v2. Rewrite the iteration formula to verify it is the same as the Babylonian method (see Worksheet 4 Q1(a)). Explain the problem with the starting guess po 0 in terms of the derivative of f. (b) f: tanh(z), which has one root, Characterize (roughly) when the methods converge or diverge in terms of the starting guesses. (E.g., try Newton's method with po 1.08 and 1.09.) Newton's Method To find a solution to f(x) = 0 given an initial approximation po: INPUT initial approximation po; tolerance TOL; maximum number of iterations No OUTPUT approximate solution p or message of failure. Step 1 Set i=1 Step 2 While i s No do Steps 3-6 Step 3 Set p = po-f(po)/f' (po). If lp- pol

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!