# Documentation/Calc Functions/SERIESSUM

Other languages:
English • ‎Nederlands • ‎dansk • ‎español

SERIESSUM

Mathematical

## Summary:

Calculates the sum of the first terms of an infinite power series of the form:

$\displaystyle{ \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.

• A power series may be represented as:

$\displaystyle{ \text{f}(x)=a_{0}x^{n}+a_{1}x^{n+m}+a_{2}x^{n+2m}+a_{3}x^{n+3m}+... }$

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.
• For example, the series expansion of ex is a common power series, with the formula:

$\displaystyle{ \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!}+... }$

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, $\displaystyle{ \frac{1}{1!} }$, $\displaystyle{ \frac{1}{2!} }$, $\displaystyle{ \frac{1}{3!} }$, and $\displaystyle{ \frac{1}{4!} }$. Using five coefficients will cause SERIESSUM to calculate the first five terms of the power series.
See the #Examples: section below for more examples of this power series.
• Another example of a common power series is that for the trigonometric sine, with the formula:

$\displaystyle{ \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!}+... }$

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, $\displaystyle{ -\frac{1}{3!} }$, $\displaystyle{ \frac{1}{5!} }$, and $\displaystyle{ -\frac{1}{7!} }$. Using four coefficients will cause SERIESSUM to calculate the first four terms of the power series.
See the #Examples: section below for more examples of this power series.

## Examples:

### Basic examples

Formula Description Returns
=SERIESSUM(2; 0; 1; {1; 2; 3}) Here the function calculates $\displaystyle{ 1+2x+3x^2 }$, where x=2. 17
=SERIESSUM(0.5; 1; 2; {1; 1; 1}) Here the function calculates $\displaystyle{ x+x^3+x^5 }$, where x=0.5. 0.65625

### 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.

A B
1 X 1
2 N 0
3 M 1
4 Coefficient[0] 1
5 Coefficient[1] 1
6 Coefficient[2] 0.5
7 Coefficient[3] 0.166666666666667
8 Coefficient[4] 0.041666666666667
Formula Description Returns
=SERIESSUM(B1; B2; B3; B4:B8) where cells B1 to B8 contain the numbers listed above. Here the function calculates an approximate value for e. Using more terms of the power series would give a closer approximation to the actual value (2.7182818284…). 2.70833333333333
=SERIESSUM(0.5; B2; B3; B4:B8) where cells B2 to B8 contain the numbers listed above. Here the function calculates an approximate value for the square root of e. Using more terms of the power series would give a closer approximation to the actual value (1.6487212707…). 1.6484375

### 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.

A B
1 X 1.0471975511966
2 N 1
3 M 2
4 Coefficient[0] 1
5 Coefficient[1] -0.166666666666667
6 Coefficient[2] 0.008333333333333
7 Coefficient[3] -0.000198412698413
Formula Description Returns
=SERIESSUM(B1; B2; B3; B4:B7) where cells B1 to B7 contain the numbers listed above. Here the function calculates an approximate value for sin(π/3). Using more terms of the power series would give a closer approximation to the actual value (0.866025403784439…). 0.866021271656373
=SERIESSUM(0.5; B2; B3; B4:B7) where cells B2 to B7 contain the numbers listed above. Here the function calculates an approximate value for sin(0.5). Using more terms of the power series would give a closer approximation to the actual value (0.479425538604203…). 0.479425533234127

None.

SERIESSUM