Question: Problem 3 ( 3 0 point ) Consider f ( x ) = x 2 + 6 x + 8 ( i ) 1 0

Problem 3(30 point)
Consider
f(x)=x2+6x+8
(i)10 point Construct the MATLAB code of the Newton-Rhapson method to find the root of f. Discuss the convergence of the Newton-Rhapson algorithm.
(ii)10 point Construct the MATLAB code of the secant method to find the root of f.
(iii)10 point Iterative (i)-(ii) for two times when the initial conditions are p0=-3.8 and p0=-1.8. Compare the two algorithms in terms of the absolute error.
Solution
(i) MATLAB code
Convergence: f is twice differentiable. Also, f'(p)0, where p is the root of p. Hence, by the Newton-Rhapson theorem, there exists a >0 such that the algorithm converges to the root of f for any initial condition of p0in[p-,p+].
(ii) MATLAB code
(iii) simple computation
 Problem 3(30 point) Consider f(x)=x2+6x+8 (i)10 point Construct the MATLAB code

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!