@menu
* Introduction to Series::
* Definitions for Series::
@end menu
@node Introduction to Series, Definitions for Series, Series, Series
@section Introduction to Series
Maxima contains functions @code{Taylor} and @code{Powerseries} for finding the
series of differentiable functions. It also has tools such as @code{Nusum}
capable of finding the closed form of some series. Operations such as addition and multiplication work as usual on series. This section presents the various global various variables which control the expansion.
@c end concepts Series
@node Definitions for Series, , Introduction to Series, Series
@section Definitions for Series
@c @node CAUCHYSUM
@c @unnumberedsec phony
@defvar CAUCHYSUM
default: [FALSE] - When multiplying together sums with INF
as their upper limit, if SUMEXPAND is TRUE and CAUCHYSUM is set to
TRUE then the Cauchy product will be used rather than the usual
product. In the Cauchy product the index of the inner summation is a
function of the index of the outer one rather than varying
independently. That is: SUM(F(I),I,0,INF)*SUM(G(J),J,0,INF) becomes
SUM(SUM(F(I)*G(J-I),I,0,J),J,0,INF)
@end defvar
@c @node DEFTAYLOR
@c @unnumberedsec phony
@defun DEFTAYLOR (function, exp)
allows the user to define the Taylor series
(about 0) of an arbitrary function of one variable as exp which may be
a polynomial in that variable or which may be given implicitly as a
power series using the SUM function.
In order to display the information given to DEFTAYLOR one can use
POWERSERIES(F(X),X,0). (see below).
@example
(C1) DEFTAYLOR(F(X),X**2+SUM(X**I/(2**I*I!**2),
I,4,INF));
(D1) [F]
(C2) TAYLOR(%E**SQRT(F(X)),X,0,4);
2 3 4
X 3073 X 12817 X
(D2)/R/ 1 + X + -- + ------- + -------- + . . .
2 18432 307200
@end example
@end defun
@c @node MAXTAYORDER
@c @unnumberedsec phony
@defvar MAXTAYORDER
default: [TRUE] - if TRUE, then during algebraic
manipulation of (truncated) Taylor series, TAYLOR will try to retain
as many terms as are certain to be correct.
@end defvar
@c @node NICEINDICES
@c @unnumberedsec phony
@defun NICEINDICES (expr)
will take the expression and change all the
indices of sums and products to something easily understandable. It
makes each index it can "I" , unless "I" is in the internal
expression, in which case it sequentially tries
J,K,L,M,N,I0,I1,I2,I3,I4,... until it finds a legal index.
@end defun
@c @node NICEINDICESPREF
@c @unnumberedsec phony
@defvar NICEINDICESPREF
default: [I,J,K,L,M,N] - the list which NICEINDICES
uses to find indices for sums and products. This allows the user to
set the order of preference of how NICEINDICES finds the "nice
indices". E.g. NICEINDICESPREF:[Q,R,S,T,INDEX]$. Then if
NICEINDICES finds that it cannot use any of these as indices in a
particular summation, it uses the first as a base to try and tack on
numbers. Here, if the list is exhausted, Q0, then Q1, etc, will be
tried.
@end defvar
@c @node NUSUM
@c @unnumberedsec phony
@defun NUSUM (exp,var,low,high)
performs indefinite summation of exp with
respect to var using a decision procedure due to R.W. Gosper. exp and
the potential answer must be expressible as products of nth powers,
factorials, binomials, and rational functions. The terms "definite"
and "indefinite summation" are used analogously to "definite" and
"indefinite integration". To sum indefinitely means to give a closed
form for the sum over intervals of variable length, not just e.g. 0 to
inf. Thus, since there is no formula for the general partial sum of
the binomial series, NUSUM can't do it.
@end defun
@c @node PADE
@c @unnumberedsec phony
@defun PADE (taylor-series,num-deg-bound,denom-deg-bound)
returns a list of
all rational functions which have the given taylor-series expansion
where the sum of the degrees of the numerator and the denominator is
less than or equal to the truncation level of the power series, i.e.
are "best" approximants, and which additionally satisfy the specified
degree bounds. Its first argument must be a univariate taylor-series;
the second and third are positive integers specifying degree bounds on
the numerator and denominator.
PADE's first argument can also be a Laurent series, and the degree
bounds can be INF which causes all rational functions whose total
degree is less than or equal to the length of the power series to be
returned. Total degree is num-degree + denom-degree. Length of a
power series is "truncation level" + 1 - minimum(0,"order of series").
@example
(C15) ff:taylor(1+x+x^2+x^3,x,0,3);
2 3
(D15)/T/ 1 + X + X + X + . . .
(C16) pade(ff,1,1);
1
(D16) [- -----]
X - 1
(c1) ff:taylor(-(83787*X^10-45552*X^9-187296*X^8
+387072*X^7+86016*X^6-1507328*X^5
+1966080*X^4+4194304*X^3-25165824*X^2
+67108864*X-134217728)
/134217728,x,0,10);
(C25) PADE(ff,4,4);
(D25) []
@end example
There is no rational function of degree 4 numerator/denominator, with this
power series expansion. You must in general have degree of the numerator and
degree of the denominator adding up to at least the degree of the power series,
in order to have enough unknown coefficients to solve.
@example
(C26) PADE(ff,5,5);
(D26) [-(520256329*X^5-96719020632*X^4-489651410240*X^3
-1619100813312*X^2 -2176885157888*X-2386516803584)
/(47041365435*X^5+381702613848*X^4+1360678489152*X^3
+2856700692480*X^2
+3370143559680*X+2386516803584)]
@end example
@end defun
@c @node POWERDISP
@c @unnumberedsec phony
@defvar POWERDISP
default: [FALSE] - if TRUE will cause sums to be displayed
with their terms in the reverse order. Thus polynomials would display
as truncated power series, i.e., with the lowest power first.
@end defvar
@c @node POWERSERIES
@c @unnumberedsec phony
@defun POWERSERIES (exp, var, pt)
generates the general form of the power
series expansion for exp in the variable var about the point pt (which
may be INF for infinity). If POWERSERIES is unable to expand exp, the
TAYLOR function may give the first several terms of the series.
VERBOSE[FALSE] - if TRUE will cause comments about the progress of
POWERSERIES to be printed as the execution of it proceeds.
@example
(C1) VERBOSE:TRUE$
(C2) POWERSERIES(LOG(SIN(X)/X),X,0);
Can't expand
LOG(SIN(X))
So we'll try again after applying the rule:
d
/ -- (SIN(X))
[ dX
LOG(SIN(X)) = I ----------- dX
] SIN(X)
/
In the first simplification we have returned:
/
[
I COT(X) dX - LOG(X)
]
/
INF
==== I1 2 I1 2 I1
\ (- 1) 2 BERN(2 I1) X
> ------------------------------
/ I1 (2 I1)!
====
I1 = 1
(D2) -------------------------------------
2
@end example
@end defun
@c @node PSEXPAND
@c @unnumberedsec phony
@defvar PSEXPAND
default: [FALSE] - if TRUE will cause extended rational
function expressions to display fully expanded. (RATEXPAND will also
cause this.) If FALSE, multivariate expressions will be displayed
just as in the rational function package. If PSEXPAND:MULTI, then
terms with the same total degree in the variables are grouped
together.
@end defvar
@c @node REVERT
@c @unnumberedsec phony
@defun REVERT (expression,variable)
Does reversion of Taylor Series.
"Variable" is the variable the original Taylor expansion is in. Do
LOAD(REVERT) to access this function. Try
@example
REVERT2(expression,variable,hipower)
@end example
also. REVERT only works on
expansions around 0.
@end defun
@c @node SRRAT
@c @unnumberedsec phony
@defun SRRAT (exp)
this command has been renamed to TAYTORAT.
@end defun
@c @node TAYLOR
@c @unnumberedsec phony
@defun TAYLOR (exp, var, pt, pow)
expands the expression exp in a truncated
Taylor series (or Laurent series, if required) in the variable var
around the point pt. The terms through (var-pt)**pow are generated.
If exp is of the form f(var)/g(var) and g(var) has no terms up to
degree pow then TAYLOR will try to expand g(var) up to degree 2*pow.
If there are still no non-zero terms TAYLOR will keep doubling the
degree of the expansion of g(var) until reaching pow*2**n where n is
the value of the variable TAYLORDEPTH[3]. If MAXTAYORDER[FALSE] is
set to TRUE, then during algebraic manipulation of (truncated) Taylor
series, TAYLOR will try to retain as many terms as are certain to be
correct. Do EXAMPLE(TAYLOR); for examples.
TAYLOR(exp,[var1,pt1,ord1],[var2,pt2,ord2],...) returns a truncated
power series in the variables vari about the points pti, truncated at
ordi.
PSEXPAND[FALSE] if TRUE will cause extended rational function
expressions to display fully expanded. (RATEXPAND will also cause
this.) If FALSE, multivariate expressions will be displayed just as in
the rational function package. If PSEXPAND:MULTI, then terms with the
same total degree in the variables are grouped together.
TAYLOR(exp, [var1, var2, . . .], pt, ord) where each of pt and ord
may be replaced by a list which will correspond to the list of
variables. that is, the nth items on each of the lists will be
associated together.
TAYLOR(exp, [x,pt,ord,ASYMP]) will give an expansion of exp in
negative powers of (x-pt). The highest order term will be (x-pt)^(-ord).
The ASYMP is a syntactic device and not to be assigned to.
See also the TAYLOR_LOGEXPAND switch for controlling expansion.
@end defun
@c @node TAYLORDEPTH
@c @unnumberedsec phony
@defvar TAYLORDEPTH
default: [3] - If there are still no non-zero terms
TAYLOR will keep doubling the degree of the expansion of g(var) until
reaching pow*2**n where n is the value of the variable TAYLORDEPTH[3].
@end defvar
@c @node TAYLORINFO
@c @unnumberedsec phony
@defun TAYLORINFO (exp)
returns FALSE if exp is not a Taylor series.
Otherwise, a list of lists is returned describing the particulars of
the Taylor expansion. For example,
@example
(C3) TAYLOR((1-Y^2)/(1-X),X,0,3,[Y,A,INF]);
2 2
(D3)/R/ 1 - A - 2 A (Y - A) - (Y - A)
2 2
+ (1 - A - 2 A (Y - A) - (Y - A) ) X
2 2 2
+ (1 - A - 2 A (Y - A) - (Y - A) ) X
2 2 3
+ (1 - A - 2 A (Y - A) - (Y - A) ) X
+ . . .
(C4) TAYLORINFO(D3);
(D4) [[Y, A, INF], [X, 0, 3]]
@end example
@end defun
@c @node TAYLORP
@c @unnumberedsec phony
@defun TAYLORP (exp)
a predicate function which returns TRUE if and only if
the expression 'exp' is in Taylor series representation.
@end defun
@c @node TAYLOR_LOGEXPAND
@c @unnumberedsec phony
@defvar TAYLOR_LOGEXPAND
default: [TRUE] controls expansions of logarithms in
TAYLOR series. When TRUE all log's are expanded fully so that
zero-recognition problems involving logarithmic identities do not
disturb the expansion process. However, this scheme is not always
mathematically correct since it ignores branch information. If
TAYLOR_LOGEXPAND is set to FALSE, then the only expansion of log's
that will occur is that necessary to obtain a formal power series.
@end defvar
@c @node TAYLOR_ORDER_COEFFICIENTS
@c @unnumberedsec phony
@defvar TAYLOR_ORDER_COEFFICIENTS
default: [TRUE] controls the ordering of
coefficients in the expression. The default (TRUE) is that
coefficients of taylor series will be ordered canonically.
@end defvar
@c @node TAYLOR_SIMPLIFIER
@c @unnumberedsec phony
@defun TAYLOR_SIMPLIFIER
- A function of one argument which TAYLOR uses to
simplify coefficients of power series.
@end defun
@c @node TAYLOR_TRUNCATE_POLYNOMIALS
@c @unnumberedsec phony
@defvar TAYLOR_TRUNCATE_POLYNOMIALS
default: [TRUE] When FALSE polynomials
input to TAYLOR are considered to have infinite precison; otherwise
(the default) they are truncated based upon the input truncation
levels.
@end defvar
@c @node TAYTORAT
@c @unnumberedsec phony
@defun TAYTORAT (exp)
converts exp from TAYLOR form to CRE form, i.e. it is
like RAT(RATDISREP(exp)) although much faster.
@end defun
@c @node TRUNC
@c @unnumberedsec phony
@defun TRUNC (exp)
causes exp which is in general representation to be
displayed as if its sums were truncated Taylor series. E.g. compare
EXP1:X^2+X+1; with EXP2:TRUNC(X^2+X+1); . Note that IS(EXP1=EXP2);
gives TRUE.
@end defun
@c @node UNSUM
@c @unnumberedsec phony
@defun UNSUM (fun,n)
is the first backward difference fun(n) - fun(n-1).
@example
(C1) G(P):=P*4^N/BINOMIAL(2*N,N);
N
P 4
(D1) G(P) := ----------------
BINOMIAL(2 N, N)
(C2) G(N^4);
4 N
N 4
(D2) ----------------
BINOMIAL(2 N, N)
(C3) NUSUM(D2,N,0,N);
4 3 2 N
2 (N + 1) (63 N + 112 N + 18 N - 22 N + 3) 4 2
(D3) ------------------------------------------------ - ------
693 BINOMIAL(2 N, N) 3 11 7
(C4) UNSUM(%,N);
4 N
N 4
(D4) ----------------
BINOMIAL(2 N, N)
@end example
@end defun
@c @node VERBOSE
@c @unnumberedsec phony
@defvar VERBOSE
default: [FALSE] - if TRUE will cause comments about the
progress of POWERSERIES to be printed as the execution of it proceeds.
@end defvar