Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*****************************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**********************************

image text in transcribed

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

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions