Open Educational Resources

Python Lab Tutorials: Lab 4

Develop a procedure whose input is a function f, an initial guess x_0, the maximum number of iterations nmax, and the stopping criterina eps.

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])

Video Tutorials

Newton Raphson Method

Leave a Reply

Your email address will not be published.