quadax.AbstractQuadratureRule.integrate

abstract AbstractQuadratureRule.integrate(fun: Callable[[...], Array], a: float, b: float, args: tuple[Any, ...]) tuple[Array, Array, Array, Array]Source

Integrate fun(x, *args) from a to b.

Parameters:
  • fun (callable) – Function to integrate, should have a signature of the form fun(x, *args) -> float, Array. Should be JAX transformable.

  • a (float) – Lower and upper limits of integration. Must be finite.

  • b (float) – Lower and upper limits of integration. Must be finite.

  • args (tuple, optional) – Extra arguments passed to fun.

Returns:

  • y (float, Array) – Estimate of the integral of fun from a to b

  • err (float) – Estimate of the absolute error in y.

  • y_abs (float, Array) – Estimate of the integral of abs(fun) from a to b

  • y_mmn (float, Array) – Estimate of the integral of abs(fun - <fun>) from a to b, where <fun> is the mean value of fun over the interval.