IndefiniteIntegral

A trapezoidal approximation of a function as a stand-in for an unknown indefinite integral. This approximation is only defined on positive values of x, if you wish to approximate a negative domain you must use an inverted evaluation function, and the absolute values of evaluation parameters.

Constructors

IndefiniteIntegral

#
public IndefiniteIntegral(Func<double, double> function, double tolerance)
function (Func<double, double>)
tolerance (double)

Fields

MaximumParameter

#
public const int MaximumParameter = 214748364

Properties

Function

#
public Func<double, double> Function { get; }
Function being approximated.

MaxedOut

#
public bool MaxedOut { get; }
Gets whether the integral has maxed out. Any cumulative area magnitude over 1e12 is assumed to hold forever.

SampleCount

#
public long SampleCount { get; }

Tolerance

#
public double Tolerance { get; }
Tolerance per parameter unit.

Methods

IntegralAt

#
public double IntegralAt(double x)
Evaluate the integral at the given parameter.
x (double)Parameters. For any non-positive x this method return zero.