2 * Functions and Variables for Sums and Products::
3 * Introduction to Series::
4 * Functions and Variables for Series::
5 * Introduction to Fourier series::
6 * Functions and Variables for Fourier series::
7 * Functions and Variables for Poisson series::
10 @c -----------------------------------------------------------------------------
11 @node Functions and Variables for Sums and Products, Introduction to Series, Sums Products and Series, Sums Products and Series
12 @section Functions and Variables for Sums and Products
13 @c -----------------------------------------------------------------------------
15 @c -----------------------------------------------------------------------------
17 @deffn {Function} bashindices (@var{expr})
19 Transforms the expression @var{expr} by giving each summation and product a
20 unique index. This gives @code{changevar} greater precision when it is working
21 with summations or products. The form of the unique index is
22 @code{j@var{number}}. The quantity @var{number} is determined by referring to
23 @code{gensumnum}, which can be changed by the user. For example,
24 @code{gensumnum:0$} resets it.
26 @opencatbox{Categories:}
27 @category{Sums and products}
31 @c -----------------------------------------------------------------------------
33 @deffn {Function} lsum (@var{expr}, @var{x}, @var{L})
35 Represents the sum of @var{expr} for each element @var{x} in @var{L}.
36 A noun form @code{'lsum} is returned if the argument @var{L} does not evaluate
42 @c lsum (x^i, i, [1, 2, 7]);
43 @c lsum (i^2, i, rootsof (x^3 - 1, x));
46 (%i1) lsum (x^i, i, [1, 2, 7]);
49 (%i2) lsum (i^2, i, rootsof (x^3 - 1, x));
57 i in rootsof(x - 1, x)
61 @opencatbox{Categories:}
62 @category{Sums and products}
66 @c NEEDS CLARIFICATION, EXAMPLES
68 @c -----------------------------------------------------------------------------
70 @deffn {Function} intosum (@var{expr})
72 Moves multiplicative factors outside a summation to inside.
73 If the index is used in the
74 outside expression, then the function tries to find a reasonable
75 index, the same as it does for @code{sumcontract}. This is essentially the
76 reverse idea of the @code{outative} property of summations, but note that it
77 does not remove this property, it only bypasses it.
79 @c WHAT ARE THESE CASES ??
80 In some cases, a @code{scanmap (multthru, @var{expr})} may be necessary before
83 @opencatbox{Categories:}
84 @category{Expressions}
88 @c -----------------------------------------------------------------------------
90 @defvr {Option variable} simpproduct
91 Default value: @code{false}
93 When @code{simpproduct} is @code{true}, the result of a @code{product} is simplified.
94 This simplification may sometimes be able to produce a closed form. If
95 @code{simpproduct} is @code{false} or if the quoted form @code{'product} is used, the
96 value is a product noun form which is a representation of the pi notation used
99 @opencatbox{Categories:}
100 @category{Sums and products}
101 @category{Simplification flags and variables}
105 @c -----------------------------------------------------------------------------
107 @deffn {Function} product (@var{expr}, @var{i}, @var{i_0}, @var{i_1})
109 Represents a product of the values of @var{expr} as
110 the index @var{i} varies from @var{i_0} to @var{i_1}.
111 The noun form @code{'product} is displayed as an uppercase letter pi.
113 @code{product} evaluates @var{expr} and lower and upper limits @var{i_0} and
114 @var{i_1}, @code{product} quotes (does not evaluate) the index @var{i}.
116 If the upper and lower limits differ by an integer,
117 @var{expr} is evaluated for each value of the index @var{i},
118 and the result is an explicit product.
120 Otherwise, the range of the index is indefinite.
121 Some rules are applied to simplify the product.
122 When the global variable @code{simpproduct} is @code{true}, additional rules
123 are applied. In some cases, simplification yields a result which is not a
124 product; otherwise, the result is a noun form @code{'product}.
126 See also @mref{nouns} and @mrefdot{evflag}
131 @c product (x + i*(i+1)/2, i, 1, 4);
132 @c product (i^2, i, 1, 7);
133 @c product (a[i], i, 1, 7);
134 @c product (a(i), i, 1, 7);
135 @c product (a(i), i, 1, n);
136 @c product (k, k, 1, n);
137 @c product (k, k, 1, n), simpproduct;
138 @c product (integrate (x^k, x, 0, 1), k, 1, n);
139 @c product (if k <= 5 then a^k else b^k, k, 1, 10);
143 (%i1) product (x + i*(i+1)/2, i, 1, 4);
144 (%o1) (x + 1) (x + 3) (x + 6) (x + 10)
145 (%i2) product (i^2, i, 1, 7);
147 (%i3) product (a[i], i, 1, 7);
150 (%i4) product (a(i), i, 1, 7);
151 (%o4) a(1) a(2) a(3) a(4) a(5) a(6) a(7)
152 (%i5) product (a(i), i, 1, n);
159 (%i6) product (k, k, 1, n);
166 (%i7) product (k, k, 1, n), simpproduct;
168 (%i8) product (integrate (x^k, x, 0, 1), k, 1, n);
175 (%i9) product (if k <= 5 then a^k else b^k, k, 1, 10);
180 @opencatbox{Categories:}
181 @category{Sums and products}
185 @c NEEDS CLARIFICATION, EXAMPLES
187 @c -----------------------------------------------------------------------------
189 @defvr {Option variable} simpsum
190 Default value: @code{false}
192 When @code{simpsum} is @code{true}, the result of a @code{sum} is simplified.
193 This simplification may sometimes be able to produce a closed form. If
194 @code{simpsum} is @code{false} or if the quoted form @code{'sum} is used, the
195 value is a sum noun form which is a representation of the sigma notation used
198 @opencatbox{Categories:}
199 @category{Sums and products}
200 @category{Simplification flags and variables}
204 @c -----------------------------------------------------------------------------
206 @deffn {Function} sum (@var{expr}, @var{i}, @var{i_0}, @var{i_1})
208 Represents a summation of the values of @var{expr} as
209 the index @var{i} varies from @var{i_0} to @var{i_1}.
210 The noun form @code{'sum} is displayed as an uppercase letter sigma.
212 @code{sum} evaluates its summand @var{expr} and lower and upper limits @var{i_0}
213 and @var{i_1}, @code{sum} quotes (does not evaluate) the index @var{i}.
215 If the upper and lower limits differ by an integer, the summand @var{expr} is
216 evaluated for each value of the summation index @var{i}, and the result is an
219 Otherwise, the range of the index is indefinite.
220 Some rules are applied to simplify the summation.
221 When the global variable @code{simpsum} is @code{true}, additional rules are
222 applied. In some cases, simplification yields a result which is not a
223 summation; otherwise, the result is a noun form @code{'sum}.
225 When the @code{evflag} (evaluation flag) @code{cauchysum} is @code{true},
226 a product of summations is expressed as a Cauchy product,
227 in which the index of the inner summation is a function of the
228 index of the outer one, rather than varying independently.
230 The global variable @code{genindex} is the alphabetic prefix used to generate
231 the next index of summation, when an automatically generated index is needed.
233 @code{gensumnum} is the numeric suffix used to generate the next index of
234 summation, when an automatically generated index is needed.
235 When @code{gensumnum} is @code{false}, an automatically-generated index is only
236 @code{genindex} with no numeric suffix.
238 See also @mrefcomma{lsum} @mrefcomma{sumcontract} @mrefcomma{intosum}
239 @mrefcomma{bashindices} @mrefcomma{niceindices}
240 @mrefcomma{nouns} @mrefcomma{evflag} and @ref{Package zeilberger}
245 @c sum (i^2, i, 1, 7);
246 @c sum (a[i], i, 1, 7);
247 @c sum (a(i), i, 1, 7);
248 @c sum (a(i), i, 1, n);
249 @c sum (2^i + i^2, i, 0, n);
250 @c sum (2^i + i^2, i, 0, n), simpsum;
251 @c sum (1/3^i, i, 1, inf);
252 @c sum (1/3^i, i, 1, inf), simpsum;
253 @c sum (i^2, i, 1, 4) * sum (1/i^2, i, 1, inf);
254 @c sum (i^2, i, 1, 4) * sum (1/i^2, i, 1, inf), simpsum;
255 @c sum (integrate (x^k, x, 0, 1), k, 1, n);
256 @c sum (if k <= 5 then a^k else b^k, k, 1, 10);
260 (%i1) sum (i^2, i, 1, 7);
262 (%i2) sum (a[i], i, 1, 7);
263 (%o2) a + a + a + a + a + a + a
265 (%i3) sum (a(i), i, 1, 7);
266 (%o3) a(7) + a(6) + a(5) + a(4) + a(3) + a(2) + a(1)
267 (%i4) sum (a(i), i, 1, n);
275 (%i5) sum (2^i + i^2, i, 0, n);
283 (%i6) sum (2^i + i^2, i, 0, n), simpsum;
286 (%o6) 2 + --------------- - 1
288 (%i7) sum (1/3^i, i, 1, inf);
296 (%i8) sum (1/3^i, i, 1, inf), simpsum;
300 (%i9) sum (i^2, i, 1, 4) * sum (1/i^2, i, 1, inf);
308 (%i10) sum (i^2, i, 1, 4) * sum (1/i^2, i, 1, inf), simpsum;
311 (%i11) sum (integrate (x^k, x, 0, 1), k, 1, n);
319 (%i12) sum (if k <= 5 then a^k else b^k, k, 1, 10);
321 (%o12) b + b + b + b + b + a + a + a + a + a
324 @opencatbox{Categories:}
325 @category{Sums and products}
329 @c NEEDS CLARIFICATION, EXAMPLES
331 @c -----------------------------------------------------------------------------
333 @deffn {Function} sumcontract (@var{expr})
335 Combines all sums of an addition that have
336 upper and lower bounds that differ by constants. The result is an
337 expression containing one summation for each set of such summations
338 added to all appropriate extra terms that had to be extracted to form
339 this sum. @code{sumcontract} combines all compatible sums and uses one of
340 the indices from one of the sums if it can, and then try to form a
341 reasonable index if it cannot use any supplied.
343 @c WHEN IS intosum NECESSARY BEFORE sumcontract ??
344 It may be necessary to do an @code{intosum (@var{expr})} before the
347 @opencatbox{Categories:}
348 @category{Sums and products}
352 @c -----------------------------------------------------------------------------
354 @defvr {Option variable} sumexpand
355 Default value: @code{false}
357 When @code{sumexpand} is @code{true}, products of sums and
358 exponentiated sums simplify to nested sums.
360 See also @mrefdot{cauchysum}
365 (%i1) sumexpand: true$
366 (%i2) sum (f (i), i, 0, m) * sum (g (j), j, 0, n);
371 (%o2) > > f(i1) g(i2)
376 (%i3) sum (f (i), i, 0, m)^2;
380 (%o3) > > f(i3) f(i4)
386 @opencatbox{Categories:}
387 @category{Sums and products}
388 @category{Simplification flags and variables}
392 @c -----------------------------------------------------------------------------
393 @node Introduction to Series, Functions and Variables for Series, Functions and Variables for Sums and Products, Sums Products and Series
394 @section Introduction to Series
395 @c -----------------------------------------------------------------------------
397 Maxima contains functions @code{taylor} and @code{powerseries} for finding the
398 series of differentiable functions. It also has tools such as @code{nusum}
399 capable of finding the closed form of some series. Operations such as addition
400 and multiplication work as usual on series. This section presents the global
401 variables which control the expansion.
403 @c end concepts Series
405 @c -----------------------------------------------------------------------------
406 @node Functions and Variables for Series, Introduction to Fourier series, Introduction to Series, Sums Products and Series
407 @section Functions and Variables for Series
408 @c -----------------------------------------------------------------------------
410 @c -----------------------------------------------------------------------------
412 @defvr {Option variable} cauchysum
413 Default value: @code{false}
416 When multiplying together sums with @code{inf} as their upper limit,
417 if @code{sumexpand} is @code{true} and @code{cauchysum} is @code{true}
418 then the Cauchy product will be used rather than the usual
420 In the Cauchy product the index of the inner summation is a
421 function of the index of the outer one rather than varying
429 @c s: sum (f(i), i, 0, inf) * sum (g(j), j, 0, inf);
435 (%i1) sumexpand: false$
436 (%i2) cauchysum: false$
438 (%i3) s: sum (f(i), i, 0, inf) * sum (g(j), j, 0, inf);
442 (%o3) ( > f(i)) > g(j)
447 (%i4) sumexpand: true$
448 (%i5) cauchysum: true$
454 (%o6) > > g(i1 - i2) f(i2)
461 @opencatbox{Categories:}
462 @category{Sums and products}
466 @c -----------------------------------------------------------------------------
468 @deffn {Function} deftaylor (@var{f_1}(@var{x_1}), @var{expr_1}, @dots{}, @var{f_n}(@var{x_n}), @var{expr_n})
470 For each function @var{f_i} of one variable @var{x_i},
471 @code{deftaylor} defines @var{expr_i} as the Taylor series about zero.
472 @var{expr_i} is typically a polynomial in @var{x_i} or a summation;
473 more general expressions are accepted by @code{deftaylor} without complaint.
475 @code{powerseries (@var{f_i}(@var{x_i}), @var{x_i}, 0)}
476 returns the series defined by @code{deftaylor}.
478 @code{deftaylor} returns a list of the functions @var{f_1}, @dots{}, @var{f_n}.
479 @code{deftaylor} evaluates its arguments.
484 (%i1) deftaylor (f(x), x^2 + sum(x^i/(2^i*i!^2), i, 4, inf));
486 (%i2) powerseries (f(x), x, 0);
494 (%i3) taylor (exp (sqrt (f(x))), x, 0, 4);
497 (%o3)/T/ 1 + x + -- + ------- + -------- + . . .
501 @opencatbox{Categories:}
502 @category{Power series}
506 @c -----------------------------------------------------------------------------
508 @defvr {Option variable} maxtayorder
509 Default value: @code{true}
512 When @code{maxtayorder} is @code{true}, then during algebraic
513 manipulation of (truncated) Taylor series, @code{taylor} tries to retain
514 as many terms as are known to be correct.
516 @opencatbox{Categories:}
517 @category{Power series}
521 @c -----------------------------------------------------------------------------
523 @deffn {Function} niceindices (@var{expr})
525 Renames the indices of sums and products in @var{expr}. @code{niceindices}
526 attempts to rename each index to the value of @code{niceindicespref[1]}, unless
527 that name appears in the summand or multiplicand, in which case
528 @code{niceindices} tries the succeeding elements of @code{niceindicespref} in
529 turn, until an unused variable is found. If the entire list is exhausted,
530 additional indices are constructed by appending integers to the value of
531 @code{niceindicespref[1]}, e.g., @code{i0}, @code{i1}, @code{i2}, @dots{}
533 @code{niceindices} returns an expression.
534 @code{niceindices} evaluates its argument.
539 (%i1) niceindicespref;
540 (%o1) [i, j, k, l, m, n]
541 (%i2) product (sum (f (foo + i*j*bar), foo, 1, inf), bar, 1, inf);
545 (%o2) ! ! > f(bar i j + foo)
549 (%i3) niceindices (%);
554 (%o3) ! ! > f(i j l + k)
561 @opencatbox{Categories:}
562 @category{Sums and products}
566 @c -----------------------------------------------------------------------------
567 @anchor{niceindicespref}
568 @defvr {Option variable} niceindicespref
569 Default value: @code{[i, j, k, l, m, n]}
571 @code{niceindicespref} is the list from which @code{niceindices}
572 takes the names of indices for sums and products.
574 The elements of @code{niceindicespref} are must be names of simple variables.
579 (%i1) niceindicespref: [p, q, r, s, t, u]$
580 (%i2) product (sum (f (foo + i*j*bar), foo, 1, inf), bar, 1, inf);
584 (%o2) ! ! > f(bar i j + foo)
588 (%i3) niceindices (%);
592 (%o3) ! ! > f(i j q + p)
598 @opencatbox{Categories:}
599 @category{Sums and products}
603 @c -----------------------------------------------------------------------------
605 @deffn {Function} nusum (@var{expr}, @var{x}, @var{i_0}, @var{i_1})
607 Carries out indefinite hypergeometric summation of @var{expr} with
608 respect to @var{x} using a decision procedure due to R.W. Gosper.
609 @var{expr} and the result must be expressible as products of integer powers,
610 factorials, binomials, and rational functions.
612 @c UMM, DO WE REALLY NEED TO DEFINE "DEFINITE" AND "INDEFINITE" SUMMATION HERE ??
613 @c (CAN'T WE MAKE THE POINT WITHOUT DRAGGING IN SOME NONSTANDARD TERMINOLOGY ??)
615 and "indefinite summation" are used analogously to "definite" and
616 "indefinite integration".
617 To sum indefinitely means to give a symbolic result
618 for the sum over intervals of variable length, not just e.g. 0 to
619 inf. Thus, since there is no formula for the general partial sum of
620 the binomial series, @code{nusum} can't do it.
622 @code{nusum} and @code{unsum} know a little about sums and differences of
623 finite products. See also @mrefdot{unsum}
628 (%i1) nusum (n*n!, n, 0, n);
630 Dependent equations eliminated: (1)
632 (%i2) nusum (n^4*4^n/binomial(2*n,n), n, 0, n);
634 2 (n + 1) (63 n + 112 n + 18 n - 22 n + 3) 4 2
635 (%o2) ------------------------------------------------ - ------
636 693 binomial(2 n, n) 3 11 7
640 (%o3) ----------------
642 (%i4) unsum (prod (i^2, i, 1, n), n);
646 (%o4) ( ! ! i ) (n - 1) (n + 1)
649 (%i5) nusum (%, n, 1, n);
651 Dependent equations eliminated: (2 3)
660 @opencatbox{Categories:}
661 @category{Sums and products}
665 @c THIS ITEM NEEDS SERIOUS WORK
667 @c -----------------------------------------------------------------------------
669 @deffn {Function} pade (@var{taylor_series}, @var{numer_deg_bound}, @var{denom_deg_bound})
672 all rational functions which have the given Taylor series expansion
673 where the sum of the degrees of the numerator and the denominator is
674 less than or equal to the truncation level of the power series, i.e.
675 are "best" approximants, and which additionally satisfy the specified
678 @var{taylor_series} is an univariate Taylor series.
679 @var{numer_deg_bound} and @var{denom_deg_bound}
680 are positive integers specifying degree bounds on
681 the numerator and denominator.
683 @var{taylor_series} can also be a Laurent series, and the degree
684 bounds can be @code{inf} which causes all rational functions whose total
685 degree is less than or equal to the length of the power series to be
686 returned. Total degree is defined as @code{@var{numer_deg_bound} +
687 @var{denom_deg_bound}}.
688 Length of a power series is defined as
689 @code{"truncation level" + 1 - min(0, "order of series")}.
692 (%i1) taylor (1 + x + x^2 + x^3, x, 0, 3);
694 (%o1)/T/ 1 + x + x + x + . . .
695 (%i2) pade (%, 1, 1);
699 (%i3) t: taylor(-(83787*x^10 - 45552*x^9 - 187296*x^8
700 + 387072*x^7 + 86016*x^6 - 1507328*x^5
701 + 1966080*x^4 + 4194304*x^3 - 25165824*x^2
702 + 67108864*x - 134217728)
703 /134217728, x, 0, 10);
705 x 3 x x 15 x 23 x 21 x 189 x
706 (%o3)/T/ 1 - - + ---- - -- - ----- + ----- - ----- - ------
707 2 16 32 1024 2048 32768 65536
710 5853 x 2847 x 83787 x
711 + ------- + ------- - --------- + . . .
712 4194304 8388608 134217728
713 (%i4) pade (t, 4, 4);
717 There is no rational function of degree 4 numerator/denominator, with this
718 power series expansion. You must in general have degree of the numerator and
719 degree of the denominator adding up to at least the degree of the power series,
720 in order to have enough unknown coefficients to solve.
723 (%i5) pade (t, 5, 5);
725 (%o5) [- (520256329 x - 96719020632 x - 489651410240 x
728 - 1619100813312 x - 2176885157888 x - 2386516803584)
731 /(47041365435 x + 381702613848 x + 1360678489152 x
734 + 2856700692480 x + 3370143559680 x + 2386516803584)]
737 @opencatbox{Categories:}
738 @category{Power series}
742 @c -----------------------------------------------------------------------------
744 @deffn {Function} powerseries (@var{expr}, @var{x}, @var{a})
746 Returns the general form of the power series expansion for @var{expr} in the
747 variable @var{x} about the point @var{a} (which may be @code{inf} for infinity):
760 If @code{powerseries} is unable to expand @var{expr},
761 @code{taylor} may give the first several terms of the series.
763 When @code{verbose} is @code{true},
764 @code{powerseries} prints progress messages.
768 (%i2) powerseries (log(sin(x)/x), x, 0);
771 so we'll try again after applying the rule:
775 log(sin(x)) = i ----------- dx
778 in the first simplification we have returned:
786 \ (- 1) 2 bern(2 i1) x
787 > ------------------------------
791 (%o2) -------------------------------------
795 @opencatbox{Categories:}
796 @category{Power series}
800 @c -----------------------------------------------------------------------------
802 @defvr {Option variable} psexpand
803 Default value: @code{false}
805 When @code{psexpand} is @code{true},
806 an extended rational function expression is displayed fully expanded.
807 The switch @code{ratexpand} has the same effect.
809 @c WE NEED TO BE EXPLICIT HERE
810 When @code{psexpand} is @code{false},
811 a multivariate expression is displayed just as in the rational function package.
814 When @code{psexpand} is @code{multi},
815 then terms with the same total degree in the variables are grouped together.
817 @opencatbox{Categories:}
818 @category{Display flags and variables}
822 @c -----------------------------------------------------------------------------
824 @deffn {Function} revert (@var{expr}, @var{x})
825 @deffnx {Function} revert2 (@var{expr}, @var{x}, @var{n})
827 These functions return the reversion of @var{expr}, a Taylor series about zero
828 in the variable @var{x}. @code{revert} returns a polynomial of degree equal to
829 the highest power in @var{expr}. @code{revert2} returns a polynomial of degree
830 @var{n}, which may be greater than, equal to, or less than the degree of
833 @code{load ("revert")} loads these functions.
838 (%i1) load ("revert")$
839 (%i2) t: taylor (exp(x) - 1, x, 0, 6);
842 (%o2)/T/ x + -- + -- + -- + --- + --- + . . .
846 10 x - 12 x + 15 x - 20 x + 30 x - 60 x
847 (%o3)/R/ - --------------------------------------------
852 (%o4) - -- + -- - -- + -- - -- + x
854 (%i5) taylor (log(x+1), x, 0, 6);
857 (%o5)/T/ x - -- + -- - -- + -- - -- + . . .
859 (%i6) ratsimp (revert (t, x) - taylor (log(x+1), x, 0, 6));
861 (%i7) revert2 (t, x, 4);
864 (%o7) - -- + -- - -- + x
868 @opencatbox{Categories:}
869 @category{Power series}
873 @c -----------------------------------------------------------------------------
875 @deffn {Function} taylor @
876 @fname{taylor} (@var{expr}, @var{x}, @var{a}, @var{n}) @
877 @fname{taylor} (@var{expr}, [@var{x_1}, @var{x_2}, @dots{}], @var{a}, @var{n}) @
878 @fname{taylor} (@var{expr}, [@var{x}, @var{a}, @var{n}, 'asymp]) @
879 @fname{taylor} (@var{expr}, [@var{x_1}, @var{x_2}, @dots{}], [@var{a_1}, @var{a_2}, @dots{}], [@var{n_1}, @var{n_2}, @dots{}]) @
880 @fname{taylor} (@var{expr}, [@var{x_1}, @var{a_1}, @var{n_1}], [@var{x_2}, @var{a_2}, @var{n_2}], @dots{})
882 @code{taylor (@var{expr}, @var{x}, @var{a}, @var{n})} expands the expression
883 @var{expr} in a truncated Taylor or Laurent series in the variable @var{x}
884 around the point @var{a},
885 containing terms through @code{(@var{x} - @var{a})^@var{n}}.
887 If @var{expr} is of the form @code{@var{f}(@var{x})/@var{g}(@var{x})} and
888 @code{@var{g}(@var{x})} has no terms up to degree @var{n} then @code{taylor}
889 attempts to expand @code{@var{g}(@var{x})} up to degree @code{2 @var{n}}.
890 If there are still no nonzero terms, @code{taylor} doubles the degree of the
891 expansion of @code{@var{g}(@var{x})} so long as the degree of the expansion is
892 less than or equal to @code{@var{n} 2^taylordepth}.
894 @code{taylor (@var{expr}, [@var{x_1}, @var{x_2}, ...], @var{a}, @var{n})}
895 returns a truncated power series
896 of degree @var{n} in all variables @var{x_1}, @var{x_2}, @dots{}
897 about the point @code{(@var{a}, @var{a}, ...)}.
899 @code{taylor (@var{expr}, [@var{x_1}, @var{a_1}, @var{n_1}], [@var{x_2},
900 @var{a_2}, @var{n_2}], ...)} returns a truncated power series in the variables
901 @var{x_1}, @var{x_2}, @dots{} about the point
902 @code{(@var{a_1}, @var{a_2}, ...)}, truncated at @var{n_1}, @var{n_2}, @dots{}
904 @code{taylor (@var{expr}, [@var{x_1}, @var{x_2}, ...], [@var{a_1},
905 @var{a_2}, ...], [@var{n_1}, @var{n_2}, ...])} returns a truncated power series
906 in the variables @var{x_1}, @var{x_2}, @dots{} about the point
907 @code{(@var{a_1}, @var{a_2}, ...)}, truncated at @var{n_1}, @var{n_2}, @dots{}
909 @code{taylor (@var{expr}, [@var{x}, @var{a}, @var{n}, 'asymp])} returns an
910 expansion of @var{expr} in negative powers of @code{@var{x} - @var{a}}.
911 The highest order term is @code{(@var{x} - @var{a})^@var{-n}}.
913 When @code{maxtayorder} is @code{true}, then during algebraic
914 manipulation of (truncated) Taylor series, @code{taylor} tries to retain
915 as many terms as are known to be correct.
917 When @code{psexpand} is @code{true},
918 an extended rational function expression is displayed fully expanded.
919 The switch @code{ratexpand} has the same effect.
920 When @code{psexpand} is @code{false},
921 a multivariate expression is displayed just as in the rational function package.
922 When @code{psexpand} is @code{multi},
923 then terms with the same total degree in the variables are grouped together.
925 See also the @mref{taylor_logexpand} switch for controlling expansion.
929 @c EXAMPLES ADAPTED FROM example (taylor)
930 @c taylor (sqrt (sin(x) + a*x + 1), x, 0, 3);
932 @c taylor (sqrt (x + 1), x, 0, 5);
934 @c product ((1 + x^i)^2.5, i, 1, inf)/(1 + x^2);
935 @c ev (taylor(%, x, 0, 3), keepfloat);
936 @c taylor (1/log (x + 1), x, 0, 3);
937 @c taylor (cos(x) - sec(x), x, 0, 5);
938 @c taylor ((cos(x) - sec(x))^3, x, 0, 5);
939 @c taylor (1/(cos(x) - sec(x))^3, x, 0, 5);
940 @c taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6);
941 @c taylor ((x + 1)^n, x, 0, 4);
942 @c taylor (sin (y + x), x, 0, 3, y, 0, 3);
943 @c taylor (sin (y + x), [x, y], 0, 3);
944 @c taylor (1/sin (y + x), x, 0, 3, y, 0, 3);
945 @c taylor (1/sin (y + x), [x, y], 0, 3);
947 (%i1) taylor (sqrt (sin(x) + a*x + 1), x, 0, 3);
949 (a + 1) x (a + 2 a + 1) x
950 (%o1)/T/ 1 + --------- - -----------------
954 (3 a + 9 a + 9 a - 1) x
955 + -------------------------- + . . .
960 (%o2)/T/ 1 + (a + 1) x - -- + . . .
962 (%i3) taylor (sqrt (x + 1), x, 0, 5);
965 (%o3)/T/ 1 + - - -- + -- - ---- + ---- + . . .
968 (%o4)/T/ 1 + x + . . .
969 (%i5) product ((1 + x^i)^2.5, i, 1, inf)/(1 + x^2);
977 (%o5) -----------------
981 (%i6) ev (taylor(%, x, 0, 3), keepfloat);
983 (%o6)/T/ 1 + 2.5 x + 3.375 x + 6.5625 x + . . .
984 (%i7) taylor (1/log (x + 1), x, 0, 3);
987 (%o7)/T/ - + - - -- + -- - ----- + . . .
989 (%i8) taylor (cos(x) - sec(x), x, 0, 5);
992 (%o8)/T/ - x - -- + . . .
994 (%i9) taylor ((cos(x) - sec(x))^3, x, 0, 5);
996 (%i10) taylor (1/(cos(x) - sec(x))^3, x, 0, 5);
998 1 1 11 347 6767 x 15377 x
999 (%o10)/T/ - -- + ---- + ------ - ----- - ------- - --------
1000 6 4 2 15120 604800 7983360
1004 (%i11) taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6);
1007 (%o11)/T/ 1 - ----- - ----------------
1011 (45 k - 60 k + 16 k ) x
1012 - -------------------------- + . . .
1014 (%i12) taylor ((x + 1)^n, x, 0, 4);
1017 (n - n) x (n - 3 n + 2 n) x
1018 (%o12)/T/ 1 + n x + ----------- + --------------------
1022 (n - 6 n + 11 n - 6 n) x
1023 + ---------------------------- + . . .
1026 (%i13) taylor (sin (y + x), x, 0, 3, y, 0, 3);
1029 (%o13)/T/ y - -- + . . . + (1 - -- + . . .) x
1034 + (- - + -- + . . .) x + (- - + -- + . . .) x + . . .
1036 (%i14) taylor (sin (y + x), [x, y], 0, 3);
1038 x + 3 y x + 3 y x + y
1039 (%o14)/T/ y + x - ------------------------- + . . .
1041 (%i15) taylor (1/sin (y + x), x, 0, 3, y, 0, 3);
1043 (%o15)/T/ - + - + . . . + (- -- + - + . . .) x + (-- + . . .) x
1048 + (- -- + . . .) x + . . .
1051 (%i16) taylor (1/sin (y + x), [x, y], 0, 3);
1053 1 x + y 7 x + 21 y x + 21 y x + 7 y
1054 (%o16)/T/ ----- + ----- + ------------------------------- + . . .
1058 @opencatbox{Categories:}
1059 @category{Power series}
1063 @c -----------------------------------------------------------------------------
1064 @anchor{taylordepth}
1065 @defvr {Option variable} taylordepth
1068 @c UM, THE CONTEXT FOR THIS REMARK NEEDS TO BE ESTABLISHED
1069 If there are still no nonzero terms, @code{taylor} doubles the degree of the
1070 expansion of @code{@var{g}(@var{x})} so long as the degree of the expansion is
1071 less than or equal to @code{@var{n} 2^taylordepth}.
1073 @opencatbox{Categories:}
1074 @category{Power series}
1078 @c -----------------------------------------------------------------------------
1080 @deffn {Function} taylorinfo (@var{expr})
1082 Returns information about the Taylor series @var{expr}.
1083 The return value is a list of lists.
1084 Each list comprises the name of a variable,
1085 the point of expansion, and the degree of the expansion.
1087 @code{taylorinfo} returns @code{false} if @var{expr} is not a Taylor series.
1092 (%i1) taylor ((1 - y^2)/(1 - x), x, 0, 3, [y, a, inf]);
1094 (%o1)/T/ - (y - a) - 2 a (y - a) + (1 - a )
1097 + (1 - a - 2 a (y - a) - (y - a) ) x
1100 + (1 - a - 2 a (y - a) - (y - a) ) x
1103 + (1 - a - 2 a (y - a) - (y - a) ) x + . . .
1104 (%i2) taylorinfo(%);
1105 (%o2) [[y, a, inf], [x, 0, 3]]
1108 @opencatbox{Categories:}
1109 @category{Power series}
1113 @c -----------------------------------------------------------------------------
1115 @deffn {Function} taylorp (@var{expr})
1117 Returns @code{true} if @var{expr} is a Taylor series,
1118 and @code{false} otherwise.
1120 @opencatbox{Categories:}
1121 @category{Predicate functions}
1122 @category{Power series}
1126 @c WHAT IS THIS ABOUT EXACTLY ??
1128 @c -----------------------------------------------------------------------------
1129 @anchor{taylor_logexpand}
1130 @defvr {Option variable} taylor_logexpand
1131 Default value: @code{true}
1133 @code{taylor_logexpand} controls expansions of logarithms in
1134 @code{taylor} series.
1136 When @code{taylor_logexpand} is @code{true}, all logarithms are expanded fully
1137 so that zero-recognition problems involving logarithmic identities do not
1138 disturb the expansion process. However, this scheme is not always
1139 mathematically correct since it ignores branch information.
1141 When @code{taylor_logexpand} is set to @code{false}, then the only expansion of
1142 logarithms that occur is that necessary to obtain a formal power series.
1144 @c NEED EXAMPLES HERE
1145 @opencatbox{Categories:}
1146 @category{Power series}
1147 @category{Exponential and logarithm functions}
1151 @c -----------------------------------------------------------------------------
1152 @anchor{taylor_order_coefficients}
1153 @defvr {Option variable} taylor_order_coefficients
1154 Default value: @code{true}
1156 @code{taylor_order_coefficients} controls the ordering of
1157 coefficients in a Taylor series.
1159 When @code{taylor_order_coefficients} is @code{true},
1160 coefficients of taylor series are ordered canonically.
1161 @c IS MAXIMA'S NOTION OF "CANONICALLY" DESCRIBED ELSEWHERE ??
1162 @c AND WHAT HAPPENS WHEN IT IS FALSE ??
1164 @c NEED EXAMPLES HERE
1165 @opencatbox{Categories:}
1166 @category{Power series}
1170 @c -----------------------------------------------------------------------------
1171 @anchor{taylor_simplifier}
1172 @deffn {Function} taylor_simplifier (@var{expr})
1174 Simplifies coefficients of the power series @var{expr}.
1175 @code{taylor} calls this function.
1177 @opencatbox{Categories:}
1178 @category{Power series}
1182 @c -----------------------------------------------------------------------------
1183 @anchor{taylor_truncate_polynomials}
1184 @defvr {Option variable} taylor_truncate_polynomials
1185 Default value: @code{true}
1187 @c WHAT IS THE "INPUT TRUNCATION LEVEL" ?? THE ARGUMENT n OF taylor ??
1188 When @code{taylor_truncate_polynomials} is @code{true},
1189 polynomials are truncated based upon the input truncation levels.
1192 polynomials input to @code{taylor} are considered to have infinite precision.
1193 @c WHAT IS "INFINITE PRECISION" IN THIS CONTEXT ??
1195 @opencatbox{Categories:}
1196 @category{Power series}
1200 @c -----------------------------------------------------------------------------
1202 @deffn {Function} taytorat (@var{expr})
1204 Converts @var{expr} from @code{taylor} form to canonical rational expression
1205 (CRE) form. The effect is the same as @code{rat (ratdisrep (@var{expr}))}, but
1208 @opencatbox{Categories:}
1209 @category{Power series}
1210 @category{Rational expressions}
1214 @c -----------------------------------------------------------------------------
1216 @deffn {Function} trunc (@var{expr})
1218 Annotates the internal representation of the general expression @var{expr}
1219 so that it is displayed as if its sums were truncated Taylor series.
1220 @var{expr} is not otherwise modified.
1225 (%i1) expr: x^2 + x + 1;
1230 (%o2) 1 + x + x + . . .
1231 (%i3) is (expr = trunc (expr));
1235 @opencatbox{Categories:}
1236 @category{Power series}
1240 @c -----------------------------------------------------------------------------
1242 @deffn {Function} unsum (@var{f}, @var{n})
1244 Returns the first backward difference
1245 @code{@var{f}(@var{n}) - @var{f}(@var{n} - 1)}.
1246 Thus @code{unsum} in a sense is the inverse of @code{sum}.
1248 See also @mrefdot{nusum}
1251 @c GENERATED FROM THE FOLLOWING INPUTS
1252 @c g(p) := p*4^n/binomial(2*n,n);
1254 @c nusum (%, n, 0, n);
1258 (%i1) g(p) := p*4^n/binomial(2*n,n);
1261 (%o1) g(p) := ----------------
1266 (%o2) ----------------
1268 (%i3) nusum (%, n, 0, n);
1270 2 (n + 1) (63 n + 112 n + 18 n - 22 n + 3) 4 2
1271 (%o3) ------------------------------------------------ - ------
1272 693 binomial(2 n, n) 3 11 7
1276 (%o4) ----------------
1280 @opencatbox{Categories:}
1281 @category{Sums and products}
1285 @c -----------------------------------------------------------------------------
1287 @defvr {Option variable} verbose
1288 Default value: @code{false}
1290 When @code{verbose} is @code{true},
1291 @code{powerseries} prints progress messages.
1293 @opencatbox{Categories:}
1294 @category{Power series}
1298 @c -----------------------------------------------------------------------------
1299 @node Introduction to Fourier series, Functions and Variables for Fourier series, Functions and Variables for Series, Sums Products and Series
1300 @section Introduction to Fourier series
1301 @c -----------------------------------------------------------------------------
1303 The @code{fourie} package comprises functions for the symbolic computation
1305 There are functions in the @code{fourie} package to calculate Fourier integral
1306 coefficients and some functions for manipulation of expressions.
1308 @opencatbox{Categories:}
1309 @category{Fourier transform}
1310 @category{Share packages}
1311 @category{Package fourie}
1314 @c -----------------------------------------------------------------------------
1315 @node Functions and Variables for Fourier series, Functions and Variables for Poisson series, Introduction to Fourier series, Sums Products and Series
1316 @section Functions and Variables for Fourier series
1317 @c -----------------------------------------------------------------------------
1321 @c -----------------------------------------------------------------------------
1323 @deffn {Function} equalp (@var{x}, @var{y})
1325 Returns @code{true} if @code{equal (@var{x}, @var{y})} otherwise @code{false}
1326 (doesn't give an error message like @code{equal (x, y)} would do in this case).
1329 @opencatbox{Categories:}
1330 @category{Package fourie}
1334 @c -----------------------------------------------------------------------------
1336 @deffn {Function} remfun @
1337 @fname{remfun} (@var{f}, @var{expr}) @
1338 @fname{remfun} (@var{f}, @var{expr}, @var{x})
1340 @code{remfun (@var{f}, @var{expr})} replaces all occurrences of @code{@var{f}
1341 (@var{arg})} by @var{arg} in @var{expr}.
1343 @code{remfun (@var{f}, @var{expr}, @var{x})} replaces all occurrences of
1344 @code{@var{f} (@var{arg})} by @var{arg} in @var{expr} only if @var{arg} contains
1345 the variable @var{x}.
1348 @opencatbox{Categories:}
1349 @category{Package fourie}
1353 @c -----------------------------------------------------------------------------
1355 @deffn {Function} funp @
1356 @fname{funp} (@var{f}, @var{expr}) @
1357 @fname{funp} (@var{f}, @var{expr}, @var{x})
1359 @code{funp (@var{f}, @var{expr})}
1360 returns @code{true} if @var{expr} contains the function @var{f}.
1362 @code{funp (@var{f}, @var{expr}, @var{x})}
1363 returns @code{true} if @var{expr} contains the function @var{f} and the variable
1364 @var{x} is somewhere in the argument of one of the instances of @var{f}.
1367 @opencatbox{Categories:}
1368 @category{Package fourie}
1372 @c -----------------------------------------------------------------------------
1374 @deffn {Function} absint @
1375 @fname{absint} (@var{f}, @var{x}, @var{halfplane}) @
1376 @fname{absint} (@var{f}, @var{x}) @
1377 @fname{absint} (@var{f}, @var{x}, @var{a}, @var{b})
1379 @code{absint (@var{f}, @var{x}, @var{halfplane})}
1380 returns the indefinite integral of @var{f} with respect to
1381 @var{x} in the given halfplane (@code{pos}, @code{neg}, or @code{both}).
1382 @var{f} may contain expressions of the form
1383 @code{abs (x)}, @code{abs (sin (x))}, @code{abs (a) * exp (-abs (b) * abs (x))}.
1385 @code{absint (@var{f}, @var{x})} is equivalent to
1386 @code{absint (@var{f}, @var{x}, pos)}.
1388 @code{absint (@var{f}, @var{x}, @var{a}, @var{b})} returns the definite integral
1389 of @var{f} with respect to @var{x} from @var{a} to @var{b}.
1390 @c SAME LIST AS ABOVE ??
1391 @var{f} may include absolute values.
1394 @opencatbox{Categories:}
1395 @category{Package fourie}
1396 @category{Integral calculus}
1402 @c -----------------------------------------------------------------------------
1404 @deffn {Function} fourier (@var{f}, @var{x}, @var{p})
1406 Returns a list of the Fourier coefficients of @code{@var{f}(@var{x})} defined
1407 on the interval @code{[-p, p]}.
1410 @opencatbox{Categories:}
1411 @category{Package fourie}
1415 @c NEEDS EXPANSION. WHAT IS THE ARGUMENT l ??
1417 @c -----------------------------------------------------------------------------
1419 @deffn {Function} foursimp (@var{l})
1421 Simplifies @code{sin (n %pi)} to 0 if @code{sinnpiflag} is @code{true} and
1422 @code{cos (n %pi)} to @code{(-1)^n} if @code{cosnpiflag} is @code{true}.
1425 @opencatbox{Categories:}
1426 @category{Package fourie}
1427 @category{Trigonometric functions}
1428 @category{Simplification functions}
1432 @c -----------------------------------------------------------------------------
1434 @defvr {Option variable} sinnpiflag
1435 Default value: @code{true}
1437 See @code{foursimp}.
1439 @opencatbox{Categories:}
1440 @category{Package fourie}
1444 @c -----------------------------------------------------------------------------
1446 @defvr {Option variable} cosnpiflag
1447 Default value: @code{true}
1449 See @code{foursimp}.
1451 @opencatbox{Categories:}
1452 @category{Package fourie}
1456 @c NEEDS EXPANSION. EXPLAIN x AND p HERE (DO NOT REFER SOMEWHERE ELSE)
1458 @c -----------------------------------------------------------------------------
1460 @deffn {Function} fourexpand (@var{l}, @var{x}, @var{p}, @var{limit})
1462 Constructs and returns the Fourier series from the list of Fourier coefficients
1463 @var{l} up through @var{limit} terms (@var{limit} may be @code{inf}). @var{x}
1464 and @var{p} have same meaning as in @code{fourier}.
1467 @opencatbox{Categories:}
1468 @category{Package fourie}
1474 @c -----------------------------------------------------------------------------
1476 @deffn {Function} fourcos (@var{f}, @var{x}, @var{p})
1478 Returns the Fourier cosine coefficients for @code{@var{f}(@var{x})} defined on
1479 @code{[0, @var{p}]}.
1482 @opencatbox{Categories:}
1483 @category{Package fourie}
1489 @c -----------------------------------------------------------------------------
1491 @deffn {Function} foursin (@var{f}, @var{x}, @var{p})
1493 Returns the Fourier sine coefficients for @code{@var{f}(@var{x})} defined on
1494 @code{[0, @var{p}]}.
1497 @opencatbox{Categories:}
1498 @category{Package fourie}
1504 @c -----------------------------------------------------------------------------
1505 @anchor{totalfourier}
1506 @deffn {Function} totalfourier (@var{f}, @var{x}, @var{p})
1508 Returns @code{fourexpand (foursimp (fourier (@var{f}, @var{x}, @var{p})),
1509 @var{x}, @var{p}, 'inf)}.
1512 @opencatbox{Categories:}
1513 @category{Package fourie}
1519 @c -----------------------------------------------------------------------------
1521 @deffn {Function} fourint (@var{f}, @var{x})
1523 Constructs and returns a list of the Fourier integral coefficients of
1524 @code{@var{f}(@var{x})} defined on @code{[minf, inf]}.
1527 @opencatbox{Categories:}
1528 @category{Package fourie}
1534 @c -----------------------------------------------------------------------------
1536 @deffn {Function} fourintcos (@var{f}, @var{x})
1538 Returns the Fourier cosine integral coefficients for @code{@var{f}(@var{x})}
1542 @opencatbox{Categories:}
1543 @category{Package fourie}
1549 @c -----------------------------------------------------------------------------
1551 @deffn {Function} fourintsin (@var{f}, @var{x})
1553 Returns the Fourier sine integral coefficients for @code{@var{f}(@var{x})} on
1557 @opencatbox{Categories:}
1558 @category{Package fourie}
1563 @c -----------------------------------------------------------------------------
1564 @node Functions and Variables for Poisson series, , Functions and Variables for Fourier series, Sums Products and Series
1565 @section Functions and Variables for Poisson series
1566 @c -----------------------------------------------------------------------------
1568 @c NEED EXAMPLES HERE
1570 @c -----------------------------------------------------------------------------
1572 @deffn {Function} intopois (@var{a})
1573 Converts @var{a} into a Poisson encoding.
1575 @opencatbox{Categories:}
1576 @category{Poisson series}
1580 @c NEED EXAMPLES HERE
1582 @c -----------------------------------------------------------------------------
1584 @deffn {Function} outofpois (@var{a})
1586 Converts @var{a} from Poisson encoding to general representation. If @var{a} is
1587 not in Poisson form, @code{outofpois} carries out the conversion,
1588 i.e., the return value is @code{outofpois (intopois (@var{a}))}.
1589 This function is thus a canonical simplifier
1590 for sums of powers of sine and cosine terms of a particular type.
1592 @opencatbox{Categories:}
1593 @category{Poisson series}
1597 @c NEED MORE INFO HERE
1598 @c NEED EXAMPLES HERE
1600 @c -----------------------------------------------------------------------------
1602 @deffn {Function} poisdiff (@var{a}, @var{b})
1604 Differentiates @var{a} with respect to @var{b}. @var{b} must occur only
1605 in the trig arguments or only in the coefficients.
1607 @opencatbox{Categories:}
1608 @category{Poisson series}
1612 @c LOOKING AT THE CODE IN src/pois3.lisp, THIS FCN SEEMS TO COMPUTE THE EXPONENT
1613 @c BY MULTIPLYING IN A LOOP DUNNO HOW WE WANT TO EXPLAIN THAT
1614 @c REPHRASE WITHOUT USING THE TERM "FUNCTIONALLY IDENTICAL"
1616 @c -----------------------------------------------------------------------------
1618 @deffn {Function} poisexpt (@var{a}, @var{b})
1620 Functionally identical to @code{intopois (@var{a}^@var{b})}.
1621 @var{b} must be a positive integer.
1623 @opencatbox{Categories:}
1624 @category{Poisson series}
1628 @c WHAT IS THIS ABOUT ??
1630 @c -----------------------------------------------------------------------------
1632 @deffn {Function} poisint (@var{a}, @var{b})
1634 Integrates in a similarly restricted sense (to @code{poisdiff}). Non-periodic
1635 terms in @var{b} are dropped if @var{b} is in the trig arguments.
1637 @opencatbox{Categories:}
1638 @category{Poisson series}
1642 @c -----------------------------------------------------------------------------
1644 @defvr {Option variable} poislim
1647 @code{poislim} determines the domain of the coefficients in
1648 the arguments of the trig functions. The initial value of 5
1649 corresponds to the interval [-2^(5-1)+1,2^(5-1)], or [-15,16], but it
1650 can be set to [-2^(n-1)+1, 2^(n-1)].
1652 @opencatbox{Categories:}
1653 @category{Poisson series}
1657 @c UMM, WHAT IS THIS ABOUT EXACTLY ?? EXAMPLES NEEDED
1659 @c -----------------------------------------------------------------------------
1661 @deffn {Function} poismap (@var{series}, @var{sinfn}, @var{cosfn})
1663 will map the functions @var{sinfn} on the sine terms and @var{cosfn} on the
1664 cosine terms of the Poisson series given. @var{sinfn} and @var{cosfn} are
1665 functions of two arguments which are a coefficient and a trigonometric part of
1666 a term in series respectively.
1668 @opencatbox{Categories:}
1669 @category{Poisson series}
1673 @c REPHRASE WITHOUT USING THE TERM "FUNCTIONALLY IDENTICAL"
1675 @c -----------------------------------------------------------------------------
1677 @deffn {Function} poisplus (@var{a}, @var{b})
1679 Is functionally identical to @code{intopois (a + b)}.
1681 @opencatbox{Categories:}
1682 @category{Poisson series}
1686 @c -----------------------------------------------------------------------------
1688 @deffn {Function} poissimp (@var{a})
1690 Converts @var{a} into a Poisson series for @var{a} in general
1693 @opencatbox{Categories:}
1694 @category{Poisson series}
1698 @c MORE INFO NEEDED HERE
1700 @c -----------------------------------------------------------------------------
1702 @defvr {Special symbol} poisson
1704 The symbol @code{/P/} follows the line label of Poisson series
1707 @opencatbox{Categories:}
1708 @category{Poisson series}
1712 @c -----------------------------------------------------------------------------
1714 @deffn {Function} poissubst (@var{a}, @var{b}, @var{c})
1716 Substitutes @var{a} for @var{b} in @var{c}. @var{c} is a Poisson series.
1718 (1) Where @var{B} is a variable @var{u}, @var{v}, @var{w}, @var{x}, @var{y},
1719 or @var{z}, then @var{a} must be an expression linear in those variables (e.g.,
1722 (2) Where @var{b} is other than those variables, then @var{a} must also be
1723 free of those variables, and furthermore, free of sines or cosines.
1725 @code{poissubst (@var{a}, @var{b}, @var{c}, @var{d}, @var{n})} is a special type
1726 of substitution which operates on @var{a} and @var{b} as in type (1) above, but
1727 where @var{d} is a Poisson series, expands @code{cos(@var{d})} and
1728 @code{sin(@var{d})} to order @var{n} so as to provide the result of substituting
1729 @code{@var{a} + @var{d}} for @var{b} in @var{c}. The idea is that @var{d} is an
1730 expansion in terms of a small parameter. For example,
1731 @code{poissubst (u, v, cos(v), %e, 3)} yields
1732 @code{cos(u)*(1 - %e^2/2) - sin(u)*(%e - %e^3/6)}.
1734 @opencatbox{Categories:}
1735 @category{Poisson series}
1739 @c REPHRASE WITHOUT USING THE TERM "FUNCTIONALLY IDENTICAL"
1741 @c -----------------------------------------------------------------------------
1743 @deffn {Function} poistimes (@var{a}, @var{b})
1745 Is functionally identical to @code{intopois (@var{a}*@var{b})}.
1747 @opencatbox{Categories:}
1748 @category{Poisson series}
1752 @c HOW DOES THIS WORK ?? NEED MORE INFO AND EXAMPLES
1754 @c -----------------------------------------------------------------------------
1756 @deffn {Function} poistrim ()
1758 is a reserved function name which (if the user has defined
1759 it) gets applied during Poisson multiplication. It is a predicate
1760 function of 6 arguments which are the coefficients of the @var{u}, @var{v}, ..., @var{z}
1761 in a term. Terms for which @code{poistrim} is @code{true} (for the coefficients of
1762 that term) are eliminated during multiplication.
1764 @opencatbox{Categories:}
1765 @category{Poisson series}
1769 @c -----------------------------------------------------------------------------
1771 @deffn {Function} printpois (@var{a})
1773 Prints a Poisson series in a readable format. In common
1774 with @code{outofpois}, it will convert @var{a} into a Poisson encoding first, if
1777 @opencatbox{Categories:}
1778 @category{Poisson series}
1779 @category{Display functions}