Question: Please fill in the missing code where #YOUR CODE HERE is written A function f is strictly montonically increasing if f(a 0 for all x

Please fill in the missing code where #YOUR CODE HERE is writtenPlease fill in the missing code where #YOUR CODE HERE is written

A function f is strictly montonically increasing if f(a 0 for all x @tests.add ( monotonic_diverge def f(x): Strictly monotonically increasing function with a simple root at x-0 for which Newton's method diverges with initial guess X-1 Remember that the interface requires that this function and its derivative be defined # YOUR CODE HERE raise NotImplementedError() plotf(tests[ monotonic_diverge def smonotonic (f) x - np.linspace(-5, fx -f(x)[0] return np.all (fx[1: 5) def isdivergent(f): h newton(f, -1, 3) return np.abs (hx[-1])np.abs (hx[-2]) assert np.abs (tests[ 'monotonic_diverge' ](e)e])

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!