series - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


series

generalized series expansion

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

series(expr, eqn)

series(expr, eqn, n)

Parameters

expr

-

expression

eqn

-

equation (such as x = a) or name (such as x)

n

-

(optional) non-negative integer

oterm

-

(optional) truefalse

Description

• 

The series function computes a truncated series expansion of expr, with respect to the variable x, about the point a, up to order n. If a is infinity then an asymptotic expansion is given.

• 

If eqn evaluates to a name x then the equation x=0 is assumed.

• 

If the third argument n is present then it specifies the "truncation order" of the series calculations. This does not mean the truncation order of the actual series.  See Order for more information about this. If n is not present, the "truncation order" is determined by the global variable Order. The user may assign any non-negative integer to Order.  The default value of Order is 6.  See Order for more information.

• 

If the series is not exact then an "order term" (for example, Ox6 ) is the last term in the series.

• 

It is possible to invoke series on user-defined functions. For example, if the procedure `series/f` is defined then the function call series(f(x,y),x)  will invoke `series/f`(x,y,x)  to compute the series. Note that this user-defined function `series/f` must return a series data structure, not just a polynomial (see type/series).

• 

If series is applied to an unevaluated integral then the series expansion of the integral will be computed (if possible).

• 

Whenever the series algorithm needs to check whether the leading coefficient of an intermediate result is actually 0, it calls the procedure defined by the environment variable Testzero. By default, this procedure is defined in terms of Normalizer, which is also used by series for simplifying coefficients. Again by default, Normalizer is equal to the Maple function normal, which is powerful enough to recognize equality of expressions representing (multivariate) polynomials with rational number coefficients. If a more powerful simplifier or zero tester is needed, you can redefine either Normalizer or Testzero accordingly. For example, if expr or eqn contain RootOf expressions, you may want to define Normalizer := evala before calling series, and similarly Normalizer := radnormal for radical expressions.

• 

The result of the series function is a generalized series expansion. This could be a Taylor series or a Laurent series or a more general series. Formally, the coefficients in a "generalized series" are such that

k1xaϵ<coeffi<k2xaϵ

  

for some constants k1 and k2, for any 0<ϵ as x approaches a. In other words, the coefficients may depend on x but their growth must be less than the polynomial in x. The order term may also hide such a coefficient, rather than an arbitrary constant. E.g., series considers x2lnx to be Ox2.

• 

If a=infinity or a=-infinity, respectively, then the series expansion is only guaranteed to be valid for positive real x or negative real x, respectively. Use the substitution x=1x and then call series with a=0 to get an expansion that is valid around the North pole of the Riemann sphere.

• 

Usually, the result of the series function is represented in the form of a series data structure. For an explanation of the data structure, see the type/series help page. However, the result of the series function will be represented in ordinary sum-of-products form, rather than in a series data structure, if it is a generalized series requiring fractional exponents, or if it is a series at ±.

• 

series implements a caching mechanism (see also option remember), so that when the same series is requested a second time but with a lower order, instead of recomputing it the terms from the cache are used.

• 

If the optional argument oterm=false is given, then convert(result,polynom) is applied before returning.

Examples

seriesx1xx2&comma;x=0

x+x2+2x3+3x4+5x5+Ox6

(1)

If the second argument is x then the equation x=0 is assumed.

seriesx1xx2&comma;x

x+x2+2x3+3x4+5x5+Ox6

(2)

convert&comma;polynom

5x5+3x4+2x3+x2+x

(3)

You can alternatively return the series converted into a polynomial using the oterm option:

seriesx1xx2&comma;x&comma;oterm=false

5x5+3x4+2x3+x2+x

(4)

The third argument specifies the "truncation order" of the series calculations.

seriesx+1x&comma;x=1&comma;3

2+x12+Ox13

(5)

seriesexpx&comma;x=0&comma;8

1+x+12x2+16x3+124x4+1120x5+1720x6+15040x7+Ox8

(6)

seriesexpxx&comma;x=0&comma;8

x−1+1+12x+16x2+124x3+1120x4+1720x5+15040x6+Ox7

(7)

seriesΓx&comma;x=0&comma;2

x−1γ+π212+γ22x+Ox2

(8)

The truncation order may be lower than expected if cancellation happens.

series1expx1x&comma;x&comma;6

2x−223x−1+118+1270x+Ox2

(9)

series1expx1x&comma;x&comma;10

2x−223x−1+118+1270x13240x2113608x312041200x4+1874800x5+Ox6

(10)

The caching mechanism is used when series is called again with the original truncation order, leading to a more accurate result than before.

series1expx1x&comma;x&comma;6

2x−223x−1+118+1270x13240x2113608x312041200x4+1874800x5+Ox6

(11)

The cache can be cleared by means of the command forget.

forgetseries&colon;

series1expx1x&comma;x&comma;6

2x−223x−1+118+1270x+Ox2

(12)

intexpx3&comma;x

−1232x−113π33Γ23x313x−113Γ13&comma;x3x3133

(13)

series&comma;x=0

x+14x4+Ox7

(14)

pseriesxx&comma;x=0&comma;3

p1+lnxx+12lnx2x2+Ox3

(15)

typep&comma;series

true

(16)

The result of the series function will be represented in ordinary sum-of-products form, rather than in a series data structure, if it is a generalized series requiring fractional exponents.

sseriessqrtsinx&comma;x=0&comma;4

sxx5212+Ox92

(17)

types&comma;series

false

(18)

whattypes

`+`

(19)

The same holds for expansions at ±.

tseriesx3x4+4x5&comma;x=

t1x4x4+5x5+O1x7

(20)

whattypet

`+`

(21)

An example with algebraic number coefficients. By default, series returns a result with a division by an unrecognized zero in the leading term:

px3+x+1

px3+x+1

(22)

aliasα=RootOfp&colon;

series1p&comma;x=α&comma;2

1α3+α+13α2+1α3+α+12xα+Oxα2

(23)

Defining Normalizer appropriately helps. Note that we also need to clear the cache of series first.

Normalizerevala&colon;

series1p&comma;x=α&comma;2

1α3+α+13α2+1α3+α+12xα+Oxα2

(24)

forgetseries

series1p&comma;x=α&comma;2

13α2+1xα−1+Oxα0

(25)

Compatibility

• 

The series command was updated in Maple 2016; see Advanced Math.

• 

The series command was updated in Maple 2024.

• 

The oterm option was introduced in Maple 2024.

• 

For more information on Maple 2024 changes, see Updates in Maple 2024.

See Also

asympt

coeftayl

convert

convert/FormalPowerSeries

convert/polynom

convert/Sum

initialfunctions

Normalizer

Order

powseries

series/leadterm

taylor

type/laurent

type/series

type/taylor