generalized series expansion
series(expr, eqn, n)
equation (such as x = a) or name (such as x)
(optional) non-negative integer
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, O⁡x6 ) 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
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 x2⁢ln⁡x to be O⁡x2.
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 second argument is x then the equation x=0 is assumed.
The third argument specifies the "truncation order" of the series calculations.
The truncation order may be lower than expected if cancellation happens.
The caching mechanism is used when series is called again with the original truncation order, leading to a more accurate result than before.
The cache can be cleared by means of the command forget.
p ≔ series⁡xx,x=0,3
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.
s ≔ series⁡sin⁡x,x=0,4
The same holds for expansions at ±∞.
t ≔ series⁡x3x4+4⁢x−5,x=∞
An example with algebraic number coefficients. By default, series returns a result with a division by an unrecognized zero in the leading term:
p ≔ x3+x+1
Defining Normalizer appropriately helps. Note that we also need to clear the cache of series first.
Normalizer ≔ evala:
The series command was updated in Maple 2016; see Advanced Math.
Download Help Document
What kind of issue would you like to report? (Optional)