Compute a definite integral using fixed-order Gaussian quadrature.

Integrate func from a to b using Gaussian quadrature of order n.

Parameters:
funccallable

A Python function or method to integrate (must accept vector inputs). If integrating a vector-valued function, the returned array must have shape `(..., len(x))`.

afloat

Lower limit of integration.

bfloat

Upper limit of integration.

argstuple, optional

Extra arguments to pass to function, if any.

nint, optional

Order of quadrature integration. Default is 5.

Returns:
valfloat

Gaussian quadrature approximation to the integral

noneNone

Statically returned value of None

`quad`

`dblquad`

double integrals

`tplquad`

triple integrals

`romberg`

`quadrature`

`romb`

integrators for sampled data

`simpson`

integrators 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.fixed_quad(np.cos, 0.0, np.pi/2, n=4)