scipy.integrate.quadrature(func, a, b, args=(), tol=1.49e-08, rtol=1.49e-08, maxiter=50, vec_func=True, miniter=1)[source]#

Compute a definite integral using fixed-tolerance Gaussian quadrature.

Deprecated since version 1.12.0: This function is deprecated as of SciPy 1.12.0 and will be removed in SciPy 1.15.0. Please use `scipy.integrate.quad` instead.

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

Parameters:
funcfunction

A Python function or method to integrate.

afloat

Lower limit of integration.

bfloat

Upper limit of integration.

argstuple, optional

Extra arguments to pass to function.

tol, rtolfloat, optional

Iteration stops when error between last two iterates is less than tol OR the relative change is less than rtol.

maxiterint, optional

vec_funcbool, optional

True or False if func handles arrays as arguments (is a “vector” function). Default is True.

miniterint, optional

Returns:
valfloat

Gaussian quadrature approximation (within tolerance) to integral.

errfloat

Difference between last two estimates of the integral.

`romberg`

`fixed_quad`

`quad`

`dblquad`

double integrals

`tplquad`

triple integrals

`romb`

integrator for sampled data

`simpson`

integrator for sampled data

`cumulative_trapezoid`

cumulative integration for sampled data

`ode`

ODE integrator

`odeint`

ODE integrator

Examples

```>>> from scipy import integrate
>>> import numpy as np
>>> f = lambda x: x**8
```>>> integrate.quadrature(np.cos, 0.0, np.pi/2)