1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Maxima 5.45.1 Manual: Functions and Variables for Series</title>
<meta name="description" content="Maxima 5.45.1 Manual: Functions and Variables for Series">
<meta name="keywords" content="Maxima 5.45.1 Manual: Functions and Variables for Series">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="maxima_0.html#Top" rel="start" title="Top">
<link href="maxima_368.html#Function-and-Variable-Index" rel="index" title="Function and Variable Index">
<link href="maxima_toc.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="maxima_132.html#Sums-Products-and-Series" rel="up" title="Sums Products and Series">
<link href="maxima_136.html#Introduction-to-Fourier-series" rel="next" title="Introduction to Fourier series">
<link href="maxima_134.html#Introduction-to-Series" rel="previous" title="Introduction to Series">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
body {color: black; background: white; margin-left: 8%; margin-right: 13%;
font-family: "FreeSans", sans-serif}
h1 {font-size: 150%; font-family: "FreeSans", sans-serif}
h2 {font-size: 125%; font-family: "FreeSans", sans-serif}
h3 {font-size: 100%; font-family: "FreeSans", sans-serif}
a[href] {color: rgb(0,0,255); text-decoration: none;}
a[href]:hover {background: rgb(220,220,220);}
div.textbox {border: solid; border-width: thin; padding-top: 1em;
padding-bottom: 1em; padding-left: 2em; padding-right: 2em}
div.titlebox {border: none; padding-top: 1em; padding-bottom: 1em;
padding-left: 2em; padding-right: 2em; background: rgb(200,255,255);
font-family: sans-serif}
div.synopsisbox {
border: none; padding-top: 1em; padding-bottom: 1em; padding-left: 2em;
padding-right: 2em; background: rgb(255,220,255);}
pre.example {border: 1px solid rgb(180,180,180); padding-top: 1em;
padding-bottom: 1em; padding-left: 1em; padding-right: 1em;
background-color: rgb(238,238,255)}
div.spacerbox {border: none; padding-top: 2em; padding-bottom: 2em}
div.image {margin: 0; padding: 1em; text-align: center}
div.categorybox {border: 1px solid gray; padding-top: 0px; padding-bottom: 0px;
padding-left: 1em; padding-right: 1em; background: rgb(247,242,220)}
img {max-width:80%; max-height: 80%; display: block; margin-left: auto; margin-right: auto}
-->
</style>
<link rel="icon" href="figures/favicon.ico">
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Functions-and-Variables-for-Series"></a>
<div class="header">
<p>
Next: <a href="maxima_136.html#Introduction-to-Fourier-series" accesskey="n" rel="next">Introduction to Fourier series</a>, Previous: <a href="maxima_134.html#Introduction-to-Series" accesskey="p" rel="previous">Introduction to Series</a>, Up: <a href="maxima_132.html#Sums-Products-and-Series" accesskey="u" rel="up">Sums Products and Series</a> [<a href="maxima_toc.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="maxima_368.html#Function-and-Variable-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Functions-and-Variables-for-Series-1"></a>
<h3 class="section">28.3 Functions and Variables for Series</h3>
<a name="cauchysum"></a><a name="Item_003a-Series_002fdefvr_002fcauchysum"></a><dl>
<dt><a name="index-cauchysum"></a>Option variable: <strong>cauchysum</strong></dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When multiplying together sums with <code>inf</code> as their upper limit,
if <code>sumexpand</code> is <code>true</code> and <code>cauchysum</code> is <code>true</code>
then the Cauchy product will be used rather than the usual
product.
In the Cauchy product the index of the inner summation is a
function of the index of the outer one rather than varying
independently.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(%i1) sumexpand: false$
(%i2) cauchysum: false$
</pre><pre class="example">(%i3) s: sum (f(i), i, 0, inf) * sum (g(j), j, 0, inf);
inf inf
==== ====
\ \
(%o3) ( > f(i)) > g(j)
/ /
==== ====
i = 0 j = 0
</pre><pre class="example">(%i4) sumexpand: true$
(%i5) cauchysum: true$
</pre><pre class="example">(%i6) expand(s,0,0);
inf i1
==== ====
\ \
(%o6) > > g(i1 - i2) f(i2)
/ /
==== ====
i1 = 0 i2 = 0
</pre></div>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Sums-and-products">Sums and products</a>
</div></p></dd></dl>
<a name="deftaylor"></a><a name="Item_003a-Series_002fdeffn_002fdeftaylor"></a><dl>
<dt><a name="index-deftaylor"></a>Function: <strong>deftaylor</strong> <em>(<var>f_1</var>(<var>x_1</var>), <var>expr_1</var>, …, <var>f_n</var>(<var>x_n</var>), <var>expr_n</var>)</em></dt>
<dd>
<p>For each function <var>f_i</var> of one variable <var>x_i</var>,
<code>deftaylor</code> defines <var>expr_i</var> as the Taylor series about zero.
<var>expr_i</var> is typically a polynomial in <var>x_i</var> or a summation;
more general expressions are accepted by <code>deftaylor</code> without complaint.
</p>
<p><code>powerseries (<var>f_i</var>(<var>x_i</var>), <var>x_i</var>, 0)</code>
returns the series defined by <code>deftaylor</code>.
</p>
<p><code>deftaylor</code> returns a list of the functions <var>f_1</var>, …, <var>f_n</var>.
<code>deftaylor</code> evaluates its arguments.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(%i1) deftaylor (f(x), x^2 + sum(x^i/(2^i*i!^2), i, 4, inf));
(%o1) [f]
(%i2) powerseries (f(x), x, 0);
inf
==== i1
\ x 2
(%o2) > -------- + x
/ i1 2
==== 2 i1!
i1 = 4
(%i3) taylor (exp (sqrt (f(x))), x, 0, 4);
2 3 4
x 3073 x 12817 x
(%o3)/T/ 1 + x + -- + ------- + -------- + . . .
2 18432 307200
</pre></div>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="maxtayorder"></a><a name="Item_003a-Series_002fdefvr_002fmaxtayorder"></a><dl>
<dt><a name="index-maxtayorder"></a>Option variable: <strong>maxtayorder</strong></dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>maxtayorder</code> is <code>true</code>, then during algebraic
manipulation of (truncated) Taylor series, <code>taylor</code> tries to retain
as many terms as are known to be correct.
</p>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="niceindices"></a><a name="Item_003a-Series_002fdeffn_002fniceindices"></a><dl>
<dt><a name="index-niceindices"></a>Function: <strong>niceindices</strong> <em>(<var>expr</var>)</em></dt>
<dd>
<p>Renames the indices of sums and products in <var>expr</var>. <code>niceindices</code>
attempts to rename each index to the value of <code>niceindicespref[1]</code>, unless
that name appears in the summand or multiplicand, in which case
<code>niceindices</code> tries the succeeding elements of <code>niceindicespref</code> in
turn, until an unused variable is found. If the entire list is exhausted,
additional indices are constructed by appending integers to the value of
<code>niceindicespref[1]</code>, e.g., <code>i0</code>, <code>i1</code>, <code>i2</code>, …
</p>
<p><code>niceindices</code> returns an expression.
<code>niceindices</code> evaluates its argument.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(%i1) niceindicespref;
(%o1) [i, j, k, l, m, n]
(%i2) product (sum (f (foo + i*j*bar), foo, 1, inf), bar, 1, inf);
inf inf
/===\ ====
! ! \
(%o2) ! ! > f(bar i j + foo)
! ! /
bar = 1 ====
foo = 1
(%i3) niceindices (%);
</pre><pre class="example"> inf inf
/===\ ====
! ! \
(%o3) ! ! > f(i j l + k)
! ! /
l = 1 ====
k = 1
</pre></div>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Sums-and-products">Sums and products</a>
</div></p></dd></dl>
<a name="niceindicespref"></a><a name="Item_003a-Series_002fdefvr_002fniceindicespref"></a><dl>
<dt><a name="index-niceindicespref"></a>Option variable: <strong>niceindicespref</strong></dt>
<dd><p>Default value: <code>[i, j, k, l, m, n]</code>
</p>
<p><code>niceindicespref</code> is the list from which <code>niceindices</code>
takes the names of indices for sums and products.
</p>
<p>The elements of <code>niceindicespref</code> are typically names of variables,
although that is not enforced by <code>niceindices</code>.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(%i1) niceindicespref: [p, q, r, s, t, u]$
(%i2) product (sum (f (foo + i*j*bar), foo, 1, inf), bar, 1, inf);
inf inf
/===\ ====
! ! \
(%o2) ! ! > f(bar i j + foo)
! ! /
bar = 1 ====
foo = 1
(%i3) niceindices (%);
inf inf
/===\ ====
! ! \
(%o3) ! ! > f(i j q + p)
! ! /
q = 1 ====
p = 1
</pre></div>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Sums-and-products">Sums and products</a>
</div></p></dd></dl>
<a name="nusum"></a><a name="Item_003a-Series_002fdeffn_002fnusum"></a><dl>
<dt><a name="index-nusum"></a>Function: <strong>nusum</strong> <em>(<var>expr</var>, <var>x</var>, <var>i_0</var>, <var>i_1</var>)</em></dt>
<dd>
<p>Carries out indefinite hypergeometric summation of <var>expr</var> with
respect to <var>x</var> using a decision procedure due to R.W. Gosper.
<var>expr</var> and the result must be expressible as products of integer powers,
factorials, binomials, and rational functions.
</p>
<p>The terms "definite"
and "indefinite summation" are used analogously to "definite" and
"indefinite integration".
To sum indefinitely means to give a symbolic result
for the sum over intervals of variable length, not just e.g. 0 to
inf. Thus, since there is no formula for the general partial sum of
the binomial series, <code>nusum</code> can’t do it.
</p>
<p><code>nusum</code> and <code>unsum</code> know a little about sums and differences of
finite products. See also <code><a href="#unsum">unsum</a></code>.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">(%i1) nusum (n*n!, n, 0, n);
Dependent equations eliminated: (1)
(%o1) (n + 1)! - 1
(%i2) nusum (n^4*4^n/binomial(2*n,n), n, 0, n);
4 3 2 n
2 (n + 1) (63 n + 112 n + 18 n - 22 n + 3) 4 2
(%o2) ------------------------------------------------ - ------
693 binomial(2 n, n) 3 11 7
(%i3) unsum (%, n);
4 n
n 4
(%o3) ----------------
binomial(2 n, n)
(%i4) unsum (prod (i^2, i, 1, n), n);
n - 1
/===\
! ! 2
(%o4) ( ! ! i ) (n - 1) (n + 1)
! !
i = 1
(%i5) nusum (%, n, 1, n);
Dependent equations eliminated: (2 3)
n
/===\
! ! 2
(%o5) ! ! i - 1
! !
i = 1
</pre></div>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Sums-and-products">Sums and products</a>
</div></p></dd></dl>
<a name="pade"></a><a name="Item_003a-Series_002fdeffn_002fpade"></a><dl>
<dt><a name="index-pade"></a>Function: <strong>pade</strong> <em>(<var>taylor_series</var>, <var>numer_deg_bound</var>, <var>denom_deg_bound</var>)</em></dt>
<dd>
<p>Returns a list of
all rational functions which have the given Taylor series expansion
where the sum of the degrees of the numerator and the denominator is
less than or equal to the truncation level of the power series, i.e.
are "best" approximants, and which additionally satisfy the specified
degree bounds.
</p>
<p><var>taylor_series</var> is an univariate Taylor series.
<var>numer_deg_bound</var> and <var>denom_deg_bound</var>
are positive integers specifying degree bounds on
the numerator and denominator.
</p>
<p><var>taylor_series</var> can also be a Laurent series, and the degree
bounds can be <code>inf</code> which causes all rational functions whose total
degree is less than or equal to the length of the power series to be
returned. Total degree is defined as <code><var>numer_deg_bound</var> +
<var>denom_deg_bound</var></code>.
Length of a power series is defined as
<code>"truncation level" + 1 - min(0, "order of series")</code>.
</p>
<div class="example">
<pre class="example">(%i1) taylor (1 + x + x^2 + x^3, x, 0, 3);
2 3
(%o1)/T/ 1 + x + x + x + . . .
(%i2) pade (%, 1, 1);
1
(%o2) [- -----]
x - 1
(%i3) t: taylor(-(83787*x^10 - 45552*x^9 - 187296*x^8
+ 387072*x^7 + 86016*x^6 - 1507328*x^5
+ 1966080*x^4 + 4194304*x^3 - 25165824*x^2
+ 67108864*x - 134217728)
/134217728, x, 0, 10);
2 3 4 5 6 7
x 3 x x 15 x 23 x 21 x 189 x
(%o3)/T/ 1 - - + ---- - -- - ----- + ----- - ----- - ------
2 16 32 1024 2048 32768 65536
8 9 10
5853 x 2847 x 83787 x
+ ------- + ------- - --------- + . . .
4194304 8388608 134217728
(%i4) pade (t, 4, 4);
(%o4) []
</pre></div>
<p>There is no rational function of degree 4 numerator/denominator, with this
power series expansion. You must in general have degree of the numerator and
degree of the denominator adding up to at least the degree of the power series,
in order to have enough unknown coefficients to solve.
</p>
<div class="example">
<pre class="example">(%i5) pade (t, 5, 5);
5 4 3
(%o5) [- (520256329 x - 96719020632 x - 489651410240 x
2
- 1619100813312 x - 2176885157888 x - 2386516803584)
5 4 3
/(47041365435 x + 381702613848 x + 1360678489152 x
2
+ 2856700692480 x + 3370143559680 x + 2386516803584)]
</pre></div>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="powerseries"></a><a name="Item_003a-Series_002fdeffn_002fpowerseries"></a><dl>
<dt><a name="index-powerseries"></a>Function: <strong>powerseries</strong> <em>(<var>expr</var>, <var>x</var>, <var>a</var>)</em></dt>
<dd>
<p>Returns the general form of the power series expansion for <var>expr</var> in the
variable <var>x</var> about the point <var>a</var> (which may be <code>inf</code> for infinity):
</p><div class="example">
<pre class="example"> inf
====
\ n
> b (x - a)
/ n
====
n = 0
</pre></div>
<p>If <code>powerseries</code> is unable to expand <var>expr</var>,
<code>taylor</code> may give the first several terms of the series.
</p>
<p>When <code>verbose</code> is <code>true</code>,
<code>powerseries</code> prints progress messages.
</p>
<div class="example">
<pre class="example">(%i1) verbose: true$
(%i2) powerseries (log(sin(x)/x), x, 0);
can't expand
log(sin(x))
so we'll try again after applying the rule:
d
/ -- (sin(x))
[ dx
log(sin(x)) = i ----------- dx
] sin(x)
/
in the first simplification we have returned:
/
[
i cot(x) dx - log(x)
]
/
inf
==== i1 2 i1 2 i1
\ (- 1) 2 bern(2 i1) x
> ------------------------------
/ i1 (2 i1)!
====
i1 = 1
(%o2) -------------------------------------
2
</pre></div>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="psexpand"></a><a name="Item_003a-Series_002fdefvr_002fpsexpand"></a><dl>
<dt><a name="index-psexpand"></a>Option variable: <strong>psexpand</strong></dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>psexpand</code> is <code>true</code>,
an extended rational function expression is displayed fully expanded.
The switch <code>ratexpand</code> has the same effect.
</p>
<p>When <code>psexpand</code> is <code>false</code>,
a multivariate expression is displayed just as in the rational function package.
</p>
<p>When <code>psexpand</code> is <code>multi</code>,
then terms with the same total degree in the variables are grouped together.
</p>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Display-flags-and-variables">Display flags and variables</a>
</div></p></dd></dl>
<a name="revert"></a><a name="Item_003a-Series_002fdeffn_002frevert"></a><dl>
<dt><a name="index-revert"></a>Function: <strong>revert</strong> <em>(<var>expr</var>, <var>x</var>)</em></dt>
<dd><a name="Item_003a-Series_002fdeffn_002frevert2"></a></dd><dt><a name="index-revert2"></a>Function: <strong>revert2</strong> <em>(<var>expr</var>, <var>x</var>, <var>n</var>)</em></dt>
<dd>
<p>These functions return the reversion of <var>expr</var>, a Taylor series about zero
in the variable <var>x</var>. <code>revert</code> returns a polynomial of degree equal to
the highest power in <var>expr</var>. <code>revert2</code> returns a polynomial of degree
<var>n</var>, which may be greater than, equal to, or less than the degree of
<var>expr</var>.
</p>
<p><code>load ("revert")</code> loads these functions.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">(%i1) load ("revert")$
(%i2) t: taylor (exp(x) - 1, x, 0, 6);
2 3 4 5 6
x x x x x
(%o2)/T/ x + -- + -- + -- + --- + --- + . . .
2 6 24 120 720
(%i3) revert (t, x);
6 5 4 3 2
10 x - 12 x + 15 x - 20 x + 30 x - 60 x
(%o3)/R/ - --------------------------------------------
60
(%i4) ratexpand (%);
6 5 4 3 2
x x x x x
(%o4) - -- + -- - -- + -- - -- + x
6 5 4 3 2
(%i5) taylor (log(x+1), x, 0, 6);
2 3 4 5 6
x x x x x
(%o5)/T/ x - -- + -- - -- + -- - -- + . . .
2 3 4 5 6
(%i6) ratsimp (revert (t, x) - taylor (log(x+1), x, 0, 6));
(%o6) 0
(%i7) revert2 (t, x, 4);
4 3 2
x x x
(%o7) - -- + -- - -- + x
4 3 2
</pre></div>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="taylor"></a><a name="Item_003a-Series_002fdeffn_002ftaylor"></a><dl>
<dt><a name="index-taylor"></a>Function: <strong>taylor</strong> <em><br> <tt>taylor</tt> (<var>expr</var>, <var>x</var>, <var>a</var>, <var>n</var>) <br> <tt>taylor</tt> (<var>expr</var>, [<var>x_1</var>, <var>x_2</var>, …], <var>a</var>, <var>n</var>) <br> <tt>taylor</tt> (<var>expr</var>, [<var>x</var>, <var>a</var>, <var>n</var>, 'asymp]) <br> <tt>taylor</tt> (<var>expr</var>, [<var>x_1</var>, <var>x_2</var>, …], [<var>a_1</var>, <var>a_2</var>, …], [<var>n_1</var>, <var>n_2</var>, …]) <br> <tt>taylor</tt> (<var>expr</var>, [<var>x_1</var>, <var>a_1</var>, <var>n_1</var>], [<var>x_2</var>, <var>a_2</var>, <var>n_2</var>], …)</em></dt>
<dd>
<p><code>taylor (<var>expr</var>, <var>x</var>, <var>a</var>, <var>n</var>)</code> expands the expression
<var>expr</var> in a truncated Taylor or Laurent series in the variable <var>x</var>
around the point <var>a</var>,
containing terms through <code>(<var>x</var> - <var>a</var>)^<var>n</var></code>.
</p>
<p>If <var>expr</var> is of the form <code><var>f</var>(<var>x</var>)/<var>g</var>(<var>x</var>)</code> and
<code><var>g</var>(<var>x</var>)</code> has no terms up to degree <var>n</var> then <code>taylor</code>
attempts to expand <code><var>g</var>(<var>x</var>)</code> up to degree <code>2 <var>n</var></code>.
If there are still no nonzero terms, <code>taylor</code> doubles the degree of the
expansion of <code><var>g</var>(<var>x</var>)</code> so long as the degree of the expansion is
less than or equal to <code><var>n</var> 2^taylordepth</code>.
</p>
<p><code>taylor (<var>expr</var>, [<var>x_1</var>, <var>x_2</var>, ...], <var>a</var>, <var>n</var>)</code>
returns a truncated power series
of degree <var>n</var> in all variables <var>x_1</var>, <var>x_2</var>, …
about the point <code>(<var>a</var>, <var>a</var>, ...)</code>.
</p>
<p><code>taylor (<var>expr</var>, [<var>x_1</var>, <var>a_1</var>, <var>n_1</var>], [<var>x_2</var>,
<var>a_2</var>, <var>n_2</var>], ...)</code> returns a truncated power series in the variables
<var>x_1</var>, <var>x_2</var>, … about the point
<code>(<var>a_1</var>, <var>a_2</var>, ...)</code>, truncated at <var>n_1</var>, <var>n_2</var>, …
</p>
<p><code>taylor (<var>expr</var>, [<var>x_1</var>, <var>x_2</var>, ...], [<var>a_1</var>,
<var>a_2</var>, ...], [<var>n_1</var>, <var>n_2</var>, ...])</code> returns a truncated power series
in the variables <var>x_1</var>, <var>x_2</var>, … about the point
<code>(<var>a_1</var>, <var>a_2</var>, ...)</code>, truncated at <var>n_1</var>, <var>n_2</var>, …
</p>
<p><code>taylor (<var>expr</var>, [<var>x</var>, <var>a</var>, <var>n</var>, 'asymp])</code> returns an
expansion of <var>expr</var> in negative powers of <code><var>x</var> - <var>a</var></code>.
The highest order term is <code>(<var>x</var> - <var>a</var>)^<var>-n</var></code>.
</p>
<p>When <code>maxtayorder</code> is <code>true</code>, then during algebraic
manipulation of (truncated) Taylor series, <code>taylor</code> tries to retain
as many terms as are known to be correct.
</p>
<p>When <code>psexpand</code> is <code>true</code>,
an extended rational function expression is displayed fully expanded.
The switch <code>ratexpand</code> has the same effect.
When <code>psexpand</code> is <code>false</code>,
a multivariate expression is displayed just as in the rational function package.
When <code>psexpand</code> is <code>multi</code>,
then terms with the same total degree in the variables are grouped together.
</p>
<p>See also the <code><a href="#taylor_005flogexpand">taylor_logexpand</a></code> switch for controlling expansion.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">(%i1) taylor (sqrt (sin(x) + a*x + 1), x, 0, 3);
2 2
(a + 1) x (a + 2 a + 1) x
(%o1)/T/ 1 + --------- - -----------------
2 8
3 2 3
(3 a + 9 a + 9 a - 1) x
+ -------------------------- + . . .
48
(%i2) %^2;
3
x
(%o2)/T/ 1 + (a + 1) x - -- + . . .
6
(%i3) taylor (sqrt (x + 1), x, 0, 5);
2 3 4 5
x x x 5 x 7 x
(%o3)/T/ 1 + - - -- + -- - ---- + ---- + . . .
2 8 16 128 256
(%i4) %^2;
(%o4)/T/ 1 + x + . . .
(%i5) product ((1 + x^i)^2.5, i, 1, inf)/(1 + x^2);
</pre><pre class="example"> inf
/===\
! ! i 2.5
! ! (x + 1)
! !
i = 1
(%o5) -----------------
2
x + 1
</pre><pre class="example">(%i6) ev (taylor(%, x, 0, 3), keepfloat);
2 3
(%o6)/T/ 1 + 2.5 x + 3.375 x + 6.5625 x + . . .
(%i7) taylor (1/log (x + 1), x, 0, 3);
2 3
1 1 x x 19 x
(%o7)/T/ - + - - -- + -- - ----- + . . .
x 2 12 24 720
(%i8) taylor (cos(x) - sec(x), x, 0, 5);
4
2 x
(%o8)/T/ - x - -- + . . .
6
(%i9) taylor ((cos(x) - sec(x))^3, x, 0, 5);
(%o9)/T/ 0 + . . .
(%i10) taylor (1/(cos(x) - sec(x))^3, x, 0, 5);
2 4
1 1 11 347 6767 x 15377 x
(%o10)/T/ - -- + ---- + ------ - ----- - ------- - --------
6 4 2 15120 604800 7983360
x 2 x 120 x
+ . . .
(%i11) taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6);
2 2 4 2 4
k x (3 k - 4 k ) x
(%o11)/T/ 1 - ----- - ----------------
2 24
6 4 2 6
(45 k - 60 k + 16 k ) x
- -------------------------- + . . .
720
(%i12) taylor ((x + 1)^n, x, 0, 4);
</pre><pre class="example"> 2 2 3 2 3
(n - n) x (n - 3 n + 2 n) x
(%o12)/T/ 1 + n x + ----------- + --------------------
2 6
4 3 2 4
(n - 6 n + 11 n - 6 n) x
+ ---------------------------- + . . .
24
</pre><pre class="example">(%i13) taylor (sin (y + x), x, 0, 3, y, 0, 3);
3 2
y y
(%o13)/T/ y - -- + . . . + (1 - -- + . . .) x
6 2
3 2
y y 2 1 y 3
+ (- - + -- + . . .) x + (- - + -- + . . .) x + . . .
2 12 6 12
(%i14) taylor (sin (y + x), [x, y], 0, 3);
3 2 2 3
x + 3 y x + 3 y x + y
(%o14)/T/ y + x - ------------------------- + . . .
6
(%i15) taylor (1/sin (y + x), x, 0, 3, y, 0, 3);
1 y 1 1 1 2
(%o15)/T/ - + - + . . . + (- -- + - + . . .) x + (-- + . . .) x
y 6 2 6 3
y y
1 3
+ (- -- + . . .) x + . . .
4
y
(%i16) taylor (1/sin (y + x), [x, y], 0, 3);
3 2 2 3
1 x + y 7 x + 21 y x + 21 y x + 7 y
(%o16)/T/ ----- + ----- + ------------------------------- + . . .
x + y 6 360
</pre></div>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="taylordepth"></a><a name="Item_003a-Series_002fdefvr_002ftaylordepth"></a><dl>
<dt><a name="index-taylordepth"></a>Option variable: <strong>taylordepth</strong></dt>
<dd><p>Default value: 3
</p>
<p>If there are still no nonzero terms, <code>taylor</code> doubles the degree of the
expansion of <code><var>g</var>(<var>x</var>)</code> so long as the degree of the expansion is
less than or equal to <code><var>n</var> 2^taylordepth</code>.
</p>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="taylorinfo"></a><a name="Item_003a-Series_002fdeffn_002ftaylorinfo"></a><dl>
<dt><a name="index-taylorinfo"></a>Function: <strong>taylorinfo</strong> <em>(<var>expr</var>)</em></dt>
<dd>
<p>Returns information about the Taylor series <var>expr</var>.
The return value is a list of lists.
Each list comprises the name of a variable,
the point of expansion, and the degree of the expansion.
</p>
<p><code>taylorinfo</code> returns <code>false</code> if <var>expr</var> is not a Taylor series.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(%i1) taylor ((1 - y^2)/(1 - x), x, 0, 3, [y, a, inf]);
2 2
(%o1)/T/ - (y - a) - 2 a (y - a) + (1 - a )
2 2
+ (1 - a - 2 a (y - a) - (y - a) ) x
2 2 2
+ (1 - a - 2 a (y - a) - (y - a) ) x
2 2 3
+ (1 - a - 2 a (y - a) - (y - a) ) x + . . .
(%i2) taylorinfo(%);
(%o2) [[y, a, inf], [x, 0, 3]]
</pre></div>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="taylorp"></a><a name="Item_003a-Series_002fdeffn_002ftaylorp"></a><dl>
<dt><a name="index-taylorp"></a>Function: <strong>taylorp</strong> <em>(<var>expr</var>)</em></dt>
<dd>
<p>Returns <code>true</code> if <var>expr</var> is a Taylor series,
and <code>false</code> otherwise.
</p>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Predicate-functions">Predicate functions</a>
·<a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="taylor_005flogexpand"></a><a name="Item_003a-Series_002fdefvr_002ftaylor_005flogexpand"></a><dl>
<dt><a name="index-taylor_005flogexpand"></a>Option variable: <strong>taylor_logexpand</strong></dt>
<dd><p>Default value: <code>true</code>
</p>
<p><code>taylor_logexpand</code> controls expansions of logarithms in
<code>taylor</code> series.
</p>
<p>When <code>taylor_logexpand</code> is <code>true</code>, all logarithms are expanded fully
so that zero-recognition problems involving logarithmic identities do not
disturb the expansion process. However, this scheme is not always
mathematically correct since it ignores branch information.
</p>
<p>When <code>taylor_logexpand</code> is set to <code>false</code>, then the only expansion of
logarithms that occur is that necessary to obtain a formal power series.
</p>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
·<a href="maxima_369.html#Category_003a-Exponential-and-logarithm-functions">Exponential and logarithm functions</a>
</div></p></dd></dl>
<a name="taylor_005forder_005fcoefficients"></a><a name="Item_003a-Series_002fdefvr_002ftaylor_005forder_005fcoefficients"></a><dl>
<dt><a name="index-taylor_005forder_005fcoefficients"></a>Option variable: <strong>taylor_order_coefficients</strong></dt>
<dd><p>Default value: <code>true</code>
</p>
<p><code>taylor_order_coefficients</code> controls the ordering of
coefficients in a Taylor series.
</p>
<p>When <code>taylor_order_coefficients</code> is <code>true</code>,
coefficients of taylor series are ordered canonically.
</p>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="taylor_005fsimplifier"></a><a name="Item_003a-Series_002fdeffn_002ftaylor_005fsimplifier"></a><dl>
<dt><a name="index-taylor_005fsimplifier"></a>Function: <strong>taylor_simplifier</strong> <em>(<var>expr</var>)</em></dt>
<dd>
<p>Simplifies coefficients of the power series <var>expr</var>.
<code>taylor</code> calls this function.
</p>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="taylor_005ftruncate_005fpolynomials"></a><a name="Item_003a-Series_002fdefvr_002ftaylor_005ftruncate_005fpolynomials"></a><dl>
<dt><a name="index-taylor_005ftruncate_005fpolynomials"></a>Option variable: <strong>taylor_truncate_polynomials</strong></dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>taylor_truncate_polynomials</code> is <code>true</code>,
polynomials are truncated based upon the input truncation levels.
</p>
<p>Otherwise,
polynomials input to <code>taylor</code> are considered to have infinite precision.
</p>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="taytorat"></a><a name="Item_003a-Series_002fdeffn_002ftaytorat"></a><dl>
<dt><a name="index-taytorat"></a>Function: <strong>taytorat</strong> <em>(<var>expr</var>)</em></dt>
<dd>
<p>Converts <var>expr</var> from <code>taylor</code> form to canonical rational expression
(CRE) form. The effect is the same as <code>rat (ratdisrep (<var>expr</var>))</code>, but
faster.
</p>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
·<a href="maxima_369.html#Category_003a-Rational-expressions">Rational expressions</a>
</div></p></dd></dl>
<a name="trunc"></a><a name="Item_003a-Series_002fdeffn_002ftrunc"></a><dl>
<dt><a name="index-trunc"></a>Function: <strong>trunc</strong> <em>(<var>expr</var>)</em></dt>
<dd>
<p>Annotates the internal representation of the general expression <var>expr</var>
so that it is displayed as if its sums were truncated Taylor series.
<var>expr</var> is not otherwise modified.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(%i1) expr: x^2 + x + 1;
2
(%o1) x + x + 1
(%i2) trunc (expr);
2
(%o2) 1 + x + x + . . .
(%i3) is (expr = trunc (expr));
(%o3) true
</pre></div>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="unsum"></a><a name="Item_003a-Series_002fdeffn_002funsum"></a><dl>
<dt><a name="index-unsum"></a>Function: <strong>unsum</strong> <em>(<var>f</var>, <var>n</var>)</em></dt>
<dd>
<p>Returns the first backward difference
<code><var>f</var>(<var>n</var>) - <var>f</var>(<var>n</var> - 1)</code>.
Thus <code>unsum</code> in a sense is the inverse of <code>sum</code>.
</p>
<p>See also <code><a href="#nusum">nusum</a></code>.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">(%i1) g(p) := p*4^n/binomial(2*n,n);
n
p 4
(%o1) g(p) := ----------------
binomial(2 n, n)
(%i2) g(n^4);
4 n
n 4
(%o2) ----------------
binomial(2 n, n)
(%i3) nusum (%, n, 0, n);
4 3 2 n
2 (n + 1) (63 n + 112 n + 18 n - 22 n + 3) 4 2
(%o3) ------------------------------------------------ - ------
693 binomial(2 n, n) 3 11 7
(%i4) unsum (%, n);
4 n
n 4
(%o4) ----------------
binomial(2 n, n)
</pre></div>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Sums-and-products">Sums and products</a>
</div></p></dd></dl>
<a name="verbose"></a><a name="Item_003a-Series_002fdefvr_002fverbose"></a><dl>
<dt><a name="index-verbose"></a>Option variable: <strong>verbose</strong></dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>verbose</code> is <code>true</code>,
<code>powerseries</code> prints progress messages.
</p>
<div class=categorybox>·<p>Categories: <a href="maxima_369.html#Category_003a-Power-series">Power series</a>
</div></p></dd></dl>
<a name="Item_003a-Series_002fnode_002fIntroduction-to-Fourier-series"></a><hr>
<div class="header">
<p>
Next: <a href="maxima_136.html#Introduction-to-Fourier-series" accesskey="n" rel="next">Introduction to Fourier series</a>, Previous: <a href="maxima_134.html#Introduction-to-Series" accesskey="p" rel="previous">Introduction to Series</a>, Up: <a href="maxima_132.html#Sums-Products-and-Series" accesskey="u" rel="up">Sums Products and Series</a> [<a href="maxima_toc.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="maxima_368.html#Function-and-Variable-Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|