Numerical Integration
Functions
LUSE_ENGR701_704_NumericalMethods.Integrations.integrate
— Methodintegrate(f, x [; rule=:trapezoidal, tol=10^-3])
integrate(f, a, b, h[; rule=:trapezoidal, tol=10^-3])
integrate(f, a, b, n[; rule=:trapezoidal, tol=10^-3])
Find the definite integral by some numerical quadrature.
Notes
f
may be a function or vector. The domain may be defined with a vector, x
or on the interval [a
, b
] either by number of sub-intervals, n
or step-size, h
. rule
accepts {:trapezoidal
(default), :midpoint
, :simpson13
, :simpson38
, :simpsonN
}. Dataset may contain unevenly spaces points.
References
https://en.wikipedia.org/wiki/Simpson%27s_rule