asympt -- compute an asymptotic
series expansion
Introductionasympt(f, x) computes the first terms of
an asymptotic series expansion of f with respect to the
variable x around the point infinity.
Call(s)asympt(f, x)
asympt(f, x <= x0> <, order> <,
dir>)
Parametersf |
- | an arithmetical expression
representing a function in x |
x |
- | an identifier |
x0 |
- | the expansion point: an arithmetical expression; if
not specified, the default expansion point infinity is
used |
order |
- | the number of terms to be computed: a nonnegative
integer; the default order is given by the environment variable
ORDER (default value
6) |
Optionsdir |
- | either Left or Right. 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. |
Returnsan object of domain type Series::gseries, or an expression of
type "asympt".
Side
EffectsThe function is sensitive to the environment variable ORDER, which determines the default
number of terms in series computations.
f
Related
Functionslimit, O, ORDER, series, Series::gseries, taylor, Type::Series
Detailsasympt is used to compute an asymptotic expansion of
f when x tends to infinity. If such an
expansion can be computed, a series object of domain type Series::gseries is returned.
You can compute a directional series expansion at any real expansion
point x0. In this case, however, it is recommended to use
the faster function series instead.
In contrast to the default behavior of series, asympt computes
directional expansions that may be valid only along the real line.
asympt cannot compute an asymptotic expansion, then
a symbolic expression of type "asympt" is returned. Cf.
example 4.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, i.e.,
``order'' has to be regarded as a ``relative truncation
order''.
The actual number of terms in the resulting series
expansion may differ from the requested number of terms. See series for details.
asympt returns an object of domain type
Series::gseries. 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; nthterm returns the
n-th term and nthmonomial returns the
n-th monomial.
Example
1We compute an asymptotic expansion for x -> infinity:
>> s := asympt(sin(1/x + exp(-x)) - sin(1/x), x)
exp(-x) exp(-x) / exp(-x) \
exp(-x) - ------- + ------- + O| ------- |
2 4 | 6 |
2 x 24 x \ x /
The leading term and the third term are extracted:
>> lmonomial(s), nthterm(s, 3)
exp(-x)
exp(-x), -------
4
x
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
)
exp(-exp(x)) / exp(-exp(x)) \
exp(-exp(x)) + ------------ + O| ------------ |
x | 2 |
\ x /
>> delete s:
Example
2We 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)
2 3 4 5 6 7
x - x + x - x + x - x + O(x )
A different expansion is valid ``to the left'' of the expansion point:
>> asympt(abs(x)/(1 + x), x = 0, Left)
2 3 4 5 6 7
- x + x - x + x - x + x + O(- x )
Example
3The following expansion is exact. Therefore, it has no ``error term'':
>> asympt(x/exp(x), x = -infinity)
x exp(-x)
Example
4Here is an example where asympt cannot
compute an asymptotic series expansion:
>> asympt(cos(x*s)/s, x = infinity)
/ cos(s x) \
asympt| --------, x = infinity |
\ s /
asympt are now of domain type
Series::gseries.asympt now returns a symbolic expression of type
"asympt" if no generalized series expansion can be
computed.