April 2015
Intermediate to advanced
340 pages
7h 21m
English
Before starting on writing your root-finding algorithm to solve nonlinear or even linear problems, take a look at the documentation of the
scipy.optimize methods. SciPy contains a collection of scientific computing functions as an extension of Python. Chances are that these open source algorithms might fit into your applications off-the-shelf.
Some root-finding functions that can be found in the scipy.optimize modules are bisect, newton, brentq, and ridder. Let's set up the examples that we have discussed using the implementations by SciPy:
""" Documentation at http://docs.scipy.org/doc/scipy/reference/optimize.html """ import scipy.optimize as optimize y = lambda x: x**3 + 2.*x**2 - 5. dy = lambda ...
Read now
Unlock full access