/usr/share/doc/maxima-doc/html/maxima_73.html is in maxima-doc 5.32.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on January, 10 2014 by texi2html 1.76 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>
-->
<head>
<title>Maxima 5.32.1 Manual: 73. simplification</title>
<meta name="description" content="Maxima 5.32.1 Manual: 73. simplification">
<meta name="keywords" content="Maxima 5.32.1 Manual: 73. simplification">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.76">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
body
{
color: black;
background: white;
margin-left: 8%;
margin-right: 13%;
}
h1
{
margin-left: +8%;
font-size: 150%;
font-family: sans-serif
}
h2
{
font-size: 125%;
font-family: sans-serif
}
h3
{
font-size: 100%;
font-family: sans-serif
}
h2,h3,h4,h5,h6 { margin-left: +4%; }
div.textbox
{
border: solid;
border-width: thin;
/* width: 100%; */
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);
/*background: rgb(200,255,255); */
/* font-family: fixed */
}
pre.example
{
border: 1px solid gray;
padding-top: 1em;
padding-bottom: 1em;
padding-left: 1em;
padding-right: 1em;
/* background: rgb(247,242,180); */ /* kind of sandy */
/* background: rgb(200,255,255); */ /* sky blue */
background-color: #F1F5F9; /* light blue-gray */
/* font-family: "Lucida Console", monospace */
}
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);
}
-->
</style>
<link rel="icon" href="http://maxima.sourceforge.net/favicon.ico"/>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="simplification"></a>
<a name="SEC342"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_72.html#SEC341" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC343" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima_72.html#SEC339" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_74.html#SEC351" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 73. simplification </h1>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC343">73.1 Introduction to simplification</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC344">73.2 Package absimp</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC345">73.3 Package facexp</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC346">73.4 Package functs</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC347">73.5 Package ineq</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC348">73.6 Package rducon</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC349">73.7 Package scifac</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC350">73.8 Package sqdnst</a></td><td> </td><td align="left" valign="top">
</td></tr>
</table>
<p><a name="Item_003a-Introduction-to-simplification"></a>
</p><hr size="6">
<a name="Introduction-to-simplification"></a>
<a name="SEC343"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC342" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC344" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC342" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC342" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_74.html#SEC351" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 73.1 Introduction to simplification </h2>
<p>The directory <code>maxima/share/simplification</code> contains several scripts
which implement simplification rules and functions,
and also some functions not related to simplification.
</p>
<p><a name="Item_003a-Package-absimp"></a>
</p><hr size="6">
<a name="Package-absimp"></a>
<a name="SEC344"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC343" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC345" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC342" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC342" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_74.html#SEC351" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 73.2 Package absimp </h2>
<p>The <code>absimp</code> package contains pattern-matching rules that
extend the built-in simplification rules for the <code>abs</code> and <code>signum</code>
functions.
<code>absimp</code> respects relations
established with the built-in <code>assume</code> function and by declarations such
as <code>modedeclare (m, even, n, odd)</code> for even or odd integers.
</p>
<p><code>absimp</code> defines <code>unitramp</code> and <code>unitstep</code> functions
in terms of <code>abs</code> and <code>signum</code>.
</p>
<p><code>load (absimp)</code> loads this package.
<code>demo (absimp)</code> shows a demonstration of this package.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) load (absimp)$
(%i2) (abs (x))^2;
2
(%o2) x
(%i3) diff (abs (x), x);
x
(%o3) ------
abs(x)
(%i4) cosh (abs (x));
(%o4) cosh(x)
</pre>
<div class=categorybox>
·
<p>@ref{Category: Simplification functions} ·
@ref{Category: Rules and patterns} ·
@ref{Category: Share packages} ·
@ref{Category: Package absimp}
</div>
</p>
<p><a name="Item_003a-Package-facexp"></a>
</p><hr size="6">
<a name="Package-facexp"></a>
<a name="SEC345"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC344" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC346" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC342" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC342" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_74.html#SEC351" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 73.3 Package facexp </h2>
<p>The <code>facexp</code> package contains several related functions that
provide the user with the ability to structure expressions by controlled
expansion. This capability is especially useful when the expression
contains variables that have physical meaning, because it is often true
that the most economical form of such an expression can be obtained by
fully expanding the expression with respect to those variables, and then
factoring their coefficients. While it is true that this procedure is
not difficult to carry out using standard Maxima functions, additional
fine-tuning may also be desirable, and these finishing touches can be
more difficult to apply.
</p>
<p>The function <code>facsum</code> and its related forms
provide a convenient means for controlling the structure of expressions
in this way. Another function, <code>collectterms</code>, can be used to add two or
more expressions that have already been simplified to this form, without
resimplifying the whole expression again. This function may be
useful when the expressions are very large.
</p>
<p><code>load (facexp)</code> loads this package.
<code>demo (facexp)</code> shows a demonstration of this package.
</p>
<div class=categorybox>
·
<p>@ref{Category: Expressions} ·
@ref{Category: Share packages} ·
@ref{Category: Package facexp}
</div>
</p>
<p><a name="Item_003a-facsum"></a>
</p><dl>
<dt><u>Function:</u> <b>facsum</b><i> (<var>expr</var>, <var>arg_1</var>, ..., <var>arg_n</var>)</i>
<a name="IDX2635"></a>
</dt>
<dd><p>Returns a form of <var>expr</var> which depends on the
arguments <var>arg_1</var>, ..., <var>arg_n</var>.
The arguments can be any form suitable for <code>ratvars</code>, or they can be
lists of such forms. If the arguments are not lists, then the form
returned is fully expanded with respect to the arguments, and the
coefficients of the arguments are factored. These coefficients are
free of the arguments, except perhaps in a non-rational sense.
</p>
<p>If any of the arguments are lists, then all such lists are combined
into a single list, and instead of calling <code>factor</code> on the
coefficients of the arguments, <code>facsum</code> calls itself on these
coefficients, using this newly constructed single list as the new
argument list for this recursive call. This process can be repeated to
arbitrary depth by nesting the desired elements in lists.
</p>
<p>It is possible that one may wish to <code>facsum</code> with respect to more
complicated subexpressions, such as <code>log (x + y)</code>. Such arguments are
also permissible.
</p>
<p>Occasionally the user may wish to obtain any of the above forms
for expressions which are specified only by their leading operators.
For example, one may wish to <code>facsum</code> with respect to all <code>log</code>'s. In
this situation, one may include among the arguments either the specific
<code>log</code>'s which are to be treated in this way, or alternatively, either
the expression <code>operator (log)</code> or <code>'operator (log)</code>. If one wished to
<code>facsum</code> the expression <var>expr</var> with respect to the operators <var>op_1</var>, ..., <var>op_n</var>,
one would evaluate <code>facsum (<var>expr</var>, operator (<var>op_1</var>, ..., <var>op_n</var>))</code>.
The <code>operator</code> form may also appear inside list arguments.
</p>
<p>In addition, the setting of the switches <code>facsum_combine</code> and
<code>nextlayerfactor</code> may affect the result of <code>facsum</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package facexp} ·
@ref{Category: Expressions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-nextlayerfactor"></a>
</p><dl>
<dt><u>Global variable:</u> <b>nextlayerfactor</b>
<a name="IDX2636"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>nextlayerfactor</code> is <code>true</code>, recursive calls of <code>facsum</code>
are applied to the factors of the factored form of the
coefficients of the arguments.
</p>
<p>When <code>false</code>, <code>facsum</code> is applied to
each coefficient as a whole whenever recusive calls to <code>facsum</code> occur.
</p>
<p>Inclusion of the atom
<code>nextlayerfactor</code> in the argument list of <code>facsum</code> has the effect of
<code>nextlayerfactor: true</code>, but for the next level of the expression <i>only</i>.
Since <code>nextlayerfactor</code> is always bound to either <code>true</code> or <code>false</code>, it
must be presented single-quoted whenever it appears in the argument list of <code>facsum</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package facexp} ·
@ref{Category: Expressions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-facsum_005fcombine"></a>
</p><dl>
<dt><u>Global variable:</u> <b>facsum_combine</b>
<a name="IDX2637"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p><code>facsum_combine</code> controls the form of the final result returned by
<code>facsum</code> when its argument is a quotient of polynomials. If
<code>facsum_combine</code> is <code>false</code> then the form will be returned as a fully
expanded sum as described above, but if <code>true</code>, then the expression
returned is a ratio of polynomials, with each polynomial in the form
described above.
</p>
<p>The <code>true</code> setting of this switch is useful when one
wants to <code>facsum</code> both the numerator and denominator of a rational
expression, but does not want the denominator to be multiplied
through the terms of the numerator.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package facexp} ·
@ref{Category: Expressions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-factorfacsum"></a>
</p><dl>
<dt><u>Function:</u> <b>factorfacsum</b><i> (<var>expr</var>, <var>arg_1</var>, ... <var>arg_n</var>)</i>
<a name="IDX2638"></a>
</dt>
<dd><p>Returns a form of <var>expr</var> which is
obtained by calling <code>facsum</code> on the factors of <var>expr</var> with <var>arg_1</var>, ... <var>arg_n</var> as
arguments. If any of the factors of <var>expr</var> is raised to a power, both
the factor and the exponent will be processed in this way.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package facexp} ·
@ref{Category: Expressions}
</div>
</p>
</dd></dl>
<p><a name="collectterms"></a>
<a name="Item_003a-collectterms"></a>
</p><dl>
<dt><u>Function:</u> <b>collectterms</b><i> (<var>expr</var>, <var>arg_1</var>, …, <var>arg_n</var>)</i>
<a name="IDX2639"></a>
</dt>
<dd><p>If several expressions have been simplified with the following functions
<code>facsum</code>, <code>factorfacsum</code>, <code>factenexpand</code>, <code>facexpten</code> or
<code>factorfacexpten</code>, and they are to be added together, it may be desirable
to combine them using the function <code>collecterms</code>. <code>collecterms</code> can
take as arguments all of the arguments that can be given to these other
associated functions with the exception of <code>nextlayerfactor</code>, which has no
effect on <code>collectterms</code>. The advantage of <code>collectterms</code> is that it
returns a form similar to <code>facsum</code>, but since it is adding forms that have
already been processed by <code>facsum</code>, it does not need to repeat that effort.
This capability is especially useful when the expressions to be summed are very
large.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package facexp} ·
@ref{Category: Expressions}
</div>
</p></dd></dl>
<p><a name="Item_003a-Package-functs"></a>
</p><hr size="6">
<a name="Package-functs"></a>
<a name="SEC346"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC345" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC347" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC342" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC342" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_74.html#SEC351" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 73.4 Package functs </h2>
<div class=categorybox>
·
<p>@ref{Category: Share packages} ·
@ref{Category: Package functs}
</div>
</p>
<p><a name="Item_003a-rempart"></a>
</p><dl>
<dt><u>Function:</u> <b>rempart</b><i> (<var>expr</var>, <var>n</var>)</i>
<a name="IDX2640"></a>
</dt>
<dd><p>Removes part <var>n</var> from the expression <var>expr</var>.
</p>
<p>If <var>n</var> is a list of the form <code>[<var>l</var>, <var>m</var>]</code>
then parts <var>l</var> thru <var>m</var> are removed.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Expressions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-wronskian"></a>
</p><dl>
<dt><u>Function:</u> <b>wronskian</b><i> ([<var>f_1</var>, ..., <var>f_n</var>], <var>x</var>)</i>
<a name="IDX2641"></a>
</dt>
<dd><p>Returns the Wronskian matrix of the list of expressions [<var>f_1</var>, ..., <var>f_n</var>] in the variable <var>x</var>.
The determinant of the Wronskian matrix is the Wronskian determinant of the list of expressions.
</p>
<p>To use <code>wronskian</code>, first <code>load(functs)</code>. Example:
</p>
<pre class="example">(%i1) load(functs)$
(%i2) wronskian([f(x), g(x)],x);
(%o2) matrix([f(x),g(x)],['diff(f(x),x,1),'diff(g(x),x,1)])
</pre>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Differential calculus}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-tracematrix"></a>
</p><dl>
<dt><u>Function:</u> <b>tracematrix</b><i> (<var>M</var>)</i>
<a name="IDX2642"></a>
</dt>
<dd><p>Returns the trace (sum of the diagonal elements) of matrix <var>M</var>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Matrices}
</div>
</p>
</dd></dl>
<dl>
<dt><u>Function:</u> <b>rational</b><i> (<code>z</code>)</i>
<a name="IDX2643"></a>
</dt>
<dd><p>Multiplies numerator and denominator of <var>z</var> by the complex conjugate of denominator,
thus rationalizing the denominator.
Returns canonical rational expression (CRE) form if given one, else returns general form.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Expressions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-logand"></a>
</p><dl>
<dt><u>Function:</u> <b>logand</b><i> (<code>x</code>,<code>y</code>)</i>
<a name="IDX2644"></a>
</dt>
<dd><p>Returns logical (bit-wise) "and" of arguments x and y.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Mathematical functions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-logor"></a>
</p><dl>
<dt><u>Function:</u> <b>logor</b><i> (<code>x</code>,<code>y</code>)</i>
<a name="IDX2645"></a>
</dt>
<dd><p>Returns logical (bit-wise) "or" of arguments x and y.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Mathematical functions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-logxor"></a>
</p><dl>
<dt><u>Function:</u> <b>logxor</b><i> (<code>x</code>,<code>y</code>)</i>
<a name="IDX2646"></a>
</dt>
<dd><p>Returns logical (bit-wise) exclusive-or of arguments x and y.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Mathematical functions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-nonzeroandfreeof"></a>
</p><dl>
<dt><u>Function:</u> <b>nonzeroandfreeof</b><i> (<var>x</var>, <var>expr</var>)</i>
<a name="IDX2647"></a>
</dt>
<dd><p>Returns <code>true</code> if <var>expr</var> is nonzero and <code>freeof (<var>x</var>, <var>expr</var>)</code> returns <code>true</code>.
Returns <code>false</code> otherwise.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Expressions}
</div>
</p>
</dd></dl>
<dl>
<dt><u>Function:</u> <b>linear</b><i> (<var>expr</var>, <var>x</var>)</i>
<a name="IDX2648"></a>
</dt>
<dd><p>When <var>expr</var> is an expression of the form <code><var>a</var>*<var>x</var> + <var>b</var></code>
where <var>a</var> is nonzero, and <var>a</var> and <var>b</var> are free of <var>x</var>,
<code>linear</code> returns a list of three equations, one for each of the three formal
variables <var>b</var>, <var>a</var>, and <var>x</var>. Otherwise, <code>linear</code> returns <code>false</code>.
</p>
<p><code>load(antid)</code> loads this function.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load (antid);
(%o1) /usr/share/maxima/5.29.1/share/integration/antid.mac
(%i2) linear ((1 - w)*(1 - x)*z, z);
(%o2) [bargumentb = 0, aargumenta = (w - 1) x - w + 1, xargumentx = z]
(%i3) linear (cos(u - v) + cos(u + v), u);
(%o3) false
</pre>
<div class=categorybox>
·
<p>@ref{Category: Package antid} ·
@ref{Category: Expressions}
</div>
</p>
</dd></dl>
<p><a name="gcdivide"></a>
<a name="Item_003a-gcdivide"></a>
</p><dl>
<dt><u>Function:</u> <b>gcdivide</b><i> (<var>p</var>, <var>q</var>)</i>
<a name="IDX2649"></a>
</dt>
<dd><p>When the option variable <code>takegcd</code> is <code>true</code> which is the default,
<code>gcdivide</code> divides the polynomials <var>p</var> and <var>q</var> by their greatest
common divisor and returns the ratio of the results. <code>gcdivde</code> calls the
function <code><a href="maxima_14.html#ezgcd">ezgcd</a></code> to divide the polynomials by the greatest common divisor.
</p>
<p>When <code>takegcd</code> is <code>false</code>, <code>gcdivide</code> returns the ratio
<code><var>p</var>/<var>q</var></code>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<p>See also <code><a href="maxima_14.html#ezgcd">ezgcd</a></code>, <code><a href="maxima_14.html#gcd">gcd</a></code>, <code><a href="maxima_14.html#gcdex">gcdex</a></code>, and
<code><a href="maxima_57.html#poly_005fgcd">poly_gcd</a></code>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) load(functs)$
(%i2) p1:6*x^3+19*x^2+19*x+6;
3 2
(%o2) 6 x + 19 x + 19 x + 6
(%i3) p2:6*x^5+13*x^4+12*x^3+13*x^2+6*x;
5 4 3 2
(%o3) 6 x + 13 x + 12 x + 13 x + 6 x
(%i4) gcdivide(p1, p2);
x + 1
(%o4) ------
3
x + x
(%i5) takegcd:false;
(%o5) false
(%i6) gcdivide(p1, p2);
3 2
6 x + 19 x + 19 x + 6
(%o6) ----------------------------------
5 4 3 2
6 x + 13 x + 12 x + 13 x + 6 x
(%i7) ratsimp(%);
x + 1
(%o7) ------
3
x + x
</pre>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Polynomials}
</div>
</p></dd></dl>
<p><a name="Item_003a-arithmetic"></a>
</p><dl>
<dt><u>Function:</u> <b>arithmetic</b><i> (<var>a</var>, <var>d</var>, <var>n</var>)</i>
<a name="IDX2650"></a>
</dt>
<dd><p>Returns the <var>n</var>-th term of the arithmetic series
<code><var>a</var>, <var>a</var> + <var>d</var>, <var>a</var> + 2*<var>d</var>, ..., <var>a</var> + (<var>n</var> - 1)*<var>d</var></code>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Sums and products}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-geometric"></a>
</p><dl>
<dt><u>Function:</u> <b>geometric</b><i> (<var>a</var>, <var>r</var>, <var>n</var>)</i>
<a name="IDX2651"></a>
</dt>
<dd><p>Returns the <var>n</var>-th term of the geometric series
<code><var>a</var>, <var>a</var>*<var>r</var>, <var>a</var>*<var>r</var>^2, ..., <var>a</var>*<var>r</var>^(<var>n</var> - 1)</code>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Sums and products}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-harmonic"></a>
</p><dl>
<dt><u>Function:</u> <b>harmonic</b><i> (<var>a</var>, <var>b</var>, <var>c</var>, <var>n</var>)</i>
<a name="IDX2652"></a>
</dt>
<dd><p>Returns the <var>n</var>-th term of the harmonic series
<code><var>a</var>/<var>b</var>, <var>a</var>/(<var>b</var> + <var>c</var>), <var>a</var>/(<var>b</var> + 2*<var>c</var>), ..., <var>a</var>/(<var>b</var> + (<var>n</var> - 1)*<var>c</var>)</code>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Sums and products}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-arithsum"></a>
</p><dl>
<dt><u>Function:</u> <b>arithsum</b><i> (<var>a</var>, <var>d</var>, <var>n</var>)</i>
<a name="IDX2653"></a>
</dt>
<dd><p>Returns the sum of the arithmetic series from 1 to <var>n</var>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Sums and products}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-geosum"></a>
</p><dl>
<dt><u>Function:</u> <b>geosum</b><i> (<var>a</var>, <var>r</var>, <var>n</var>)</i>
<a name="IDX2654"></a>
</dt>
<dd><p>Returns the sum of the geometric series from 1 to <var>n</var>. If <var>n</var> is
infinity (<code>inf</code>) then a sum is finite only if the absolute value
of <var>r</var> is less than 1.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Sums and products}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-gaussprob"></a>
</p><dl>
<dt><u>Function:</u> <b>gaussprob</b><i> (<var>x</var>)</i>
<a name="IDX2655"></a>
</dt>
<dd><p>Returns the Gaussian probability function
<code>%e^(-<var>x</var>^2/2) / sqrt(2*%pi)</code>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Mathematical functions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-gd"></a>
</p><dl>
<dt><u>Function:</u> <b>gd</b><i> (<var>x</var>)</i>
<a name="IDX2656"></a>
</dt>
<dd><p>Returns the Gudermannian function
<code>2*atan(%e^x)-%pi/2</code>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Mathematical functions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-agd"></a>
</p><dl>
<dt><u>Function:</u> <b>agd</b><i> (<var>x</var>)</i>
<a name="IDX2657"></a>
</dt>
<dd><p>Returns the inverse Gudermannian function
<code>log (tan (%pi/4 + x/2))</code>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Mathematical functions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-vers"></a>
</p><dl>
<dt><u>Function:</u> <b>vers</b><i> (<var>x</var>)</i>
<a name="IDX2658"></a>
</dt>
<dd><p>Returns the versed sine <code>1 - cos (x)</code>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Mathematical functions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-covers"></a>
</p><dl>
<dt><u>Function:</u> <b>covers</b><i> (<var>x</var>)</i>
<a name="IDX2659"></a>
</dt>
<dd><p>Returns the coversed sine <code>1 - sin (<var>x</var>)</code>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Mathematical functions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-exsec"></a>
</p><dl>
<dt><u>Function:</u> <b>exsec</b><i> (<var>x</var>)</i>
<a name="IDX2660"></a>
</dt>
<dd><p>Returns the exsecant <code>sec (<var>x</var>) - 1</code>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Mathematical functions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-hav"></a>
</p><dl>
<dt><u>Function:</u> <b>hav</b><i> (<var>x</var>)</i>
<a name="IDX2661"></a>
</dt>
<dd><p>Returns the haversine <code>(1 - cos(x))/2</code>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Mathematical functions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-combination"></a>
</p><dl>
<dt><u>Function:</u> <b>combination</b><i> (<var>n</var>, <var>r</var>)</i>
<a name="IDX2662"></a>
</dt>
<dd><p>Returns the number of combinations of <var>n</var> objects
taken <var>r</var> at a time.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Mathematical functions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-permutation"></a>
</p><dl>
<dt><u>Function:</u> <b>permutation</b><i> (<var>n</var>, <var>r</var>)</i>
<a name="IDX2663"></a>
</dt>
<dd><p>Returns the number of permutations of <var>r</var> objects
selected from a set of <var>n</var> objects.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package functs} ·
@ref{Category: Mathematical functions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-Package-ineq"></a>
</p><hr size="6">
<a name="Package-ineq"></a>
<a name="SEC347"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC346" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC348" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC342" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC342" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_74.html#SEC351" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 73.5 Package ineq </h2>
<p>The <code>ineq</code> package contains simplification rules
for inequalities.
</p>
<p>Example session:
</p>
<pre class="example">(%i1) load(ineq)$
Warning: Putting rules on '+' or '*' is inefficient, and may not work.
Warning: Putting rules on '+' or '*' is inefficient, and may not work.
Warning: Putting rules on '+' or '*' is inefficient, and may not work.
Warning: Putting rules on '+' or '*' is inefficient, and may not work.
Warning: Putting rules on '+' or '*' is inefficient, and may not work.
Warning: Putting rules on '+' or '*' is inefficient, and may not work.
Warning: Putting rules on '+' or '*' is inefficient, and may not work.
Warning: Putting rules on '+' or '*' is inefficient, and may not work.
(%i2) a>=4; /* a sample inequality */
(%o2) a >= 4
(%i3) (b>c)+%; /* add a second, strict inequality */
(%o3) b + a > c + 4
(%i4) 7*(x<y); /* multiply by a positive number */
(%o4) 7 x < 7 y
(%i5) -2*(x>=3*z); /* multiply by a negative number */
(%o5) - 2 x <= - 6 z
(%i6) (1+a^2)*(1/(1+a^2)<=1); /* Maxima knows that 1+a^2 > 0 */
2
(%o6) 1 <= a + 1
(%i7) assume(x>0)$ x*(2<3); /* assuming x>0 */
(%o7) 2 x < 3 x
(%i8) a>=b; /* another inequality */
(%o8) a >= b
(%i9) 3+%; /* add something */
(%o9) a + 3 >= b + 3
(%i10) %-3; /* subtract it out */
(%o10) a >= b
(%i11) a>=c-b; /* yet another inequality */
(%o11) a >= c - b
(%i12) b+%; /* add b to both sides */
(%o12) b + a >= c
(%i13) %-c; /* subtract c from both sides */
(%o13) - c + b + a >= 0
(%i14) -%; /* multiply by -1 */
(%o14) c - b - a <= 0
(%i15) (z-1)^2>-2*z; /* determining truth of assertion */
2
(%o15) (z - 1) > - 2 z
(%i16) expand(%)+2*z; /* expand this and add 2*z to both sides */
2
(%o16) z + 1 > 0
(%i17) %,pred;
(%o17) true
</pre>
<p>Be careful about using parentheses
around the inequalities: when the user types in <code>(A > B) + (C = 5)</code> the
result is <code>A + C > B + 5</code>, but <code>A > B + C = 5</code> is a syntax error,
and <code>(A > B + C) = 5</code> is something else entirely.
</p>
<p>Do <code>disprule (all)</code> to see a complete listing
of the rule definitions.
</p>
<p>The user will be queried if Maxima is
unable to decide the sign of a quantity multiplying an inequality.
</p>
<p>The most common mis-feature is illustrated by:
</p>
<pre class="example">(%i1) eq: a > b;
(%o1) a > b
(%i2) 2*eq;
(%o2) 2 (a > b)
(%i3) % - eq;
(%o3) a > b
</pre>
<p>Another problem is 0 times an inequality; the default to have this
turn into 0 has been left alone. However, if you type
<code>X*<var>some_inequality</var></code> and Maxima asks about the sign of <code>X</code> and you
respond <code>zero</code> (or <code>z</code>), the program returns <code>X*<var>some_inequality</var></code>
and not use the information that <code>X</code> is 0. You should do <code>ev (%, x: 0)</code> in such
a case, as the database will only be used for comparison purposes
in decisions, and not for the purpose of evaluating <code>X</code>.
</p>
<p>The user may note a slower response when this package is loaded, as
the simplifier is forced to examine more rules than without the
package, so you might wish to remove the rules after making use of
them. Do <code>kill (rules)</code> to eliminate all of the rules (including any
that you might have defined); or you may be more selective by
killing only some of them; or use <code>remrule</code> on a specific rule.
</p>
<p>Note that if you load this package after defining your own
rules you will clobber your rules that have the same name. The
rules in this package are:
<code>*rule1</code>, ..., <code>*rule8</code>,
<code>+rule1</code>, ..., <code>+rule18</code>,
and you must enclose the rulename in quotes to refer to it, as
in <code>remrule ("+", "+rule1")</code> to specifically remove the first rule on <code>"+"</code>
or <code>disprule ("*rule2")</code> to display the definition of the second multiplicative rule.
</p>
<div class=categorybox>
·
<p>@ref{Category: Simplification functions} ·
@ref{Category: Rules and patterns} ·
@ref{Category: Share packages} ·
@ref{Category: Package ineq}
</div>
</p>
<p><a name="Item_003a-Package-rducon"></a>
</p><hr size="6">
<a name="Package-rducon"></a>
<a name="SEC348"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC347" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC349" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC342" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC342" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_74.html#SEC351" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 73.6 Package rducon </h2>
<div class=categorybox>
·
<p>@ref{Category: Expressions} ·
@ref{Category: Share packages} ·
@ref{Category: Package rducon}
</div>
</p>
<p><a name="Item_003a-reduce_005fconsts"></a>
</p><dl>
<dt><u>Function:</u> <b>reduce_consts</b><i> (<var>expr</var>)</i>
<a name="IDX2664"></a>
</dt>
<dd><p>Replaces constant subexpressions of <var>expr</var> with
constructed constant atoms, saving the definition of all these
constructed constants in the list of equations <code>const_eqns</code>, and
returning the modified <var>expr</var>. Those parts of <var>expr</var> are constant which
return <code>true</code> when operated on by the function <code>constantp</code>. Hence,
before invoking <code>reduce_consts</code>, one should do
</p>
<pre class="example">declare ([<var>objects to be given the constant property</var>], constant)$
</pre>
<p>to set up a database of the constant quantities occurring in your
expressions.
</p>
<p>If you are planning to generate Fortran output after these symbolic
calculations, one of the first code sections should be the calculation
of all constants. To generate this code segment, do
</p>
<pre class="example">map ('fortran, const_eqns)$
</pre>
<p>Variables besides <code>const_eqns</code> which affect <code>reduce_consts</code> are:
</p>
<p><code>const_prefix</code> (default value: <code>xx</code>) is the string of characters used to prefix all
symbols generated by <code>reduce_consts</code> to represent constant subexpressions.
</p>
<p><code>const_counter</code> (default value: 1) is the integer index used to generate unique
symbols to represent each constant subexpression found by <code>reduce_consts</code>.
</p>
<p><code>load (rducon)</code> loads this function.
<code>demo (rducon)</code> shows a demonstration of this function.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package rducon} ·
@ref{Category: Expressions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-Package-scifac"></a>
</p><hr size="6">
<a name="Package-scifac"></a>
<a name="SEC349"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC348" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC350" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC342" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC342" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_74.html#SEC351" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 73.7 Package scifac </h2>
<div class=categorybox>
·
<p>@ref{Category: Expressions} ·
@ref{Category: Share packages} ·
@ref{Category: Package scifac}
</div>
</p>
<p><a name="Item_003a-gcfac"></a>
</p><dl>
<dt><u>Function:</u> <b>gcfac</b><i> (<var>expr</var>)</i>
<a name="IDX2665"></a>
</dt>
<dd><p><code>gcfac</code> is a factoring function that attempts to apply the same heuristics which
scientists apply in trying to make expressions simpler. <code>gcfac</code> is limited
to monomial-type factoring. For a sum, <code>gcfac</code> does the following:
</p>
<ol>
<li>
Factors over the integers.
</li><li>
Factors out the largest powers of terms occurring as
coefficients, regardless of the complexity of the terms.
</li><li>
Uses (1) and (2) in factoring adjacent pairs of terms.
</li><li>
Repeatedly and recursively applies these techniques until
the expression no longer changes.
</li></ol>
<p>Item (3) does not necessarily do an optimal job of pairwise
factoring because of the combinatorially-difficult nature of finding
which of all possible rearrangements of the pairs yields the most
compact pair-factored result.
</p>
<p><code>load (scifac)</code> loads this function.
<code>demo (scifac)</code> shows a demonstration of this function.
</p>
<div class=categorybox>
·
<p>@ref{Category: Package scifac} ·
@ref{Category: Expressions}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-Package-sqdnst"></a>
</p><hr size="6">
<a name="Package-sqdnst"></a>
<a name="SEC350"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC349" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="maxima_74.html#SEC351" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC342" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC342" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_74.html#SEC351" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 73.8 Package sqdnst </h2>
<p><a name="Item_003a-sqrtdenest"></a>
</p><dl>
<dt><u>Function:</u> <b>sqrtdenest</b><i> (<var>expr</var>)</i>
<a name="IDX2666"></a>
</dt>
<dd><p>Denests <code>sqrt</code> of simple, numerical, binomial surds, where possible. E.g.
</p>
<pre class="example">(%i1) load (sqdnst)$
(%i2) sqrt(sqrt(3)/2+1)/sqrt(11*sqrt(2)-12);
sqrt(3)
sqrt(------- + 1)
2
(%o2) ---------------------
sqrt(11 sqrt(2) - 12)
(%i3) sqrtdenest(%);
sqrt(3) 1
------- + -
2 2
(%o3) -------------
1/4 3/4
3 2 - 2
</pre>
<p>Sometimes it helps to apply <code>sqrtdenest</code> more than once, on such as
<code>(19601-13860 sqrt(2))^(7/4)</code>.
</p>
<p><code>load (sqdnst)</code> loads this function.
</p>
<div class=categorybox>
·
<p>@ref{Category: Expressions} ·
@ref{Category: Share packages} ·
@ref{Category: Package sqdnst}
</div>
</p>
</dd></dl>
<p><a name="Item_003a-solve_005frec"></a>
</p><hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC342" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="maxima_74.html#SEC351" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
<font size="-1">
This document was generated by <em>root</em> on <em>January, 10 2014</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
</font>
<br>
</p>
</body>
</html>
|