Question: Write a function that implements the following pseudo-code: Input: f, f', x, , N. Output: x*. 1. Repeat N times: (a) Set y =
Write a function that implements the following pseudo-code: Input: f, f', x, , N. Output: x*. 1. Repeat N times: (a) Set y = x. (b) Take one Newton step, starting from y. Call the result y2. (c) Take one Newton step, starting from y2. Call the result y3. (d) Set 2=91 (y2 - y) Y3 - 2y2 + Y1 (e) Display f(x)|. (f) If |f(x) < e print "converged!", break. 2. Output x = x. This algorithm is called Steffensen's iteration. (b) Write a sctipt to test your function on the problem - 1 exp(-x + x) x 1.0836 (with initial guess x = 1) 2 Show that Newton iteration does not converge quadratically, but your new iterative algorithm does.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
