This documentation is compiled for the latest release of Mathos Core Library
Assembly: Mathos (in Mathos.dll) Version: 1.0.5.1 (1.0.5.1)
Calculates the approximation of an integral given a function, lower limit, upper limit and an approximation algorithm
Namespace: Mathos.Calculus
Assembly: Mathos (in Mathos.dll) Version: 1.0.5.1 (1.0.5.1)
Syntax
public static double Integrate( Func<double, double> function, double lowerLimit, double upperLimit, IntegralCalculusIntegrationAlgorithm integrationAlgorithm = IntegralCalculusIntegrationAlgorithm.SimpsonsRule, double numberOfIntervals = 100000 )
Parameters
- function
- Type: SystemFuncDouble, Double
Assign a function using a lambda expression. - lowerLimit
- Type: SystemDouble
Enter the lower limit. - upperLimit
- Type: SystemDouble
Enter the upper limit. - integrationAlgorithm (Optional)
- Type: Mathos.CalculusIntegralCalculusIntegrationAlgorithm
Specify the integration approximation algorithm. The accuracy depends on the algorithm as well. - numberOfIntervals (Optional)
- Type: SystemDouble
Set the number of intervals. The bigger value, the more accuare approximation. For Simpson's rule, this value should be even.
Return Value
Type: DoubleSee Also