Question: When we do not know the derivative a function, we can use the secant method. The secant method provides an improved estimate for the
When we do not know the derivative a function, we can use the secant method. The secant method provides an improved estimate for the root In+1 from the previous two estimates In and In -1 which are used to estimate the derivative and then apply Newton's method: In-In-1 In+1 In. -f(xn)- f(xn) - f(xn1 Jupyter Notebook Exercise 8.4: Implement the python function: def secant (f, a, b): # your code here return b, c which, given the function f=f(x), and two previous estimates for the root a=xn-1 and b=xn, returns the updated estimates b = x and c = xn+1 using the secant method. Test your code as: print (secant (f, 0,4)). print (secant (f, 5, 3)) which should return. (4, 3.0) (3, 3.0)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
