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 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on April, 24 2010 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.21.1 Manual: 7. Simplification</title>
<meta name="description" content="Maxima 5.21.1 Manual: 7. Simplification">
<meta name="keywords" content="Maxima 5.21.1 Manual: 7. 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="SEC29"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_6.html#SEC28" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC30" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima_6.html#SEC20" 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_8.html#SEC31" 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_79.html#SEC331" 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"> 7. Simplification </h1>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC30">7.1 Functions and Variables for Simplification</a></td><td> </td><td align="left" valign="top">
</td></tr>
</table>
<p><a name="Item_003a-Functions-and-Variables-for-Simplification"></a>
</p><hr size="6">
<a name="Functions-and-Variables-for-Simplification"></a>
<a name="SEC30"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC29" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="maxima_8.html#SEC31" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC29" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC29" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_8.html#SEC31" 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_79.html#SEC331" 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"> 7.1 Functions and Variables for Simplification </h2>
<p><a name="Item_003a-askexp"></a>
</p><dl>
<dt><u>System variable:</u> <b>askexp</b>
<a name="IDX196"></a>
</dt>
<dd><p>When <code>asksign</code> is called,
<code>askexp</code> is the expression <code>asksign</code> is testing.
</p>
<p>At one time, it was possible for a user to inspect <code>askexp</code>
by entering a Maxima break with control-A.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-askinteger"></a>
</p><dl>
<dt><u>Function:</u> <b>askinteger</b><i> (<var>expr</var>, integer)</i>
<a name="IDX197"></a>
</dt>
<dt><u>Function:</u> <b>askinteger</b><i> (<var>expr</var>)</i>
<a name="IDX198"></a>
</dt>
<dt><u>Function:</u> <b>askinteger</b><i> (<var>expr</var>, even)</i>
<a name="IDX199"></a>
</dt>
<dt><u>Function:</u> <b>askinteger</b><i> (<var>expr</var>, odd)</i>
<a name="IDX200"></a>
</dt>
<dd><p><code>askinteger (<var>expr</var>, integer)</code> attempts to determine from the <code>assume</code> database
whether <var>expr</var> is an integer.
<code>askinteger</code> prompts the user if it cannot tell otherwise,
and attempt to install the information in the database if possible.
<code>askinteger (<var>expr</var>)</code> is equivalent to <code>askinteger (<var>expr</var>, integer)</code>.
</p>
<p><code>askinteger (<var>expr</var>, even)</code> and <code>askinteger (<var>expr</var>, odd)</code>
likewise attempt to determine if <var>expr</var> is an even integer or odd integer, respectively.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-asksign"></a>
</p><dl>
<dt><u>Function:</u> <b>asksign</b><i> (<var>expr</var>)</i>
<a name="IDX201"></a>
</dt>
<dd><p>First attempts to determine whether the specified
expression is positive, negative, or zero. If it cannot, it asks the
user the necessary questions to complete its deduction. The user's
answer is recorded in the data base for the duration of the current
computation. The return value of <code>asksign</code> is one of <code>pos</code>, <code>neg</code>,
or <code>zero</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-demoivre"></a>
</p><dl>
<dt><u>Function:</u> <b>demoivre</b><i> (<var>expr</var>)</i>
<a name="IDX202"></a>
</dt>
<dt><u>Option variable:</u> <b>demoivre</b>
<a name="IDX203"></a>
</dt>
<dd><p>The function <code>demoivre (expr)</code> converts one expression
without setting the global variable <code>demoivre</code>.
</p>
<p>When the variable <code>demoivre</code> is <code>true</code>,
complex exponentials are converted into equivalent expressions in terms of circular functions:
<code>exp (a + b*%i)</code> simplifies to <code>%e^a * (cos(b) + %i*sin(b))</code>
if <code>b</code> is free of <code>%i</code>.
<code>a</code> and <code>b</code> are not expanded.
</p>
<p>The default value of <code>demoivre</code> is <code>false</code>.
</p>
<p><code>exponentialize</code> converts circular and hyperbolic functions to exponential form.
<code>demoivre</code> and <code>exponentialize</code> cannot
both be true at the same time.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Complex-variables">Complex variables</a>
·
<a href="maxima_95.html#Category_003a-Trigonometric-functions">Trigonometric functions</a>
·
<a href="maxima_95.html#Category_003a-Hyperbolic-functions">Hyperbolic functions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-distribute_005fover"></a>
</p><dl>
<dt><u>Option variable:</u> <b>distribute_over</b>
<a name="IDX204"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p><code>distribute_over</code> controls the mapping of functions over bags like lists,
matrices, and equations. At this time this feature is implemented for the
trigonometric functions, the exponential integrals, and the integer
functions like <code>mod</code>, <code>floor</code>, <code>ceiling</code>, <code>round</code>.
</p>
<p>The mapping of functions is switched off, when setting <code>distribute_over</code>
to the value <code>false</code>.
</p>
<p>Examples:
</p>
<p>The <code>sin</code> function maps over a list:
</p>
<pre class="example">(%i1) sin([x,1,1.0]);
(%o1) [sin(x), sin(1), .8414709848078965]
</pre>
<p><code>mod</code> is a function with two arguments which maps over lists. Mapping over
nested lists is possible too:
</p>
<pre class="example">(%i2) mod([x,11,2*a],10);
(%o2) [mod(x, 10), 1, 2 mod(a, 5)]
(%i3) mod([[x,y,z],11,2*a],10);
(%o3) [[mod(x, 10), mod(y, 10), mod(z, 10)], 1, 2 mod(a, 5)]
</pre>
<p>Mapping of the <code>floor</code> function over a matrix and an equation:
</p>
<pre class="example">(%i4) floor(matrix([a,b],[c,d]));
[ floor(a) floor(b) ]
(%o4) [ ]
[ floor(c) floor(d) ]
(%i5) floor(a=b);
(%o5) floor(a) = floor(b)
</pre>
<p>Functions with more than one argument map over any of the arguments or all
arguments:
</p>
<pre class="example">(%i6) expintegral_e([1,2],[x,y]);
(%o6) [[expintegral_e(1, x), expintegral_e(1, y)],
[expintegral_e(2, x), expintegral_e(2, y)]]
</pre>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-domain"></a>
</p><dl>
<dt><u>Option variable:</u> <b>domain</b>
<a name="IDX205"></a>
</dt>
<dd><p>Default value: <code>real</code>
</p>
<p>When <code>domain</code> is set to <code>complex</code>, <code>sqrt (x^2)</code> will remain
<code>sqrt (x^2)</code> instead of returning <code>abs(x)</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-expand"></a>
</p><dl>
<dt><u>Function:</u> <b>expand</b><i> (<var>expr</var>)</i>
<a name="IDX206"></a>
</dt>
<dt><u>Function:</u> <b>expand</b><i> (<var>expr</var>, <var>p</var>, <var>n</var>)</i>
<a name="IDX207"></a>
</dt>
<dd><p>Expand expression <var>expr</var>.
Products of sums and exponentiated sums are
multiplied out, numerators of rational expressions which are sums are
split into their respective terms, and multiplication (commutative
and non-commutative) are distributed over addition at all levels of
<var>expr</var>.
</p>
<p>For polynomials one should usually use <code>ratexpand</code> which uses a
more efficient algorithm.
</p>
<p><code>maxnegex</code> and <code>maxposex</code> control the maximum negative and
positive exponents, respectively, which will expand.
</p>
<p><code>expand (<var>expr</var>, <var>p</var>, <var>n</var>)</code> expands <var>expr</var>,
using <var>p</var> for <code>maxposex</code> and <var>n</var> for <code>maxnegex</code>.
This is useful in order to expand part but not all of an expression.
</p>
<p><code>expon</code> - the exponent of the largest negative power which is
automatically expanded (independent of calls to <code>expand</code>). For example
if <code>expon</code> is 4 then <code>(x+1)^(-5)</code> will not be automatically expanded.
</p>
<p><code>expop</code> - the highest positive exponent which is automatically
expanded. Thus <code>(x+1)^3</code>, when typed, will be automatically expanded
only if <code>expop</code> is greater than or equal to 3. If it is desired to have
<code>(x+1)^n</code> expanded where <code>n</code> is greater than <code>expop</code> then executing
<code>expand ((x+1)^n)</code> will work only if <code>maxposex</code> is not less than <code>n</code>.
</p>
<p><code>expand(expr, 0, 0)</code> causes a resimplification of <code>expr</code>. <code>expr</code>
is not reevaluated. In distinction from <code>ev(expr, noeval)</code> a special
representation (e. g. a CRE form) is removed. See also <code>ev</code>.
</p>
<p>The <code>expand</code> flag used with <code>ev</code> causes expansion.
</p>
<p>The file <tt>`simplification/facexp.mac'</tt>
contains several related functions (in particular <code>facsum</code>, <code>factorfacsum</code>
and <code>collectterms</code>, which are autoloaded) and variables (<code>nextlayerfactor</code>
and <code>facsum_combine</code>) that provide the user with the ability to structure
expressions by controlled expansion.
Brief function descriptions are available in <tt>`simplification/facexp.usg'</tt>.
A demo is available by doing <code>demo("facexp")</code>.
</p>
<p>Examples:
</p><pre class="example">(%i1) expr:(x+1)^2*(y+1)^3;
2 3
(%o1) (x + 1) (y + 1)
(%i2) expand(expr);
2 3 3 3 2 2 2 2 2
(%o2) x y + 2 x y + y + 3 x y + 6 x y + 3 y + 3 x y
2
+ 6 x y + 3 y + x + 2 x + 1
(%i3) expand(expr,2);
2 3 3 3
(%o3) x (y + 1) + 2 x (y + 1) + (y + 1)
(%i4) expr:(x+1)^-2*(y+1)^3;
3
(y + 1)
(%o4) --------
2
(x + 1)
(%i5) expand(expr);
3 2
y 3 y 3 y 1
(%o5) ------------ + ------------ + ------------ + ------------
2 2 2 2
x + 2 x + 1 x + 2 x + 1 x + 2 x + 1 x + 2 x + 1
(%i6) expand(expr,2,2);
3
(y + 1)
(%o6) ------------
2
x + 2 x + 1
</pre>
<p>Resimplify an expression without expansion:
</p>
<pre class="example">(%i7) expr:(1+x)^2*sin(x);
2
(%o7) (x + 1) sin(x)
(%i8) exponentialize:true;
(%o8) true
(%i9) expand(expr,0,0);
2 %i x - %i x
%i (x + 1) (%e - %e )
(%o9) - -------------------------------
2
</pre>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Expressions">Expressions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-expandwrt"></a>
</p><dl>
<dt><u>Function:</u> <b>expandwrt</b><i> (<var>expr</var>, <var>x_1</var>, ..., <var>x_n</var>)</i>
<a name="IDX208"></a>
</dt>
<dd><p>Expands expression <code>expr</code> with respect to the
variables <var>x_1</var>, ..., <var>x_n</var>.
All products involving the variables appear explicitly. The form returned
will be free of products of sums of expressions that are not free of
the variables. <var>x_1</var>, ..., <var>x_n</var>
may be variables, operators, or expressions.
</p>
<p>By default, denominators are not expanded, but this can be controlled by
means of the switch <code>expandwrt_denom</code>.
</p>
<p>This function is autoloaded from
<tt>`simplification/stopex.mac'</tt>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Expressions">Expressions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-expandwrt_005fdenom"></a>
</p><dl>
<dt><u>Option variable:</u> <b>expandwrt_denom</b>
<a name="IDX209"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p><code>expandwrt_denom</code> controls the treatment of rational
expressions by <code>expandwrt</code>. If <code>true</code>, then both the numerator and
denominator of the expression will be expanded according to the
arguments of <code>expandwrt</code>, but if <code>expandwrt_denom</code> is <code>false</code>, then only the
numerator will be expanded in that way.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Expressions">Expressions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-expandwrt_005ffactored"></a>
</p><dl>
<dt><u>Function:</u> <b>expandwrt_factored</b><i> (<var>expr</var>, <var>x_1</var>, ..., <var>x_n</var>)</i>
<a name="IDX210"></a>
</dt>
<dd><p>is similar to <code>expandwrt</code>, but treats expressions that are products somewhat differently.
<code>expandwrt_factored</code> expands only on those factors of <code>expr</code>
that contain the variables <var>x_1</var>, ..., <var>x_n</var>.
</p>
<p>This function is autoloaded from <tt>`simplification/stopex.mac'</tt>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Expressions">Expressions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-expon"></a>
</p><dl>
<dt><u>Option variable:</u> <b>expon</b>
<a name="IDX211"></a>
</dt>
<dd><p>Default value: 0
</p>
<p><code>expon</code> is the exponent of the largest negative power which
is automatically expanded (independent of calls to <code>expand</code>). For
example, if <code>expon</code> is 4 then <code>(x+1)^(-5)</code> will not be automatically
expanded.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Expressions">Expressions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-exponentialize"></a>
</p><dl>
<dt><u>Function:</u> <b>exponentialize</b><i> (<var>expr</var>)</i>
<a name="IDX212"></a>
</dt>
<dt><u>Option variable:</u> <b>exponentialize</b>
<a name="IDX213"></a>
</dt>
<dd><p>The function <code>exponentialize (expr)</code> converts
circular and hyperbolic functions in <var>expr</var> to exponentials,
without setting the global variable <code>exponentialize</code>.
</p>
<p>When the variable <code>exponentialize</code> is <code>true</code>,
all circular and hyperbolic functions are converted to exponential form.
The default value is <code>false</code>.
</p>
<p><code>demoivre</code> converts complex exponentials into circular functions.
<code>exponentialize</code> and <code>demoivre</code> cannot
both be true at the same time.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Complex-variables">Complex variables</a>
·
<a href="maxima_95.html#Category_003a-Trigonometric-functions">Trigonometric functions</a>
·
<a href="maxima_95.html#Category_003a-Hyperbolic-functions">Hyperbolic functions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-expop"></a>
</p><dl>
<dt><u>Option variable:</u> <b>expop</b>
<a name="IDX214"></a>
</dt>
<dd><p>Default value: 0
</p>
<p><code>expop</code> is the highest positive exponent which is
automatically expanded. Thus <code>(x + 1)^3</code>, when typed, will be
automatically expanded only if <code>expop</code> is greater than or equal to 3.
If it is desired to have <code>(x + 1)^n</code> expanded where <code>n</code> is greater than
<code>expop</code> then executing <code>expand ((x + 1)^n)</code> will work only if <code>maxposex</code> is
not less than n.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Expressions">Expressions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-factlim"></a>
</p><dl>
<dt><u>Option variable:</u> <b>factlim</b>
<a name="IDX215"></a>
</dt>
<dd><p>Default value: -1
</p>
<p><code>factlim</code> specifies the highest factorial which is
automatically expanded. If it is -1 then all integers are expanded.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Gamma-and-factorial-functions">Gamma and factorial functions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-intosum"></a>
</p><dl>
<dt><u>Function:</u> <b>intosum</b><i> (<var>expr</var>)</i>
<a name="IDX216"></a>
</dt>
<dd><p>Moves multiplicative factors outside a summation to inside.
If the index is used in the
outside expression, then the function tries to find a reasonable
index, the same as it does for <code>sumcontract</code>. This is essentially the
reverse idea of the <code>outative</code> property of summations, but note that it
does not remove this property, it only bypasses it.
</p>
<p>In some cases,
a <code>scanmap (multthru, <var>expr</var>)</code> may be necessary before the <code>intosum</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Expressions">Expressions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-lassociative"></a>
</p><dl>
<dt><u>Declaration:</u> <b>lassociative</b>
<a name="IDX217"></a>
</dt>
<dd><p><code>declare (g, lassociative)</code> tells the
Maxima simplifier that <code>g</code> is left-associative. E.g., <code>g (g (a, b), g (c, d))</code> will
simplify to <code>g (g (g (a, b), c), d)</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
·
<a href="maxima_95.html#Category_003a-Operators">Operators</a>
·
<a href="maxima_95.html#Category_003a-Simplification">Simplification</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-linear"></a>
</p><dl>
<dt><u>Declaration:</u> <b>linear</b>
<a name="IDX218"></a>
</dt>
<dd><p>One of Maxima's operator properties. For univariate <code>f</code> so
declared, "expansion" <code>f(x + y)</code> yields <code>f(x) + f(y)</code>,
<code>f(a*x)</code> yields <code>a*f(x)</code> takes
place where <code>a</code> is a "constant". For functions of two or more arguments,
"linearity" is defined to be as in the case of <code>sum</code> or <code>integrate</code>,
i.e., <code>f (a*x + b, x)</code> yields <code>a*f(x,x) + b*f(1,x)</code>
for <code>a</code> and <code>b</code> free of <code>x</code>.
</p>
<p><code>linear</code> is equivalent to <code>additive</code> and <code>outative</code>.
See also <code>opproperties</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
·
<a href="maxima_95.html#Category_003a-Operators">Operators</a>
·
<a href="maxima_95.html#Category_003a-Simplification">Simplification</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-mainvar"></a>
</p><dl>
<dt><u>Declaration:</u> <b>mainvar</b>
<a name="IDX219"></a>
</dt>
<dd><p>You may declare variables to be <code>mainvar</code>. The ordering
scale for atoms is essentially: numbers < constants (e.g., <code>%e</code>, <code>%pi</code>) <
scalars < other variables < mainvars. E.g., compare <code>expand ((X+Y)^4)</code>
with <code>(declare (x, mainvar), expand ((x+y)^4))</code>. (Note: Care should be
taken if you elect to use the above feature. E.g., if you subtract an
expression in which <code>x</code> is a <code>mainvar</code> from one in which <code>x</code> isn't a
<code>mainvar</code>, resimplification e.g. with <code>ev (expr, simp)</code> may be
necessary if cancellation is to occur. Also, if you save an
expression in which <code>x</code> is a <code>mainvar</code>, you probably should also save <code>x</code>.)
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
·
<a href="maxima_95.html#Category_003a-Expressions">Expressions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-maxapplydepth"></a>
</p><dl>
<dt><u>Option variable:</u> <b>maxapplydepth</b>
<a name="IDX220"></a>
</dt>
<dd><p>Default value: 10000
</p>
<p><code>maxapplydepth</code> is the maximum depth to which <code>apply1</code>
and <code>apply2</code> will delve.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Function-application">Function application</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-maxapplyheight"></a>
</p><dl>
<dt><u>Option variable:</u> <b>maxapplyheight</b>
<a name="IDX221"></a>
</dt>
<dd><p>Default value: 10000
</p>
<p><code>maxapplyheight</code> is the maximum height to which <code>applyb1</code>
will reach before giving up.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Function-application">Function application</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-maxnegex"></a>
</p><dl>
<dt><u>Option variable:</u> <b>maxnegex</b>
<a name="IDX222"></a>
</dt>
<dd><p>Default value: 1000
</p>
<p><code>maxnegex</code> is the largest negative exponent which will
be expanded by the <code>expand</code> command (see also <code>maxposex</code>).
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Expressions">Expressions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-maxposex"></a>
</p><dl>
<dt><u>Option variable:</u> <b>maxposex</b>
<a name="IDX223"></a>
</dt>
<dd><p>Default value: 1000
</p>
<p><code>maxposex</code> is the largest exponent which will be
expanded with the <code>expand</code> command (see also <code>maxnegex</code>).
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Expressions">Expressions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-multiplicative"></a>
</p><dl>
<dt><u>Declaration:</u> <b>multiplicative</b>
<a name="IDX224"></a>
</dt>
<dd><p><code>declare (f, multiplicative)</code> tells the Maxima simplifier that <code>f</code> is multiplicative.
</p>
<ol>
<li>
If <code>f</code> is univariate, whenever the simplifier encounters <code>f</code> applied
to a product, <code>f</code> distributes over that product. E.g., <code>f(x*y)</code>
simplifies to <code>f(x)*f(y)</code>.
</li><li>
If <code>f</code> is a function of 2 or more arguments, multiplicativity is
defined as multiplicativity in the first argument to <code>f</code>, e.g.,
<code>f (g(x) * h(x), x)</code> simplifies to <code>f (g(x) ,x) * f (h(x), x)</code>.
</li></ol>
<p>This simplification does not occur when <code>f</code> is applied to expressions of
the form <code>product (x[i], i, m, n)</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
·
<a href="maxima_95.html#Category_003a-Expressions">Expressions</a>
·
<a href="maxima_95.html#Category_003a-Simplification">Simplification</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-negdistrib"></a>
</p><dl>
<dt><u>Option variable:</u> <b>negdistrib</b>
<a name="IDX225"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>negdistrib</code> is <code>true</code>, -1 distributes
over an expression. E.g., <code>-(x + y)</code> becomes <code>- y - x</code>. Setting it to <code>false</code>
will allow <code>- (x + y)</code> to be displayed like that. This is sometimes useful
but be very careful: like the <code>simp</code> flag, this is one flag you do not
want to set to <code>false</code> as a matter of course or necessarily for other
than local use in your Maxima.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-negsumdispflag"></a>
</p><dl>
<dt><u>Option variable:</u> <b>negsumdispflag</b>
<a name="IDX226"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>negsumdispflag</code> is <code>true</code>, <code>x - y</code> displays as <code>x - y</code>
instead of as <code>- y + x</code>. Setting it to <code>false</code> causes the special check in
display for the difference of two expressions to not be done. One
application is that thus <code>a + %i*b</code> and <code>a - %i*b</code> may both be displayed the
same way.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Display-flags-and-variables">Display flags and variables</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-noeval"></a>
</p><dl>
<dt><u>Special symbol:</u> <b>noeval</b>
<a name="IDX227"></a>
</dt>
<dd><p><code>noeval</code> suppresses the evaluation phase of <code>ev</code>. This is useful in
conjunction with other switches and in causing expressions
to be resimplified without being reevaluated.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Evaluation-flags">Evaluation flags</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-noun"></a>
</p><dl>
<dt><u>Declaration:</u> <b>noun</b>
<a name="IDX228"></a>
</dt>
<dd><p><code>noun</code> is one of the options of the <code>declare</code> command. It makes a
function so declared a "noun", meaning that it won't be evaluated
automatically.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Nouns-and-verbs">Nouns and verbs</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-noundisp"></a>
</p><dl>
<dt><u>Option variable:</u> <b>noundisp</b>
<a name="IDX229"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>noundisp</code> is <code>true</code>, nouns display with
a single quote. This switch is always <code>true</code> when displaying function
definitions.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Display-flags-and-variables">Display flags and variables</a>
·
<a href="maxima_95.html#Category_003a-Nouns-and-verbs">Nouns and verbs</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-nouns"></a>
</p><dl>
<dt><u>Special symbol:</u> <b>nouns</b>
<a name="IDX230"></a>
</dt>
<dd><p><code>nouns</code> is an <code>evflag</code>. When used as an option to the <code>ev</code> command,
<code>nouns</code> converts all
"noun" forms occurring in the expression being <code>ev</code>'d to "verbs", i.e.,
evaluates them. See also <code>noun</code>, <code>nounify</code>, <code>verb</code>, and <code>verbify</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Evaluation-flags">Evaluation flags</a>
·
<a href="maxima_95.html#Category_003a-Nouns-and-verbs">Nouns and verbs</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-numer"></a>
</p><dl>
<dt><u>Option variable:</u> <b>numer</b>
<a name="IDX231"></a>
</dt>
<dd><p><code>numer</code> causes some mathematical functions (including exponentiation)
with numerical arguments to be evaluated in floating point. It causes
variables in <code>expr</code> which have been given numerals to be replaced by
their values. It also sets the <code>float</code> switch on.
</p>
<p>See also <code>%enumer</code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) [sqrt(2), sin(1), 1/(1+sqrt(3))];
1
(%o1) [sqrt(2), sin(1), -----------]
sqrt(3) + 1
(%i2) [sqrt(2), sin(1), 1/(1+sqrt(3))],numer;
(%o2) [1.414213562373095, .8414709848078965, .3660254037844387]
</pre>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Numerical-evaluation">Numerical evaluation</a>
·
<a href="maxima_95.html#Category_003a-Evaluation-flags">Evaluation flags</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-numerval"></a>
</p><dl>
<dt><u>Function:</u> <b>numerval</b><i> (<var>x_1</var>, <var>expr_1</var>, ..., <var>var_n</var>, <var>expr_n</var>)</i>
<a name="IDX232"></a>
</dt>
<dd><p>Declares the variables <code>x_1</code>, ..., <var>x_n</var> to have
numeric values equal to <code>expr_1</code>, ..., <code>expr_n</code>.
The numeric value is evaluated and substituted for the variable
in any expressions in which the variable occurs if the <code>numer</code> flag is
<code>true</code>. See also <code>ev</code>.
</p>
<p>The expressions <code>expr_1</code>, ..., <code>expr_n</code> can be any expressions,
not necessarily numeric.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
·
<a href="maxima_95.html#Category_003a-Numerical-evaluation">Numerical evaluation</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-opproperties"></a>
</p><dl>
<dt><u>System variable:</u> <b>opproperties</b>
<a name="IDX233"></a>
</dt>
<dd><p><code>opproperties</code> is the list of the special operator properties recognized by
the Maxima simplifier:
<code>linear</code>, <code>additive</code>, <code>multiplicative</code>, <code>outative</code>, <code>evenfun</code>,
<code>oddfun</code>, <code>commutative</code>, <code>symmetric</code>, <code>antisymmetric</code>, <code>nary</code>,
<code>lassociative</code>, <code>rassociative</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Global-variables">Global variables</a>
·
<a href="maxima_95.html#Category_003a-Operators">Operators</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-opsubst"></a>
</p><dl>
<dt><u>Option variable:</u> <b>opsubst</b>
<a name="IDX234"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>opsubst</code> is <code>false</code>, <code>subst</code> does not attempt to
substitute into the operator of an expression. E.g.,
<code>(opsubst: false, subst (x^2, r, r+r[0]))</code> will work.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Expressions">Expressions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-outative"></a>
</p><dl>
<dt><u>Declaration:</u> <b>outative</b>
<a name="IDX235"></a>
</dt>
<dd><p><code>declare (f, outative)</code> tells the Maxima simplifier that constant factors
in the argument of <code>f</code> can be pulled out.
</p>
<ol>
<li>
If <code>f</code> is univariate, whenever the simplifier encounters <code>f</code> applied
to a product, that product will be partitioned into factors that are
constant and factors that are not and the constant factors will be
pulled out. E.g., <code>f(a*x)</code> will simplify to <code>a*f(x)</code> where <code>a</code> is a
constant. Non-atomic constant factors will not be pulled out.
</li><li>
If <code>f</code> is a function of 2 or more arguments, outativity is defined
as in the case of <code>sum</code> or <code>integrate</code>, i.e., <code>f (a*g(x), x)</code> will simplify
to <code>a * f(g(x), x)</code> for <code>a</code> free of <code>x</code>.
</li></ol>
<p><code>sum</code>, <code>integrate</code>, and <code>limit</code> are all <code>outative</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
·
<a href="maxima_95.html#Category_003a-Operators">Operators</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-posfun"></a>
</p><dl>
<dt><u>Declaration:</u> <b>posfun</b>
<a name="IDX236"></a>
</dt>
<dd><p><code>declare (f, posfun)</code> declares <code>f</code> to be a positive function.
<code>is (f(x) > 0)</code> yields <code>true</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
·
<a href="maxima_95.html#Category_003a-Operators">Operators</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-pred"></a>
</p><dl>
<dt><u>Special symbol:</u> <b>pred</b>
<a name="IDX237"></a>
</dt>
<dd><p>As an argument in a call to <code>ev (<var>expr</var>)</code>, <code>pred</code> causes
predicates (expressions which evaluate to <code>true</code> or <code>false</code>) to be
evaluated. See <code>ev</code>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) 1<2;
(%o1) 1 < 2
(%i2) 1<2,pred;
(%o2) true
</pre>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Evaluation-flags">Evaluation flags</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-radcan"></a>
</p><dl>
<dt><u>Function:</u> <b>radcan</b><i> (<var>expr</var>)</i>
<a name="IDX238"></a>
</dt>
<dd><p>Simplifies <var>expr</var>, which can contain logs, exponentials, and radicals, by
converting it into a form which is canonical over a large class of expressions
and a given ordering of variables; that is, all functionally equivalent forms
are mapped into a unique form. For a somewhat larger class of expressions,
<code>radcan</code> produces a regular form. Two equivalent expressions in this class
do not necessarily have the same appearance, but their difference can be
simplified by <code>radcan</code> to zero.
</p>
<p>For some expressions <code>radcan</code> is quite time consuming. This is the cost
of exploring certain relationships among the components of the expression for
simplifications based on factoring and partial-fraction expansions of exponents.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) radcan((log(x+x^2)-log(x))^a/log(1+x)^(a/2));
a/2
(%o1) log(x + 1)
(%i2) radcan((log(1+2*a^x+a^(2*x))/log(1+a^x)));
(%o2) 2
(%i3) radcan((%e^x-1)/(1+%e^(x/2)));
x/2
(%o3) %e - 1
</pre>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Simplification-functions">Simplification functions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-radexpand"></a>
</p><dl>
<dt><u>Option variable:</u> <b>radexpand</b>
<a name="IDX239"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p><code>radexpand</code> controls some simplifications of radicals.
</p>
<p>When <code>radexpand</code> is <code>all</code>, causes nth roots of
factors of a product which are powers of n to be pulled outside of the
radical. E.g. if <code>radexpand</code> is <code>all</code>, <code>sqrt (16*x^2)</code> simplifies to <code>4*x</code>.
</p>
<p>More particularly, consider <code>sqrt (x^2)</code>.
</p><ul>
<li>
If <code>radexpand</code> is <code>all</code> or <code>assume (x > 0)</code> has been executed,
<code>sqrt(x^2)</code> simplifies to <code>x</code>.
</li><li>
If <code>radexpand</code> is <code>true</code> and <code>domain</code> is <code>real</code> (its default),
<code>sqrt(x^2)</code> simplifies to <code>abs(x)</code>.
</li><li>
If <code>radexpand</code> is <code>false</code>, or <code>radexpand</code> is <code>true</code> and <code>domain</code> is <code>complex</code>,
<code>sqrt(x^2)</code> is not simplified.
</li></ul>
<p>Note that <code>domain</code> only matters when <code>radexpand</code> is <code>true</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-radsubstflag"></a>
</p><dl>
<dt><u>Option variable:</u> <b>radsubstflag</b>
<a name="IDX240"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p><code>radsubstflag</code>, if <code>true</code>, permits <code>ratsubst</code> to make
substitutions such as <code>u</code> for <code>sqrt (x)</code> in <code>x</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-rassociative"></a>
</p><dl>
<dt><u>Declaration:</u> <b>rassociative</b>
<a name="IDX241"></a>
</dt>
<dd><p><code>declare (g, rassociative)</code> tells the Maxima
simplifier that <code>g</code> is right-associative. E.g.,
<code>g(g(a, b), g(c, d))</code> simplifies to <code>g(a, g(b, g(c, d)))</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
·
<a href="maxima_95.html#Category_003a-Operators">Operators</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-scsimp"></a>
</p><dl>
<dt><u>Function:</u> <b>scsimp</b><i> (<var>expr</var>, <var>rule_1</var>, ..., <var>rule_n</var>)</i>
<a name="IDX242"></a>
</dt>
<dd><p>Sequential Comparative Simplification (method due to Stoute).
<code>scsimp</code> attempts to simplify <var>expr</var>
according to the rules <var>rule_1</var>, ..., <var>rule_n</var>.
If a smaller expression is obtained, the process
repeats. Otherwise after all simplifications are tried, it returns
the original answer.
</p>
<p><code>example (scsimp)</code> displays some examples.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Simplification-functions">Simplification functions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-simp"></a>
</p><dl>
<dt><u>Option variable:</u> <b>simp</b>
<a name="IDX243"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p><code>simp</code> enables simplification. This is the standard. <code>simp</code> is also
an <code>evflag</code>, which is recognized by the function <code>ev</code>. See <code>ev</code>.
</p>
<p>When <code>simp</code> is used as an <code>evflag</code> with a value <code>false</code>, the
simplification is suppressed only during the evaluation phase of an expression.
The flag can not suppress the simplification which follows the evaluation
phase.
</p>
<p>Examples:
</p>
<p>The simplification is switched off globally. The expression <code>sin(1.0)</code> is
not simplified to its numerical value. The <code>simp</code>-flag switches the
simplification on.
</p>
<pre class="example">(%i1) simp:false;
(%o1) false
(%i2) sin(1.0);
(%o2) sin(1.0)
(%i3) sin(1.0),simp;
(%o3) .8414709848078965
</pre>
<p>The simplification is switched on again. The <code>simp</code>-flag cannot suppress
the simplification completely. The output shows a simplified expression, but
the variable <code>x</code> has an unsimplified expression as a value, because the
assignment has occurred during the evaluation phase of the expression.
</p>
<pre class="example">(%i4) simp:true;
(%o4) true
(%i5) x:sin(1.0),simp:false;
(%o5) .8414709848078965
(%i6) :lisp $X
((%SIN) 1.0)
</pre>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Evaluation-flags">Evaluation flags</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-simpsum"></a>
</p><dl>
<dt><u>Option variable:</u> <b>simpsum</b>
<a name="IDX244"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>simpsum</code> is <code>true</code>, the result of a <code>sum</code> is
simplified. This simplification may sometimes be able to produce a
closed form. If <code>simpsum</code> is <code>false</code> or if the quoted form <code>'sum</code> is used, the value is a
sum noun form which is a representation of the sigma notation used in
mathematics.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Sums-and-products">Sums and products</a>
·
<a href="maxima_95.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-sumcontract"></a>
</p><dl>
<dt><u>Function:</u> <b>sumcontract</b><i> (<var>expr</var>)</i>
<a name="IDX245"></a>
</dt>
<dd><p>Combines all sums of an addition that have
upper and lower bounds that differ by constants. The result is an
expression containing one summation for each set of such summations
added to all appropriate extra terms that had to be extracted to form
this sum. <code>sumcontract</code> combines all compatible sums and uses one of
the indices from one of the sums if it can, and then try to form a
reasonable index if it cannot use any supplied.
</p>
<p>It may be necessary to do an <code>intosum (<var>expr</var>)</code> before the <code>sumcontract</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Sums-and-products">Sums and products</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-sumexpand"></a>
</p><dl>
<dt><u>Option variable:</u> <b>sumexpand</b>
<a name="IDX246"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>sumexpand</code> is <code>true</code>, products of sums and
exponentiated sums simplify to nested sums.
</p>
<p>See also <code>cauchysum</code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) sumexpand: true$
(%i2) sum (f (i), i, 0, m) * sum (g (j), j, 0, n);
m n
==== ====
\ \
(%o2) > > f(i1) g(i2)
/ /
==== ====
i1 = 0 i2 = 0
(%i3) sum (f (i), i, 0, m)^2;
m m
==== ====
\ \
(%o3) > > f(i3) f(i4)
/ /
==== ====
i3 = 0 i4 = 0
</pre>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Sums-and-products">Sums and products</a>
·
<a href="maxima_95.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-sumsplitfact"></a>
</p><dl>
<dt><u>Option variable:</u> <b>sumsplitfact</b>
<a name="IDX247"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>sumsplitfact</code> is <code>false</code>,
<code>minfactorial</code> is applied after a <code>factcomb</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Gamma-and-factorial-functions">Gamma and factorial functions</a>
·
<a href="maxima_95.html#Category_003a-Simplification-flags-and-variables">Simplification flags and variables</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-symmetric"></a>
</p><dl>
<dt><u>Declaration:</u> <b>symmetric</b>
<a name="IDX248"></a>
</dt>
<dd><p><code>declare (h, symmetric)</code> tells the Maxima
simplifier that <code>h</code> is a symmetric function. E.g., <code>h (x, z, y)</code>
simplifies to <code>h (x, y, z)</code>.
</p>
<p><code>commutative</code> is synonymous with <code>symmetric</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
·
<a href="maxima_95.html#Category_003a-Operators">Operators</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-unknown"></a>
</p><dl>
<dt><u>Function:</u> <b>unknown</b><i> (<var>expr</var>)</i>
<a name="IDX249"></a>
</dt>
<dd><p>Returns <code>true</code> if and only if <var>expr</var> contains an operator or function
not recognized by the Maxima simplifier.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Predicate-functions">Predicate functions</a>
·
<a href="maxima_95.html#Category_003a-Simplification-functions">Simplification functions</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-Plotting"></a>
</p><hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC29" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="maxima_8.html#SEC31" 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_79.html#SEC331" 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>Robert Dodier</em> on <em>April, 24 2010</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
</font>
<br>
</p>
</body>
</html>
|