SeriesSum(X: Double; Power: Double; Step: Double; Coefficients: Array): Double;
X is the value of the power series variable.
Power is the index of power of X for the first member of the power series.
Step is the step, by which the index of the Power power is increased for each next member of the power series.
Coefficients is the set of factors by the corresponding powers of X.
The SeriesSum method returns the sum of the power series.
The sum of the power series is calculated by the formula:
To execute the example, add a link to the MathFin system assembly.
Sub UserProc;
Var
a: Array[1..5] Of Double;
d: Double;
Begin
a[1] := 2.1;
a[2] := 6.3;
a[3] := 3.2;
a[4] := 8.8;
a[5] := 4.5;
d := Math.SeriesSum(10, 1, 1, a);
Debug.WriteLine(d);
End Sub UserProc;
After executing the example the console window displays the sum of the power series.
See also: