
Project: Newton’s Metho d
Newton’s method is a powerful technique for numerically computing the
zeros of differentiable functions. It is an iterative technique, meaning that
instead of applying a formula to directly compute the answer, it repeatedly
tries to compute a better approximation until the desired accuracy is reached.
Iteration is just a fancy word for repetition, which we know how to do in
Python using for loops and while loops.
Newton’s method gives a surprisingly simple algorithm for computing
√
k.
Listing 8.2: Newton’s Method (Algorithm)
# To compute sqrt(k)
Begin with an initial guess x.
Repeat until desired accuracy is reached:
Replace x with ...