Question: 2. Using MATLAB, write a Newton's algorithm to solve f(x) = 0. Hence your algorithm should have the message: (1) Please input your function f(x)

 2. Using MATLAB, write a Newton's algorithm to solve f(x) =
0. Hence your algorithm should have the message: (1) Please input your

2. Using MATLAB, write a Newton's algorithm to solve f(x) = 0. Hence your algorithm should have the message: (1) Please input your function f(x) (2) Please input your starting point = a After solving, your algorithm should give the message: "Your solution is = " If your algorithm does not converge (no solution) write the message: "No solution, please input another starting point". Test your algorithm using a simple function f(x) that you know the answer 1.2 Newton's Method 1.2.1 Single variable Example 2. Solve f(x) = 26--1 = 0 In-I-1 0 1 2 1.500000000 1.300490880 1.181480420 f(3 ) 88.9 2 5.4 0.538 -2.00 x 10-1 -1.19 x 10-1 5 6 1.134724150 1.134724140 7.11 x 10-8 1.55 x 10-15 -5.35 x 10-5 -6.91 x 10-9 Algorithm 2 Newton's method: Choose ro- () tol, STOP Otherwise, For n = 0,1,2,... DO f(en) In+1 I f'(on) If|f2n+1) tol, STOP (Alternatively you can stop the iteration if In+1-ers ENDDO tol)

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!