Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions