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.

fixed_quad(func, a, b, args=(), n=5)<br />

Compute a definite integral using fixed-order Gaussian quadrature.<br />

Description:<br />

Inputs:<br />

Integrate func from a to b using Gaussian quadrature of order n.<br />

func – a Python function or method to integrate<br />

(must accept vector inputs)<br />

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

a – lower limit of integration b – upper limit of integration args – extra arguments to pass to function.<br />

n – order of quadrature integration.<br />

Outputs: (val, None)<br />

See also:<br />

val – Gaussian quadrature approximation to the integral.<br />

quad - adaptive quadrature using QUADPACK dblquad, tplquad - double and triple integrals<br />

romberg - adaptive Romberg quadrature quadrature - adaptive Gaussian quadrature romb, simps,<br />

trapz - integrators for sampled data cumtrapz - cumulative integration for sampled data ode, odeint<br />

- ODE integrators<br />

quadrature(func, a, b, args=(), tol=1.4899999999999999e-08, maxiter=50, vec_func=True)<br />

Compute a definite integral using fixed-tolerance Gaussian quadrature.<br />

Description:<br />

Inputs:<br />

Integrate func from a to b using Gaussian quadrature with absolute tolerance tol.<br />

func – a Python function or method to integrate. a – lower limit of integration. b – upper limit of<br />

integration. args – extra arguments to pass to function. tol – iteration stops when error between last<br />

two iterates is less than<br />

tolerance.<br />

maxiter – maximum number of iterations. vec_func – True or False if func handles arrays as<br />

arguments (is<br />

Outputs: (val, err)<br />

See also:<br />

a “vector” function ). Default is True.<br />

val – Gaussian quadrature approximation (within tolerance) to integral. err – Difference between<br />

last two estimates of the integral.<br />

romberg - adaptive Romberg quadrature fixed_quad - fixed-order Gaussian quadrature quad - adaptive<br />

quadrature using QUADPACK dblquad, tplquad - double and triple integrals romb, simps, trapz<br />

- integrators for sampled data cumtrapz - cumulative integration for sampled data ode, odeint - ODE<br />

integrators<br />

romberg(function, a, b, args=(), tol=1.48e-08, show=False, divmax=10, vec_func=False)<br />

Romberg integration of a callable function or method.<br />

Returns the integral of function (a function of one variable) over the interval (a, b).<br />

If show is 1, the triangular array of the intermediate results will be printed. If vec_func is True (default is False),<br />

then function is assumed to support vector arguments.<br />

3.4. Integration and ODEs (<strong>scipy</strong>.integrate) 181

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

Saved successfully!

Ooh no, something went wrong!