Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > by-pkgid > 8d125f3514d54b70bf040165a2f5d2e4 > files > 332

maxima-5.6-1mdk.i586.rpm

<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.52
     from maxima.texi on 25 April 2001 -->

<TITLE>Maxima Manual - Series</TITLE>
<link href="maxima_30.html" rel=Next>
<link href="maxima_28.html" rel=Previous>
<link href="maxima_toc.html" rel=ToC>

</HEAD>
<BODY>
<p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_28.html">previous</A>, <A HREF="maxima_30.html">next</A>, <A HREF="maxima_41.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC91" HREF="maxima_toc.html#TOC91">Series</A></H1>



<H2><A NAME="SEC92" HREF="maxima_toc.html#TOC92">Introduction to Series</A></H2>
<P>
Maxima contains functions <CODE>Taylor</CODE> and <CODE>Powerseries</CODE> for finding the 
series of differentiable functions.   It also has tools such as <CODE>Nusum</CODE>
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.


<H2><A NAME="SEC93" HREF="maxima_toc.html#TOC93">Definitions for Series</A></H2>
<P>
<DL>
<DT><U>Variable:</U> <B>CAUCHYSUM</B>
<DD><A NAME="IDX706"></A>
 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)

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>DEFTAYLOR</B> <I>(function, exp)</I>
<DD><A NAME="IDX707"></A>
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).

<PRE>
(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

</PRE>

</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>MAXTAYORDER</B>
<DD><A NAME="IDX708"></A>
 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.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>NICEINDICES</B> <I>(expr)</I>
<DD><A NAME="IDX709"></A>
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.

</P>
</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>NICEINDICESPREF</B>
<DD><A NAME="IDX710"></A>
 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.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>NUSUM</B> <I>(exp,var,low,high)</I>
<DD><A NAME="IDX711"></A>
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.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>PADE</B> <I>(taylor-series,num-deg-bound,denom-deg-bound)</I>
<DD><A NAME="IDX712"></A>
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").

</P>

<PRE>
(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) []
</PRE>

<P>
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.

<PRE>
(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)]

</PRE>

</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>POWERDISP</B>
<DD><A NAME="IDX713"></A>
 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.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>POWERSERIES</B> <I>(exp, var, pt)</I>
<DD><A NAME="IDX714"></A>
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.

<PRE>
(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
                     &#62;     ------------------------------
                    /                I1 (2 I1)!
                    ====
                    I1 = 1
(D2)                -------------------------------------
                                      2

</PRE>

</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>PSEXPAND</B>
<DD><A NAME="IDX715"></A>
 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.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>REVERT</B> <I>(expression,variable)</I>
<DD><A NAME="IDX716"></A>
Does reversion of Taylor Series.
"Variable" is the variable the original Taylor expansion is in.  Do
LOAD(REVERT) to access this function.  Try

</P>

<PRE>
REVERT2(expression,variable,hipower)
</PRE>

<P>
 also.  REVERT only works on
expansions around 0.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>SRRAT</B> <I>(exp)</I>
<DD><A NAME="IDX717"></A>
this command has been renamed to TAYTORAT.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TAYLOR</B> <I>(exp, var, pt, pow)</I>
<DD><A NAME="IDX718"></A>
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.

</P>
</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>TAYLORDEPTH</B>
<DD><A NAME="IDX719"></A>
 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].

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TAYLORINFO</B> <I>(exp)</I>
<DD><A NAME="IDX720"></A>
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,

<PRE>
(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]]

</PRE>

</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TAYLORP</B> <I>(exp)</I>
<DD><A NAME="IDX721"></A>
a predicate function which returns TRUE if and only if
the expression 'exp' is in Taylor series representation.

</P>
</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>TAYLOR_LOGEXPAND</B>
<DD><A NAME="IDX722"></A>
 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.

</P>
</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>TAYLOR_ORDER_COEFFICIENTS</B>
<DD><A NAME="IDX723"></A>
 default: [TRUE] controls the ordering of
coefficients in the expression.  The default (TRUE) is that
coefficients of taylor series will be ordered canonically.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TAYLOR_SIMPLIFIER</B>
<DD><A NAME="IDX724"></A>
 - A function of one argument which TAYLOR uses to
simplify coefficients of power series.

</P>
</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>TAYLOR_TRUNCATE_POLYNOMIALS</B>
<DD><A NAME="IDX725"></A>
 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.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TAYTORAT</B> <I>(exp)</I>
<DD><A NAME="IDX726"></A>
converts exp from TAYLOR form to CRE form, i.e. it is
like RAT(RATDISREP(exp)) although much faster.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>TRUNC</B> <I>(exp)</I>
<DD><A NAME="IDX727"></A>
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.

</P>
</DL>
<P>
<DL>
<DT><U>Function:</U> <B>UNSUM</B> <I>(fun,n)</I>
<DD><A NAME="IDX728"></A>
is the first backward difference fun(n) - fun(n-1).

<PRE>
(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)

</PRE>

</DL>
<P>
<DL>
<DT><U>Variable:</U> <B>VERBOSE</B>
<DD><A NAME="IDX729"></A>
 default: [FALSE] - if TRUE will cause comments about the
progress of POWERSERIES to be printed as the execution of it proceeds.

</P>
</DL>

<P><HR><P>
<p>Go to the <A HREF="maxima_1.html">first</A>, <A HREF="maxima_28.html">previous</A>, <A HREF="maxima_30.html">next</A>, <A HREF="maxima_41.html">last</A> section, <A HREF="maxima_toc.html">table of contents</A>.
</BODY>
</HTML>