FunctionMathIntegrate(FuncDouble, Double, Double, Double) Method

Evaluates a definite integral.

Definition

Namespace: Meta.Numerics.Analysis
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public static IntegrationResult Integrate(
	Func<double, double> integrand,
	double start,
	double end
)

Parameters

integrand  FuncDouble, Double
The function to be integrated.
start  Double
The lower integration endpoint.
end  Double
The upper integration endpoint.

Return Value

IntegrationResult
The result of the integral.

Remarks

By default, integrals are evaluated to a relative precision of about 10-14, about two digits short of full precision, or an absolute precision of about 10-16, using a budget of about 5000 evaluations. To specify different evaluation settings use Integrate(FuncDouble, Double, Double, Double, IntegrationSettings).

See Integrate(FuncDouble, Double, Double, Double, IntegrationSettings) for detailed remarks on numerical integration.

Exceptions

ArgumentNullExceptionThe integrand is .
NonconvergenceExceptionThe maximum number of function evaluations was exceeded before the integral could be determined to the required precision.

See Also