Previous topic

mmf.math.integrate.integrate_1d.clenshaw_curtis

Next topic

mmf.math.integrate.integrate_1d.quadrature

This Page

mmf.math.integrate.integrate_1d.imt

IMT(*varargin, **kwargs) Class for performing the integral

Inheritance diagram for mmf.math.integrate.integrate_1d.imt:

Inheritance diagram of mmf.math.integrate.integrate_1d.imt

IMT Integration method (mmf.math.integrate.integrate_1d.imt)

IMT(*varargin, **kwargs) Class for performing the integral
class mmf.math.integrate.integrate_1d.imt.IMT(*varargin, **kwargs)[source]

Bases: mmf.objects.StateVars

Class for performing the integral

IMT(n_max=11,
    n=9,
    n_0=5,
    abs_tol=2.22044604925e-16,
    rel_tol=2.22044604925e-16,
    verbosity=0)

\int_{a}^{b}\d{x} f(x)

using the IMT method for evaluating integrals over [0,1]:

\int_{0}^{1} f(x) \d{x} = \int_{0}^{1} f[x(t)] x'(t) \d{t}
\approx \frac{1}{N}\sum_{k=1}^{N-1} f(x_k) x'_{k},\\
t_{k} = \frac{k}{N},\\
x_{k} = \int_{0}^{t_{k}} x'(t)\d{t},\\
x'(t) = \frac{1}{Q}\exp\left(-\frac{1}{t} - \frac{1}{1-t}\right),\\
Q = \int_{0}^{1}\exp\left(-\frac{1}{t} - \frac{1}{1-t}\right).

Examples

>>> integrate = IMT()
>>> integrate(np.sqrt, 0, 1)        
0.666666666...

Attributes