IntegrateGaussLegendre Method |
Approximation of the definite integral of an analytic smooth function by Gauss-Legendre quadrature. When either or both limits are infinite, the integrand is assumed rapidly decayed to zero as x -> infinity.
Namespace: Altaxo.CalcAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static double GaussLegendre(
Func<double, double> f,
double intervalBegin,
double intervalEnd,
int order = 128
)
Parameters
- f FuncDouble, Double
- The analytic smooth function to integrate.
- intervalBegin Double
- Where the interval starts.
- intervalEnd Double
- Where the interval stops.
- order Int32 (Optional)
- Defines an Nth order Gauss-Legendre rule. The order also defines the number of abscissas and weights for the rule. Precomputed Gauss-Legendre abscissas/weights for orders 2-20, 32, 64, 96, 100, 128, 256, 512, 1024 are used, otherwise they're calculated on the fly.
Return Value
DoubleApproximation of the finite integral in the given interval.
See Also