Documentation/Calc Functions/SERIESSUM

Function name:
SERIESSUM

Category:
Mathematical

Summary:
Calculates the sum of the first terms of an infinite power series of the form: $$\sum_{n=0}^{\infty }a_nx^n$$

x is the variable and an is the coefficient of the nth term in the series.

Syntax:
SERIESSUM(X; N; M; Coefficients)

Returns:
Returns a real number that is the sum of the first terms of the given power series.

Arguments:
X is a real number, or a reference to a cell containing that number, that is the variable for the power series.

N is a real number, or a reference to a cell containing that number, that is the initial power.

M is a real number, or a reference to a cell containing that number, that is the increment to the power for each term.

Coefficients gives the set of real numbers to be used as coefficients for the terms of the power series. The number of coefficients provided defines the number of terms to be calculated (one term per coefficient). Coefficients should take one of the following forms:


 * A simple reference to a cell range containing real numbers (for example, A1:B9).
 * The name of a named range, comprising cells containing real numbers.
 * The name of a database range, comprising cells containing real numbers.
 * An inline array of real numbers (for example, {1.2, 3.4, 5.6, 7.8}).

The following error conditions may be encountered:
 * If any of X, N, or M are non-numeric, then SERIESSUM reports a #VALUE! error.
 * SERIESSUM will not necessarily generate an error when Coefficients is a real number or a reference to a single cell. However, if the Coefficients argument is a string in quotation marks or a reference to a single cell containing a string, then SERIESSUM reports a #VALUE! error.
 * Where Coefficients is specified as an inline array or a range of cells, entries that contain text strings or blanks are ignored.
 * If X is negative and either of N or M are non-integer, then SERIESSUM reports an invalid argument error (Err:502). Negative values cannot be raised to fractional powers.
 * If X and N are both equal to 0, then SERIESSUM reports a #VALUE! error. 0 to the power of 0 is undefined.

Additional details:
$$\text{f}(x)=a_{0}x^{n}+a_{1}x^{n+m}+a_{2}x^{n+2m}+a_{3}x^{n+3m}+...$$
 * A power series may be represented as:


 * where:
 * x is the variable.
 * an is the coefficient of the nth term in the series.
 * m is the increment applied to the power for each term.

$$\text {e}^{x}=\sum_{n=0}^{\infty }\frac{x^n}{n!}=1+\frac{x}{1!}+\frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x^4}{4!}+...$$
 * For example, the series expansion of ex is a common power series, with the formula:


 * To find the (approximate) value of ex, we could use SERIESSUM and set the arguments as follows:
 * Set X to the power of e that you require.
 * Set N to 0 (the first term in the series is a constant).
 * Set M to 1 (the power of x is incremented by 1 at each term in the series).
 * Set Coefficients to the values 1, $$\frac{1}{1!}$$, $$\frac{1}{2!}$$, $$\frac{1}{3!}$$, and $$\frac{1}{4!}$$. Using five coefficients will cause SERIESSUM to calculate the first five terms of the power series.
 * See the section below for more examples of this power series.

$$\text{sin}(x)=\sum_{n=0}^{\infty }(-1)^n \frac{x^{2n+1}}{(2n+1)!}=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}+...$$
 * Another example of a common power series is that for the trigonometric sine, with the formula:


 * To find the (approximate) value of sin(x), we could use SERIESSUM and set the arguments as follows:
 * Set X to the angle in radians for which you wish to calculate the sine.
 * Set N to 1 (the first term in the series is an x1 term).
 * Set M to 2 (the power of x is incremented by 2 at each term in the series).
 * Set Coefficients to the values 1, $$-\frac{1}{3!}$$, $$\frac{1}{5!}$$, and $$-\frac{1}{7!}$$. Using four coefficients will cause SERIESSUM to calculate the first four terms of the power series.
 * See the section below for more examples of this power series.

Calculate approximate value of ex
Using the description of the ex power series given above, set up data in your spreadsheet in accordance with the following table.

Calculate approximate value of sin(x)
Using the description of the sin(x) power series given above, set up data in your spreadsheet in accordance with the following table.

Related LibreOffice functions:
None.

ODF standard:
Section 6.16.53, part 2

Equivalent Excel functions:
SERIESSUM