Newton's method for finding the root of a function works as follows:
- Start with a function f and a tolerance epsilon.
- Let v := 1.
- Let g be the first derivative of f.
- Reassign v so that
- Repeat step (4) until f(v) is within epsilon of 0.
Using our implementation of the bisection method as a model, implement a
procedure that takes f and epsilon as arguments and returns an
approximation to the root of f.