scipy.integrate.quadrature

scipy.integrate.quadrature(func, a, b, args=(), tol=1.4899999999999999e-08, maxiter=50, vec_func=True)

Compute a definite integral using fixed-tolerance Gaussian quadrature.

Description:

Integrate func from a to b using Gaussian quadrature with absolute tolerance tol.

Inputs:

func – a Python function or method to integrate. a – lower limit of integration. b – upper limit of integration. args – extra arguments to pass to function. tol – iteration stops when error between last two iterates is less than

tolerance.

maxiter – maximum number of iterations. vec_func – True or False if func handles arrays as arguments (is

a “vector” function ). Default is True.

Outputs: (val, err)

val – Gaussian quadrature approximation (within tolerance) to integral. err – Difference between last two estimates of the integral.

See also:

romberg - adaptive Romberg quadrature fixed_quad - fixed-order Gaussian quadrature quad - adaptive quadrature using QUADPACK dblquad, tplquad - double and triple integrals romb, simps, trapz - integrators for sampled data cumtrapz - cumulative integration for sampled data ode, odeint - ODE integrators

Previous topic

scipy.integrate.fixed_quad

Next topic

scipy.integrate.romberg

This Page

Quick search