Compute an asymptotic series expansion
This functionality does not run in MATLAB.
asympt(f, x) asympt(f, x, <order>, <dir>) asympt(f, x = x0, <order>, <Left | Right>)
asympt(f, x) computes the first terms of an asymptotic series expansion of f with respect to the variable x around the point infinity.
In contrast to the default behavior of series, asympt computes directed expansions that may be valid along the real line only.
If x0 is a regular point of f, a pole, or an algebraic branch point, then asympt returns a Puiseux expansion. In this case it is recommended to use the faster function series instead.
If asympt cannot compute an asymptotic expansion, then a symbolic expression of type "asympt" is returned. Cf. Example 4.
The number of requested terms for the expansion is order if specified. Otherwise, the value of the environment variable ORDER is used. You can change the default value 6 by assigning a new value to ORDER.
The number of terms is counted from the lowest degree term on for finite expansion points, and from the highest degree term on for expansions around infinity, i.e., "order" has to be regarded as a "relative truncation order".
Note: The actual number of terms in the resulting series expansion may differ from the requested number of terms. See series for details.
The function asympt returns an object of domain type Series::gseries or Series::Puiseux. It can be manipulated via the standard arithmetic operations and various system functions. For example, coeff returns the coefficients; expr converts the series to an expression, removing the error term; lmonomial returns the leading monomial; lterm returns the leading term; lcoeff returns the leading coefficient; map applies a function to the coefficients; nthcoeff returns the n-th coefficient, nthterm the n-th term, and nthmonomial the n-th monomial.
The function is sensitive to the environment variable ORDER, which determines the default number of terms in series computations.
We compute an asymptotic expansion for :
s := asympt(sin(1/x + exp(-x)) - sin(1/x), x)
The leading term and the third term are extracted:
lmonomial(s), nthterm(s, 3)
In the following call, only 2 terms of the expansion are requested:
asympt( exp(sin(1/x + exp(-exp(x)))) - exp(sin(1/x)), x, 2 )
We compute a expansion around a finite real point. By default, the expansion is valid "to the right" of the expansion point:
asympt(abs(x/(1+x)), x = 0)
A different expansion is valid "to the left" of the expansion point:
asympt(abs(x)/(1 + x), x = 0, Left)
The following expansion is exact. Therefore, it has no "error term":
asympt(exp(x), x = infinity)
Here is an example where asympt cannot compute an asymptotic series expansion:
asympt(cos(x*s)/s, x = infinity)
If we apply the function series to the following expression, it essentially returns the expression itself:
series((ln(ln(x)+ln(ln(x))) - ln(ln(x))) / ln(ln(x)+ln(ln(ln(x))))*ln(x), x = infinity)
In this example, asympt computes a more detailed series expansion:
asympt((ln(ln(x)+ln(ln(x))) - ln(ln(x))) / ln(ln(x)+ln(ln(ln(x))))*ln(x), x = infinity)
An arithmetical expression representing a function in x
The expansion point: an arithmetical expression; if not specified, the default expansion point infinity is used
The number of terms to be computed: a nonnegative integer; the default order is given by the environment variable ORDER (default value 6)
With Left, the expansion is valid for real x < x0; with Right, it is valid for x > x0. For finite expansion points x0, the default is Right.