Home

scipyintegrate

SciPy integrate, or scipy.integrate, is a subpackage of SciPy focused on numerical integration and the solution of ordinary differential equations. It provides a collection of routines for definite integrals in one or more dimensions, as well as tools for solving initial-value problems and stiff systems. The module draws on established Fortran routines for reliability and offers Pythonic interfaces.

For one-dimensional integrals, the primary function is quad(func, a, b, ...), which returns the integral value and

Multi-dimensional integration is supported via dblquad and tplquad for nested integrals, and nquad for higher-dimensional problems.

The module also covers numerical integration of ordinary differential equations. The most common tools are solve_ivp,

Overall, scipy.integrate offers a versatile suite of functions for precise, reliable numerical integration and differential equation

an
estimate
of
the
absolute
error.
Quad
relies
on
the
QUADPACK
library.
Additional
one-dimensional
options
include
fixed_quad
for
fixed
Gauss-Legendre
quadrature,
quadrature
for
higher-precision
adaptive
rules,
and
romberg
for
Romberg
extrapolation.
For
vector-valued
integrands,
quad_vec
evaluates
the
integral
of
each
component
and
returns
an
array
of
results.
These
functions
accept
limits
that
may
be
constants
or
functions
of
other
variables
and
return
a
value
with
an
error
estimate.
In
addition,
scipy.integrate
provides
simps
for
Simpson’s
rule
as
a
quick,
low-cost
approximation.
which
provides
several
integration
methods
such
as
RK45,
RK23,
DOP853,
Radau,
and
BDF,
and
is
the
recommended
interface
for
solving
initial-value
problems.
ODEINT
is
an
older
interface
available
for
backward
compatibility
and
uses
the
LSODA
solver
from
the
ODEPACK
library.
solving
within
the
SciPy
ecosystem.