Functions Index :: P :: PowSeriesA

[<< up one level]

Module:

array :: powseries

Definition:

PowSeriesA(val x, string coefs_array, val "start_power", val "increment")

Description:

Returns a power series of x with coefficients supplied by an array and powers of defined start and increment.

It is provided as a simpler alternative for series with small number of terms to the more generic PowSeries function.

Arguments:

x: The value of which the power series will be calculated.

coefs_array: The array holding the power series coefficients.

"start_power" (Optional, defaults to 0): The starting power of the series.

"increment" (Optional, defaults to 1): The increment between successive powers of the series.

Notes and conditions on arguments relations:

1] If coefs_array has zero elements the function returns zero.

Examples:

# Calculate the power series 0.5*x + 3.23*x3 - 2.5*x5 for x = 5.4

coefs = "0.5, 3.23, -2.5"

f1 = PowSeriesA(5.4, coefs, 1, 2)

# Calculate the power series 3 + 2*x - 4*x2 + x3 for x = 2.5

coefs2 = "3, 2, -4, 1"

f2 = PowSeriesA(2.5, coefs2)

# Calculate the power series 1.3*x-0.5 + 0.2*x0.7 - 2.3*x1.9

# for x = 3

coefs3 = "1.3, 0.2, -2.3"

f3 = PowSeriesA(3, coefs3, -0.5, 1.2)

 

[<< top]