Python implementation of Muller's method for root finding.
muller
has no dependencies.
Here is a quick example to show how it is used. First, import the root finder
from muller import muller
We will look for a root of
We will look for the root at
from math import exp, sin
def f(x): return exp(-x)*sin(x)
xguesses = (-1, 0, 1)
To search for the root, we type
res = muller(f, xguesses)
We may examine the res
object. The most useful attribute is res.root
, which contains the estimate of the root.
To test, run
python -m unittest tests.test
in the root directory.