Python Lab Tutorials: Lab 4
Develop a procedure whose input is a function , an initial guess
, the maximum number of iterations
, and the stopping criterina
.
The function should return the following table:
[Iteration, root estimate x_i, ε_r]
Using two examples from your class notes (one that converges and another that does not), compare the output of your code with the Sympy’s built-in nroot
function:nroot([f(x)],[x],[x0])