15.12.2012 Views

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SciPy Reference Guide, Release 0.8.dev<br />

local<br />

fminbound, brent, golden, bracket<br />

n-dimensional<br />

fsolve<br />

one-dimensional<br />

brentq, brenth, ridder, bisect, newton<br />

scalar<br />

fixed_point<br />

Notes<br />

f must be continuous. f(a) and f(b) must have opposite signs.<br />

brenth(f, a, b, args=(), xtol=9.9999999999999998e-13, rtol=4.4408920985006262e-16, maxiter=100,<br />

full_output=False, disp=True)<br />

Find root of f in [a,b].<br />

A variation on the classic Brent routine to find a zero of the function f between the arguments a and b that uses<br />

hyperbolic extrapolation instead of inverse quadratic extrapolation. There was a paper back in the 1980’s ... f(a)<br />

and f(b) can not have the same signs. Generally on a par with the brent routine, but not as heavily tested. It is a<br />

safe version of the secant method that uses hyperbolic extrapolation. The version here is by Chuck Harris.<br />

Parameters<br />

f : function<br />

Python function returning a number. f must be continuous, and f(a) and f(b) must<br />

have opposite signs.<br />

a : number<br />

One end of the bracketing interval [a,b].<br />

b : number<br />

The other end of the bracketing interval [a,b].<br />

xtol : number, optional<br />

The routine converges when a root is known to lie within xtol of the value return.<br />

Should be >= 0. The routine modifies this to take into account the relative precision<br />

of doubles.<br />

maxiter : number, optional<br />

if convergence is not achieved in maxiter iterations, and error is raised. Must be >=<br />

0.<br />

args : tuple, optional<br />

containing extra arguments for the function f. f is called by apply(f,<br />

(x)+args).<br />

full_output : bool, optional<br />

If full_output is False, the root is returned. If full_output is True, the return value is<br />

(x, r), where x is the root, and r is a RootResults object.<br />

disp : {True, bool} optional<br />

Returns<br />

x0 : float<br />

If True, raise RuntimeError if the algorithm didn’t converge.<br />

320 Chapter 3. Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!