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{zeilberger-pkg}
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 typically names of variables,
575 although that is not enforced by @code{niceindices}.
580 (%i1) niceindicespref: [p, q, r, s, t, u]$
581 (%i2) product (sum (f (foo + i*j*bar), foo, 1, inf), bar, 1, inf);
585 (%o2) ! ! > f(bar i j + foo)
589 (%i3) niceindices (%);
593 (%o3) ! ! > f(i j q + p)
599 @opencatbox{Categories:}
600 @category{Sums and products}
604 @c -----------------------------------------------------------------------------
606 @deffn {Function} nusum (@var{expr}, @var{x}, @var{i_0}, @var{i_1})
608 Carries out indefinite hypergeometric summation of @var{expr} with
609 respect to @var{x} using a decision procedure due to R.W. Gosper.
610 @var{expr} and the result must be expressible as products of integer powers,
611 factorials, binomials, and rational functions.
613 @c UMM, DO WE REALLY NEED TO DEFINE "DEFINITE" AND "INDEFINITE" SUMMATION HERE ??
614 @c (CAN'T WE MAKE THE POINT WITHOUT DRAGGING IN SOME NONSTANDARD TERMINOLOGY ??)
616 and "indefinite summation" are used analogously to "definite" and
617 "indefinite integration".
618 To sum indefinitely means to give a symbolic result
619 for the sum over intervals of variable length, not just e.g. 0 to
620 inf. Thus, since there is no formula for the general partial sum of
621 the binomial series, @code{nusum} can't do it.
623 @code{nusum} and @code{unsum} know a little about sums and differences of
624 finite products. See also @mrefdot{unsum}
629 (%i1) nusum (n*n!, n, 0, n);
631 Dependent equations eliminated: (1)
633 (%i2) nusum (n^4*4^n/binomial(2*n,n), n, 0, n);
635 2 (n + 1) (63 n + 112 n + 18 n - 22 n + 3) 4 2
636 (%o2) ------------------------------------------------ - ------
637 693 binomial(2 n, n) 3 11 7
641 (%o3) ----------------
643 (%i4) unsum (prod (i^2, i, 1, n), n);
647 (%o4) ( ! ! i ) (n - 1) (n + 1)
650 (%i5) nusum (%, n, 1, n);
652 Dependent equations eliminated: (2 3)
661 @opencatbox{Categories:}
662 @category{Sums and products}
666 @c THIS ITEM NEEDS SERIOUS WORK
668 @c -----------------------------------------------------------------------------
670 @deffn {Function} pade (@var{taylor_series}, @var{numer_deg_bound}, @var{denom_deg_bound})
673 all rational functions which have the given Taylor series expansion
674 where the sum of the degrees of the numerator and the denominator is
675 less than or equal to the truncation level of the power series, i.e.
676 are "best" approximants, and which additionally satisfy the specified
679 @var{taylor_series} is an univariate Taylor series.
680 @var{numer_deg_bound} and @var{denom_deg_bound}
681 are positive integers specifying degree bounds on
682 the numerator and denominator.
684 @var{taylor_series} can also be a Laurent series, and the degree
685 bounds can be @code{inf} which causes all rational functions whose total
686 degree is less than or equal to the length of the power series to be
687 returned. Total degree is defined as @code{@var{numer_deg_bound} +
688 @var{denom_deg_bound}}.
689 Length of a power series is defined as
690 @code{"truncation level" + 1 - min(0, "order of series")}.
693 (%i1) taylor (1 + x + x^2 + x^3, x, 0, 3);
695 (%o1)/T/ 1 + x + x + x + . . .
696 (%i2) pade (%, 1, 1);
700 (%i3) t: taylor(-(83787*x^10 - 45552*x^9 - 187296*x^8
701 + 387072*x^7 + 86016*x^6 - 1507328*x^5
702 + 1966080*x^4 + 4194304*x^3 - 25165824*x^2
703 + 67108864*x - 134217728)
704 /134217728, x, 0, 10);
706 x 3 x x 15 x 23 x 21 x 189 x
707 (%o3)/T/ 1 - - + ---- - -- - ----- + ----- - ----- - ------
708 2 16 32 1024 2048 32768 65536
711 5853 x 2847 x 83787 x
712 + ------- + ------- - --------- + . . .
713 4194304 8388608 134217728
714 (%i4) pade (t, 4, 4);
718 There is no rational function of degree 4 numerator/denominator, with this
719 power series expansion. You must in general have degree of the numerator and
720 degree of the denominator adding up to at least the degree of the power series,
721 in order to have enough unknown coefficients to solve.
724 (%i5) pade (t, 5, 5);
726 (%o5) [- (520256329 x - 96719020632 x - 489651410240 x
729 - 1619100813312 x - 2176885157888 x - 2386516803584)
732 /(47041365435 x + 381702613848 x + 1360678489152 x
735 + 2856700692480 x + 3370143559680 x + 2386516803584)]
738 @opencatbox{Categories:}
739 @category{Power series}
743 @c -----------------------------------------------------------------------------
745 @deffn {Function} powerseries (@var{expr}, @var{x}, @var{a})
747 Returns the general form of the power series expansion for @var{expr} in the
748 variable @var{x} about the point @var{a} (which may be @code{inf} for infinity):
761 If @code{powerseries} is unable to expand @var{expr},
762 @code{taylor} may give the first several terms of the series.
764 When @code{verbose} is @code{true},
765 @code{powerseries} prints progress messages.
769 (%i2) powerseries (log(sin(x)/x), x, 0);
772 so we'll try again after applying the rule:
776 log(sin(x)) = i ----------- dx
779 in the first simplification we have returned:
787 \ (- 1) 2 bern(2 i1) x
788 > ------------------------------
792 (%o2) -------------------------------------
796 @opencatbox{Categories:}
797 @category{Power series}
801 @c -----------------------------------------------------------------------------
803 @defvr {Option variable} psexpand
804 Default value: @code{false}
806 When @code{psexpand} is @code{true},
807 an extended rational function expression is displayed fully expanded.
808 The switch @code{ratexpand} has the same effect.
810 @c WE NEED TO BE EXPLICIT HERE
811 When @code{psexpand} is @code{false},
812 a multivariate expression is displayed just as in the rational function package.
815 When @code{psexpand} is @code{multi},
816 then terms with the same total degree in the variables are grouped together.
818 @opencatbox{Categories:}
819 @category{Display flags and variables}
823 @c -----------------------------------------------------------------------------
825 @deffn {Function} revert (@var{expr}, @var{x})
826 @deffnx {Function} revert2 (@var{expr}, @var{x}, @var{n})
828 These functions return the reversion of @var{expr}, a Taylor series about zero
829 in the variable @var{x}. @code{revert} returns a polynomial of degree equal to
830 the highest power in @var{expr}. @code{revert2} returns a polynomial of degree
831 @var{n}, which may be greater than, equal to, or less than the degree of
834 @code{load ("revert")} loads these functions.
839 (%i1) load ("revert")$
840 (%i2) t: taylor (exp(x) - 1, x, 0, 6);
843 (%o2)/T/ x + -- + -- + -- + --- + --- + . . .
847 10 x - 12 x + 15 x - 20 x + 30 x - 60 x
848 (%o3)/R/ - --------------------------------------------
853 (%o4) - -- + -- - -- + -- - -- + x
855 (%i5) taylor (log(x+1), x, 0, 6);
858 (%o5)/T/ x - -- + -- - -- + -- - -- + . . .
860 (%i6) ratsimp (revert (t, x) - taylor (log(x+1), x, 0, 6));
862 (%i7) revert2 (t, x, 4);
865 (%o7) - -- + -- - -- + x
869 @opencatbox{Categories:}
870 @category{Power series}
874 @c -----------------------------------------------------------------------------
876 @deffn {Function} taylor @
877 @fname{taylor} (@var{expr}, @var{x}, @var{a}, @var{n}) @
878 @fname{taylor} (@var{expr}, [@var{x_1}, @var{x_2}, @dots{}], @var{a}, @var{n}) @
879 @fname{taylor} (@var{expr}, [@var{x}, @var{a}, @var{n}, 'asymp]) @
880 @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{}]) @
881 @fname{taylor} (@var{expr}, [@var{x_1}, @var{a_1}, @var{n_1}], [@var{x_2}, @var{a_2}, @var{n_2}], @dots{})
883 @code{taylor (@var{expr}, @var{x}, @var{a}, @var{n})} expands the expression
884 @var{expr} in a truncated Taylor or Laurent series in the variable @var{x}
885 around the point @var{a},
886 containing terms through @code{(@var{x} - @var{a})^@var{n}}.
888 If @var{expr} is of the form @code{@var{f}(@var{x})/@var{g}(@var{x})} and
889 @code{@var{g}(@var{x})} has no terms up to degree @var{n} then @code{taylor}
890 attempts to expand @code{@var{g}(@var{x})} up to degree @code{2 @var{n}}.
891 If there are still no nonzero terms, @code{taylor} doubles the degree of the
892 expansion of @code{@var{g}(@var{x})} so long as the degree of the expansion is
893 less than or equal to @code{@var{n} 2^taylordepth}.
895 @code{taylor (@var{expr}, [@var{x_1}, @var{x_2}, ...], @var{a}, @var{n})}
896 returns a truncated power series
897 of degree @var{n} in all variables @var{x_1}, @var{x_2}, @dots{}
898 about the point @code{(@var{a}, @var{a}, ...)}.
900 @code{taylor (@var{expr}, [@var{x_1}, @var{a_1}, @var{n_1}], [@var{x_2},
901 @var{a_2}, @var{n_2}], ...)} returns a truncated power series in the variables
902 @var{x_1}, @var{x_2}, @dots{} about the point
903 @code{(@var{a_1}, @var{a_2}, ...)}, truncated at @var{n_1}, @var{n_2}, @dots{}
905 @code{taylor (@var{expr}, [@var{x_1}, @var{x_2}, ...], [@var{a_1},
906 @var{a_2}, ...], [@var{n_1}, @var{n_2}, ...])} returns a truncated power series
907 in the variables @var{x_1}, @var{x_2}, @dots{} about the point
908 @code{(@var{a_1}, @var{a_2}, ...)}, truncated at @var{n_1}, @var{n_2}, @dots{}
910 @code{taylor (@var{expr}, [@var{x}, @var{a}, @var{n}, 'asymp])} returns an
911 expansion of @var{expr} in negative powers of @code{@var{x} - @var{a}}.
912 The highest order term is @code{(@var{x} - @var{a})^@var{-n}}.
914 When @code{maxtayorder} is @code{true}, then during algebraic
915 manipulation of (truncated) Taylor series, @code{taylor} tries to retain
916 as many terms as are known to be correct.
918 When @code{psexpand} is @code{true},
919 an extended rational function expression is displayed fully expanded.
920 The switch @code{ratexpand} has the same effect.
921 When @code{psexpand} is @code{false},
922 a multivariate expression is displayed just as in the rational function package.
923 When @code{psexpand} is @code{multi},
924 then terms with the same total degree in the variables are grouped together.
926 See also the @mref{taylor_logexpand} switch for controlling expansion.
930 @c EXAMPLES ADAPTED FROM example (taylor)
931 @c taylor (sqrt (sin(x) + a*x + 1), x, 0, 3);
933 @c taylor (sqrt (x + 1), x, 0, 5);
935 @c product ((1 + x^i)^2.5, i, 1, inf)/(1 + x^2);
936 @c ev (taylor(%, x, 0, 3), keepfloat);
937 @c taylor (1/log (x + 1), x, 0, 3);
938 @c taylor (cos(x) - sec(x), x, 0, 5);
939 @c taylor ((cos(x) - sec(x))^3, x, 0, 5);
940 @c taylor (1/(cos(x) - sec(x))^3, x, 0, 5);
941 @c taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6);
942 @c taylor ((x + 1)^n, x, 0, 4);
943 @c taylor (sin (y + x), x, 0, 3, y, 0, 3);
944 @c taylor (sin (y + x), [x, y], 0, 3);
945 @c taylor (1/sin (y + x), x, 0, 3, y, 0, 3);
946 @c taylor (1/sin (y + x), [x, y], 0, 3);
948 (%i1) taylor (sqrt (sin(x) + a*x + 1), x, 0, 3);
950 (a + 1) x (a + 2 a + 1) x
951 (%o1)/T/ 1 + --------- - -----------------
955 (3 a + 9 a + 9 a - 1) x
956 + -------------------------- + . . .
961 (%o2)/T/ 1 + (a + 1) x - -- + . . .
963 (%i3) taylor (sqrt (x + 1), x, 0, 5);
966 (%o3)/T/ 1 + - - -- + -- - ---- + ---- + . . .
969 (%o4)/T/ 1 + x + . . .
970 (%i5) product ((1 + x^i)^2.5, i, 1, inf)/(1 + x^2);
978 (%o5) -----------------
982 (%i6) ev (taylor(%, x, 0, 3), keepfloat);
984 (%o6)/T/ 1 + 2.5 x + 3.375 x + 6.5625 x + . . .
985 (%i7) taylor (1/log (x + 1), x, 0, 3);
988 (%o7)/T/ - + - - -- + -- - ----- + . . .
990 (%i8) taylor (cos(x) - sec(x), x, 0, 5);
993 (%o8)/T/ - x - -- + . . .
995 (%i9) taylor ((cos(x) - sec(x))^3, x, 0, 5);
997 (%i10) taylor (1/(cos(x) - sec(x))^3, x, 0, 5);
999 1 1 11 347 6767 x 15377 x
1000 (%o10)/T/ - -- + ---- + ------ - ----- - ------- - --------
1001 6 4 2 15120 604800 7983360
1005 (%i11) taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6);
1008 (%o11)/T/ 1 - ----- - ----------------
1012 (45 k - 60 k + 16 k ) x
1013 - -------------------------- + . . .
1015 (%i12) taylor ((x + 1)^n, x, 0, 4);
1018 (n - n) x (n - 3 n + 2 n) x
1019 (%o12)/T/ 1 + n x + ----------- + --------------------
1023 (n - 6 n + 11 n - 6 n) x
1024 + ---------------------------- + . . .
1027 (%i13) taylor (sin (y + x), x, 0, 3, y, 0, 3);
1030 (%o13)/T/ y - -- + . . . + (1 - -- + . . .) x
1035 + (- - + -- + . . .) x + (- - + -- + . . .) x + . . .
1037 (%i14) taylor (sin (y + x), [x, y], 0, 3);
1039 x + 3 y x + 3 y x + y
1040 (%o14)/T/ y + x - ------------------------- + . . .
1042 (%i15) taylor (1/sin (y + x), x, 0, 3, y, 0, 3);
1044 (%o15)/T/ - + - + . . . + (- -- + - + . . .) x + (-- + . . .) x
1049 + (- -- + . . .) x + . . .
1052 (%i16) taylor (1/sin (y + x), [x, y], 0, 3);
1054 1 x + y 7 x + 21 y x + 21 y x + 7 y
1055 (%o16)/T/ ----- + ----- + ------------------------------- + . . .
1059 @opencatbox{Categories:}
1060 @category{Power series}
1064 @c -----------------------------------------------------------------------------
1065 @anchor{taylordepth}
1066 @defvr {Option variable} taylordepth
1069 @c UM, THE CONTEXT FOR THIS REMARK NEEDS TO BE ESTABLISHED
1070 If there are still no nonzero terms, @code{taylor} doubles the degree of the
1071 expansion of @code{@var{g}(@var{x})} so long as the degree of the expansion is
1072 less than or equal to @code{@var{n} 2^taylordepth}.
1074 @opencatbox{Categories:}
1075 @category{Power series}
1079 @c -----------------------------------------------------------------------------
1081 @deffn {Function} taylorinfo (@var{expr})
1083 Returns information about the Taylor series @var{expr}.
1084 The return value is a list of lists.
1085 Each list comprises the name of a variable,
1086 the point of expansion, and the degree of the expansion.
1088 @code{taylorinfo} returns @code{false} if @var{expr} is not a Taylor series.
1093 (%i1) taylor ((1 - y^2)/(1 - x), x, 0, 3, [y, a, inf]);
1095 (%o1)/T/ - (y - a) - 2 a (y - a) + (1 - a )
1098 + (1 - a - 2 a (y - a) - (y - a) ) x
1101 + (1 - a - 2 a (y - a) - (y - a) ) x
1104 + (1 - a - 2 a (y - a) - (y - a) ) x + . . .
1105 (%i2) taylorinfo(%);
1106 (%o2) [[y, a, inf], [x, 0, 3]]
1109 @opencatbox{Categories:}
1110 @category{Power series}
1114 @c -----------------------------------------------------------------------------
1116 @deffn {Function} taylorp (@var{expr})
1118 Returns @code{true} if @var{expr} is a Taylor series,
1119 and @code{false} otherwise.
1121 @opencatbox{Categories:}
1122 @category{Predicate functions}
1123 @category{Power series}
1127 @c WHAT IS THIS ABOUT EXACTLY ??
1129 @c -----------------------------------------------------------------------------
1130 @anchor{taylor_logexpand}
1131 @defvr {Option variable} taylor_logexpand
1132 Default value: @code{true}
1134 @code{taylor_logexpand} controls expansions of logarithms in
1135 @code{taylor} series.
1137 When @code{taylor_logexpand} is @code{true}, all logarithms are expanded fully
1138 so that zero-recognition problems involving logarithmic identities do not
1139 disturb the expansion process. However, this scheme is not always
1140 mathematically correct since it ignores branch information.
1142 When @code{taylor_logexpand} is set to @code{false}, then the only expansion of
1143 logarithms that occur is that necessary to obtain a formal power series.
1145 @c NEED EXAMPLES HERE
1146 @opencatbox{Categories:}
1147 @category{Power series}
1148 @category{Exponential and logarithm functions}
1152 @c -----------------------------------------------------------------------------
1153 @anchor{taylor_order_coefficients}
1154 @defvr {Option variable} taylor_order_coefficients
1155 Default value: @code{true}
1157 @code{taylor_order_coefficients} controls the ordering of
1158 coefficients in a Taylor series.
1160 When @code{taylor_order_coefficients} is @code{true},
1161 coefficients of taylor series are ordered canonically.
1162 @c IS MAXIMA'S NOTION OF "CANONICALLY" DESCRIBED ELSEWHERE ??
1163 @c AND WHAT HAPPENS WHEN IT IS FALSE ??
1165 @c NEED EXAMPLES HERE
1166 @opencatbox{Categories:}
1167 @category{Power series}
1171 @c -----------------------------------------------------------------------------
1172 @anchor{taylor_simplifier}
1173 @deffn {Function} taylor_simplifier (@var{expr})
1175 Simplifies coefficients of the power series @var{expr}.
1176 @code{taylor} calls this function.
1178 @opencatbox{Categories:}
1179 @category{Power series}
1183 @c -----------------------------------------------------------------------------
1184 @anchor{taylor_truncate_polynomials}
1185 @defvr {Option variable} taylor_truncate_polynomials
1186 Default value: @code{true}
1188 @c WHAT IS THE "INPUT TRUNCATION LEVEL" ?? THE ARGUMENT n OF taylor ??
1189 When @code{taylor_truncate_polynomials} is @code{true},
1190 polynomials are truncated based upon the input truncation levels.
1193 polynomials input to @code{taylor} are considered to have infinite precision.
1194 @c WHAT IS "INFINITE PRECISION" IN THIS CONTEXT ??
1196 @opencatbox{Categories:}
1197 @category{Power series}
1201 @c -----------------------------------------------------------------------------
1203 @deffn {Function} taytorat (@var{expr})
1205 Converts @var{expr} from @code{taylor} form to canonical rational expression
1206 (CRE) form. The effect is the same as @code{rat (ratdisrep (@var{expr}))}, but
1209 @opencatbox{Categories:}
1210 @category{Power series}
1211 @category{Rational expressions}
1215 @c -----------------------------------------------------------------------------
1217 @deffn {Function} trunc (@var{expr})
1219 Annotates the internal representation of the general expression @var{expr}
1220 so that it is displayed as if its sums were truncated Taylor series.
1221 @var{expr} is not otherwise modified.
1226 (%i1) expr: x^2 + x + 1;
1231 (%o2) 1 + x + x + . . .
1232 (%i3) is (expr = trunc (expr));
1236 @opencatbox{Categories:}
1237 @category{Power series}
1241 @c -----------------------------------------------------------------------------
1243 @deffn {Function} unsum (@var{f}, @var{n})
1245 Returns the first backward difference
1246 @code{@var{f}(@var{n}) - @var{f}(@var{n} - 1)}.
1247 Thus @code{unsum} in a sense is the inverse of @code{sum}.
1249 See also @mrefdot{nusum}
1252 @c GENERATED FROM THE FOLLOWING INPUTS
1253 @c g(p) := p*4^n/binomial(2*n,n);
1255 @c nusum (%, n, 0, n);
1259 (%i1) g(p) := p*4^n/binomial(2*n,n);
1262 (%o1) g(p) := ----------------
1267 (%o2) ----------------
1269 (%i3) nusum (%, n, 0, n);
1271 2 (n + 1) (63 n + 112 n + 18 n - 22 n + 3) 4 2
1272 (%o3) ------------------------------------------------ - ------
1273 693 binomial(2 n, n) 3 11 7
1277 (%o4) ----------------
1281 @opencatbox{Categories:}
1282 @category{Sums and products}
1286 @c -----------------------------------------------------------------------------
1288 @defvr {Option variable} verbose
1289 Default value: @code{false}
1291 When @code{verbose} is @code{true},
1292 @code{powerseries} prints progress messages.
1294 @opencatbox{Categories:}
1295 @category{Power series}
1299 @c -----------------------------------------------------------------------------
1300 @node Introduction to Fourier series, Functions and Variables for Fourier series, Functions and Variables for Series, Sums Products and Series
1301 @section Introduction to Fourier series
1302 @c -----------------------------------------------------------------------------
1304 The @code{fourie} package comprises functions for the symbolic computation
1306 There are functions in the @code{fourie} package to calculate Fourier integral
1307 coefficients and some functions for manipulation of expressions.
1309 @opencatbox{Categories:}
1310 @category{Fourier transform}
1311 @category{Share packages}
1312 @category{Package fourie}
1315 @c -----------------------------------------------------------------------------
1316 @node Functions and Variables for Fourier series, Functions and Variables for Poisson series, Introduction to Fourier series, Sums Products and Series
1317 @section Functions and Variables for Fourier series
1318 @c -----------------------------------------------------------------------------
1322 @c -----------------------------------------------------------------------------
1324 @deffn {Function} equalp (@var{x}, @var{y})
1326 Returns @code{true} if @code{equal (@var{x}, @var{y})} otherwise @code{false}
1327 (doesn't give an error message like @code{equal (x, y)} would do in this case).
1330 @opencatbox{Categories:}
1331 @category{Package fourie}
1335 @c -----------------------------------------------------------------------------
1337 @deffn {Function} remfun @
1338 @fname{remfun} (@var{f}, @var{expr}) @
1339 @fname{remfun} (@var{f}, @var{expr}, @var{x})
1341 @code{remfun (@var{f}, @var{expr})} replaces all occurrences of @code{@var{f}
1342 (@var{arg})} by @var{arg} in @var{expr}.
1344 @code{remfun (@var{f}, @var{expr}, @var{x})} replaces all occurrences of
1345 @code{@var{f} (@var{arg})} by @var{arg} in @var{expr} only if @var{arg} contains
1346 the variable @var{x}.
1349 @opencatbox{Categories:}
1350 @category{Package fourie}
1354 @c -----------------------------------------------------------------------------
1356 @deffn {Function} funp @
1357 @fname{funp} (@var{f}, @var{expr}) @
1358 @fname{funp} (@var{f}, @var{expr}, @var{x})
1360 @code{funp (@var{f}, @var{expr})}
1361 returns @code{true} if @var{expr} contains the function @var{f}.
1363 @code{funp (@var{f}, @var{expr}, @var{x})}
1364 returns @code{true} if @var{expr} contains the function @var{f} and the variable
1365 @var{x} is somewhere in the argument of one of the instances of @var{f}.
1368 @opencatbox{Categories:}
1369 @category{Package fourie}
1373 @c -----------------------------------------------------------------------------
1375 @deffn {Function} absint @
1376 @fname{absint} (@var{f}, @var{x}, @var{halfplane}) @
1377 @fname{absint} (@var{f}, @var{x}) @
1378 @fname{absint} (@var{f}, @var{x}, @var{a}, @var{b})
1380 @code{absint (@var{f}, @var{x}, @var{halfplane})}
1381 returns the indefinite integral of @var{f} with respect to
1382 @var{x} in the given halfplane (@code{pos}, @code{neg}, or @code{both}).
1383 @var{f} may contain expressions of the form
1384 @code{abs (x)}, @code{abs (sin (x))}, @code{abs (a) * exp (-abs (b) * abs (x))}.
1386 @code{absint (@var{f}, @var{x})} is equivalent to
1387 @code{absint (@var{f}, @var{x}, pos)}.
1389 @code{absint (@var{f}, @var{x}, @var{a}, @var{b})} returns the definite integral
1390 of @var{f} with respect to @var{x} from @var{a} to @var{b}.
1391 @c SAME LIST AS ABOVE ??
1392 @var{f} may include absolute values.
1395 @opencatbox{Categories:}
1396 @category{Package fourie}
1397 @category{Integral calculus}
1403 @c -----------------------------------------------------------------------------
1405 @deffn {Function} fourier (@var{f}, @var{x}, @var{p})
1407 Returns a list of the Fourier coefficients of @code{@var{f}(@var{x})} defined
1408 on the interval @code{[-p, p]}.
1411 @opencatbox{Categories:}
1412 @category{Package fourie}
1416 @c NEEDS EXPANSION. WHAT IS THE ARGUMENT l ??
1418 @c -----------------------------------------------------------------------------
1420 @deffn {Function} foursimp (@var{l})
1422 Simplifies @code{sin (n %pi)} to 0 if @code{sinnpiflag} is @code{true} and
1423 @code{cos (n %pi)} to @code{(-1)^n} if @code{cosnpiflag} is @code{true}.
1426 @opencatbox{Categories:}
1427 @category{Package fourie}
1428 @category{Trigonometric functions}
1429 @category{Simplification functions}
1433 @c -----------------------------------------------------------------------------
1435 @defvr {Option variable} sinnpiflag
1436 Default value: @code{true}
1438 See @code{foursimp}.
1440 @opencatbox{Categories:}
1441 @category{Package fourie}
1445 @c -----------------------------------------------------------------------------
1447 @defvr {Option variable} cosnpiflag
1448 Default value: @code{true}
1450 See @code{foursimp}.
1452 @opencatbox{Categories:}
1453 @category{Package fourie}
1457 @c NEEDS EXPANSION. EXPLAIN x AND p HERE (DO NOT REFER SOMEWHERE ELSE)
1459 @c -----------------------------------------------------------------------------
1461 @deffn {Function} fourexpand (@var{l}, @var{x}, @var{p}, @var{limit})
1463 Constructs and returns the Fourier series from the list of Fourier coefficients
1464 @var{l} up through @var{limit} terms (@var{limit} may be @code{inf}). @var{x}
1465 and @var{p} have same meaning as in @code{fourier}.
1468 @opencatbox{Categories:}
1469 @category{Package fourie}
1475 @c -----------------------------------------------------------------------------
1477 @deffn {Function} fourcos (@var{f}, @var{x}, @var{p})
1479 Returns the Fourier cosine coefficients for @code{@var{f}(@var{x})} defined on
1480 @code{[0, @var{p}]}.
1483 @opencatbox{Categories:}
1484 @category{Package fourie}
1490 @c -----------------------------------------------------------------------------
1492 @deffn {Function} foursin (@var{f}, @var{x}, @var{p})
1494 Returns the Fourier sine coefficients for @code{@var{f}(@var{x})} defined on
1495 @code{[0, @var{p}]}.
1498 @opencatbox{Categories:}
1499 @category{Package fourie}
1505 @c -----------------------------------------------------------------------------
1506 @anchor{totalfourier}
1507 @deffn {Function} totalfourier (@var{f}, @var{x}, @var{p})
1509 Returns @code{fourexpand (foursimp (fourier (@var{f}, @var{x}, @var{p})),
1510 @var{x}, @var{p}, 'inf)}.
1513 @opencatbox{Categories:}
1514 @category{Package fourie}
1520 @c -----------------------------------------------------------------------------
1522 @deffn {Function} fourint (@var{f}, @var{x})
1524 Constructs and returns a list of the Fourier integral coefficients of
1525 @code{@var{f}(@var{x})} defined on @code{[minf, inf]}.
1528 @opencatbox{Categories:}
1529 @category{Package fourie}
1535 @c -----------------------------------------------------------------------------
1537 @deffn {Function} fourintcos (@var{f}, @var{x})
1539 Returns the Fourier cosine integral coefficients for @code{@var{f}(@var{x})}
1543 @opencatbox{Categories:}
1544 @category{Package fourie}
1550 @c -----------------------------------------------------------------------------
1552 @deffn {Function} fourintsin (@var{f}, @var{x})
1554 Returns the Fourier sine integral coefficients for @code{@var{f}(@var{x})} on
1558 @opencatbox{Categories:}
1559 @category{Package fourie}
1564 @c -----------------------------------------------------------------------------
1565 @node Functions and Variables for Poisson series, , Functions and Variables for Fourier series, Sums Products and Series
1566 @section Functions and Variables for Poisson series
1567 @c -----------------------------------------------------------------------------
1569 @c NEED EXAMPLES HERE
1571 @c -----------------------------------------------------------------------------
1573 @deffn {Function} intopois (@var{a})
1574 Converts @var{a} into a Poisson encoding.
1576 @opencatbox{Categories:}
1577 @category{Poisson series}
1581 @c NEED EXAMPLES HERE
1583 @c -----------------------------------------------------------------------------
1585 @deffn {Function} outofpois (@var{a})
1587 Converts @var{a} from Poisson encoding to general representation. If @var{a} is
1588 not in Poisson form, @code{outofpois} carries out the conversion,
1589 i.e., the return value is @code{outofpois (intopois (@var{a}))}.
1590 This function is thus a canonical simplifier
1591 for sums of powers of sine and cosine terms of a particular type.
1593 @opencatbox{Categories:}
1594 @category{Poisson series}
1598 @c NEED MORE INFO HERE
1599 @c NEED EXAMPLES HERE
1601 @c -----------------------------------------------------------------------------
1603 @deffn {Function} poisdiff (@var{a}, @var{b})
1605 Differentiates @var{a} with respect to @var{b}. @var{b} must occur only
1606 in the trig arguments or only in the coefficients.
1608 @opencatbox{Categories:}
1609 @category{Poisson series}
1613 @c LOOKING AT THE CODE IN src/pois3.lisp, THIS FCN SEEMS TO COMPUTE THE EXPONENT
1614 @c BY MULTIPLYING IN A LOOP DUNNO HOW WE WANT TO EXPLAIN THAT
1615 @c REPHRASE WITHOUT USING THE TERM "FUNCTIONALLY IDENTICAL"
1617 @c -----------------------------------------------------------------------------
1619 @deffn {Function} poisexpt (@var{a}, @var{b})
1621 Functionally identical to @code{intopois (@var{a}^@var{b})}.
1622 @var{b} must be a positive integer.
1624 @opencatbox{Categories:}
1625 @category{Poisson series}
1629 @c WHAT IS THIS ABOUT ??
1631 @c -----------------------------------------------------------------------------
1633 @deffn {Function} poisint (@var{a}, @var{b})
1635 Integrates in a similarly restricted sense (to @code{poisdiff}). Non-periodic
1636 terms in @var{b} are dropped if @var{b} is in the trig arguments.
1638 @opencatbox{Categories:}
1639 @category{Poisson series}
1643 @c -----------------------------------------------------------------------------
1645 @defvr {Option variable} poislim
1648 @code{poislim} determines the domain of the coefficients in
1649 the arguments of the trig functions. The initial value of 5
1650 corresponds to the interval [-2^(5-1)+1,2^(5-1)], or [-15,16], but it
1651 can be set to [-2^(n-1)+1, 2^(n-1)].
1653 @opencatbox{Categories:}
1654 @category{Poisson series}
1658 @c UMM, WHAT IS THIS ABOUT EXACTLY ?? EXAMPLES NEEDED
1660 @c -----------------------------------------------------------------------------
1662 @deffn {Function} poismap (@var{series}, @var{sinfn}, @var{cosfn})
1664 will map the functions @var{sinfn} on the sine terms and @var{cosfn} on the
1665 cosine terms of the Poisson series given. @var{sinfn} and @var{cosfn} are
1666 functions of two arguments which are a coefficient and a trigonometric part of
1667 a term in series respectively.
1669 @opencatbox{Categories:}
1670 @category{Poisson series}
1674 @c REPHRASE WITHOUT USING THE TERM "FUNCTIONALLY IDENTICAL"
1676 @c -----------------------------------------------------------------------------
1678 @deffn {Function} poisplus (@var{a}, @var{b})
1680 Is functionally identical to @code{intopois (a + b)}.
1682 @opencatbox{Categories:}
1683 @category{Poisson series}
1687 @c -----------------------------------------------------------------------------
1689 @deffn {Function} poissimp (@var{a})
1691 Converts @var{a} into a Poisson series for @var{a} in general
1694 @opencatbox{Categories:}
1695 @category{Poisson series}
1699 @c MORE INFO NEEDED HERE
1701 @c -----------------------------------------------------------------------------
1703 @defvr {Special symbol} poisson
1705 The symbol @code{/P/} follows the line label of Poisson series
1708 @opencatbox{Categories:}
1709 @category{Poisson series}
1713 @c -----------------------------------------------------------------------------
1715 @deffn {Function} poissubst (@var{a}, @var{b}, @var{c})
1717 Substitutes @var{a} for @var{b} in @var{c}. @var{c} is a Poisson series.
1719 (1) Where @var{B} is a variable @var{u}, @var{v}, @var{w}, @var{x}, @var{y},
1720 or @var{z}, then @var{a} must be an expression linear in those variables (e.g.,
1723 (2) Where @var{b} is other than those variables, then @var{a} must also be
1724 free of those variables, and furthermore, free of sines or cosines.
1726 @code{poissubst (@var{a}, @var{b}, @var{c}, @var{d}, @var{n})} is a special type
1727 of substitution which operates on @var{a} and @var{b} as in type (1) above, but
1728 where @var{d} is a Poisson series, expands @code{cos(@var{d})} and
1729 @code{sin(@var{d})} to order @var{n} so as to provide the result of substituting
1730 @code{@var{a} + @var{d}} for @var{b} in @var{c}. The idea is that @var{d} is an
1731 expansion in terms of a small parameter. For example,
1732 @code{poissubst (u, v, cos(v), %e, 3)} yields
1733 @code{cos(u)*(1 - %e^2/2) - sin(u)*(%e - %e^3/6)}.
1735 @opencatbox{Categories:}
1736 @category{Poisson series}
1740 @c REPHRASE WITHOUT USING THE TERM "FUNCTIONALLY IDENTICAL"
1742 @c -----------------------------------------------------------------------------
1744 @deffn {Function} poistimes (@var{a}, @var{b})
1746 Is functionally identical to @code{intopois (@var{a}*@var{b})}.
1748 @opencatbox{Categories:}
1749 @category{Poisson series}
1753 @c HOW DOES THIS WORK ?? NEED MORE INFO AND EXAMPLES
1755 @c -----------------------------------------------------------------------------
1757 @deffn {Function} poistrim ()
1759 is a reserved function name which (if the user has defined
1760 it) gets applied during Poisson multiplication. It is a predicate
1761 function of 6 arguments which are the coefficients of the @var{u}, @var{v}, ..., @var{z}
1762 in a term. Terms for which @code{poistrim} is @code{true} (for the coefficients of
1763 that term) are eliminated during multiplication.
1765 @opencatbox{Categories:}
1766 @category{Poisson series}
1770 @c -----------------------------------------------------------------------------
1772 @deffn {Function} printpois (@var{a})
1774 Prints a Poisson series in a readable format. In common
1775 with @code{outofpois}, it will convert @var{a} into a Poisson encoding first, if
1778 @opencatbox{Categories:}
1779 @category{Poisson series}
1780 @category{Display functions}