File: maxima_7.html

package info (click to toggle)
maxima 5.10.0-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 44,268 kB
  • ctags: 17,987
  • sloc: lisp: 152,894; fortran: 14,667; perl: 14,204; tcl: 10,103; sh: 3,376; makefile: 2,202; ansic: 471; awk: 7
file content (914 lines) | stat: -rw-r--r-- 33,153 bytes parent folder | download
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on September, 20 2006 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 Manual: 7. Simplification</title>

<meta name="description" content="Maxima Manual: 7. Simplification">
<meta name="keywords" content="Maxima 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: none;
    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 */
    font-family: "Lucida Console", monospace
}

div.spacerbox
{
    border: none;
    padding-top: 2em;
    padding-bottom: 2em
}

div.image
{
    margin: 0;
    padding: 1em;
    text-align: center;
}
-->
</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="SEC31"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_6.html#SEC30" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC32" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima_6.html#SEC21" title="Beginning of this chapter or previous chapter"> &lt;&lt; </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#SEC33" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </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_72.html#SEC264" 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="#SEC32">7.1 Definitions for Simplification</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">  
</td></tr>
</table>

<hr size="6">
<a name="Definitions-for-Simplification"></a>
<a name="SEC32"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC31" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_8.html#SEC33" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_8.html#SEC33" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </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_72.html#SEC264" 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 Definitions for Simplification </h2>

<dl>
<dt><u>System variable:</u> <b>askexp</b>
<a name="IDX184"></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></dd></dl>

<dl>
<dt><u>Function:</u> <b>askinteger</b><i> (<var>expr</var>, integer)</i>
<a name="IDX185"></a>
</dt>
<dt><u>Function:</u> <b>askinteger</b><i> (<var>expr</var>)</i>
<a name="IDX186"></a>
</dt>
<dt><u>Function:</u> <b>askinteger</b><i> (<var>expr</var>, even)</i>
<a name="IDX187"></a>
</dt>
<dt><u>Function:</u> <b>askinteger</b><i> (<var>expr</var>, odd)</i>
<a name="IDX188"></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>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>asksign</b><i> (<var>expr</var>)</i>
<a name="IDX189"></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>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>demoivre</b><i> (<var>expr</var>)</i>
<a name="IDX190"></a>
</dt>
<dt><u>Option variable:</u> <b>demoivre</b>
<a name="IDX191"></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>
</dd></dl>


<dl>
<dt><u>Option variable:</u> <b>domain</b>
<a name="IDX192"></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>

</dd></dl>

<dl>
<dt><u>Function:</u> <b>expand</b><i> (<var>expr</var>)</i>
<a name="IDX193"></a>
</dt>
<dt><u>Function:</u> <b>expand</b><i> (<var>expr</var>, <var>p</var>, <var>n</var>)</i>
<a name="IDX194"></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>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(&quot;facexp&quot;)</code>.
</p>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>expandwrt</b><i> (<var>expr</var>, <var>x_1</var>, ..., <var>x_n</var>)</i>
<a name="IDX195"></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>
</dd></dl>


<dl>
<dt><u>Option variable:</u> <b>expandwrt_denom</b>
<a name="IDX196"></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>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>expandwrt_factored</b><i> (<var>expr</var>, <var>x_1</var>, ..., <var>x_n</var>)</i>
<a name="IDX197"></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>
</dd></dl>


<dl>
<dt><u>Option variable:</u> <b>expon</b>
<a name="IDX198"></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>
</dd></dl>


<dl>
<dt><u>Function:</u> <b>exponentialize</b><i> (<var>expr</var>)</i>
<a name="IDX199"></a>
</dt>
<dt><u>Option variable:</u> <b>exponentialize</b>
<a name="IDX200"></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>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>expop</b>
<a name="IDX201"></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>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>factlim</b>
<a name="IDX202"></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>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>intosum</b><i> (<var>expr</var>)</i>
<a name="IDX203"></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>
</dd></dl>

<dl>
<dt><u>Declaration:</u> <b>lassociative</b>
<a name="IDX204"></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>
</dd></dl>

<dl>
<dt><u>Declaration:</u> <b>linear</b>
<a name="IDX205"></a>
</dt>
<dd><p>One of Maxima's operator properties.  For univariate <code>f</code> so
declared, &quot;expansion&quot; <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 &quot;constant&quot;.  For functions of two or more arguments,
&quot;linearity&quot; 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>
</dd></dl>

<dl>
<dt><u>Declaration:</u> <b>mainvar</b>
<a name="IDX206"></a>
</dt>
<dd><p>You may declare variables to be <code>mainvar</code>.  The ordering
scale for atoms is essentially: numbers &lt; constants (e.g., <code>%e</code>, <code>%pi</code>) &lt;
scalars &lt; other variables &lt; 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>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>maxapplydepth</b>
<a name="IDX207"></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>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>maxapplyheight</b>
<a name="IDX208"></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>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>maxnegex</b>
<a name="IDX209"></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>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>maxposex</b>
<a name="IDX210"></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>
</dd></dl>

<dl>
<dt><u>Declaration:</u> <b>multiplicative</b>
<a name="IDX211"></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>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>negdistrib</b>
<a name="IDX212"></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>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>negsumdispflag</b>
<a name="IDX213"></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>
</dd></dl>

<dl>
<dt><u>Special symbol:</u> <b>noeval</b>
<a name="IDX214"></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>
</dd></dl>

<dl>
<dt><u>Declaration:</u> <b>noun</b>
<a name="IDX215"></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 &quot;noun&quot;, meaning that it won't be evaluated
automatically.
</p>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>noundisp</b>
<a name="IDX216"></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>
</dd></dl>

<dl>
<dt><u>Special symbol:</u> <b>nouns</b>
<a name="IDX217"></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
&quot;noun&quot; forms occurring in the expression being <code>ev</code>'d to &quot;verbs&quot;, i.e.,
evaluates them.  See also <code>noun</code>, <code>nounify</code>, <code>verb</code>, and <code>verbify</code>.
</p>
</dd></dl>

<dl>
<dt><u>Special symbol:</u> <b>numer</b>
<a name="IDX218"></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>
</dd></dl>


<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="IDX219"></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></dd></dl>


<dl>
<dt><u>System variable:</u> <b>opproperties</b>
<a name="IDX220"></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>
</dd></dl>


<dl>
<dt><u>Option variable:</u> <b>opsubst</b>
<a name="IDX221"></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>
</dd></dl>

<dl>
<dt><u>Declaration:</u> <b>outative</b>
<a name="IDX222"></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>
</dd></dl>

<dl>
<dt><u>Declaration:</u> <b>posfun</b>
<a name="IDX223"></a>
</dt>
<dd><p><code>declare (f, posfun)</code> declares <code>f</code> to be a positive function.
<code>is (f(x) &gt; 0)</code> yields <code>true</code>.
</p>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>radcan</b><i> (<var>expr</var>)</i>
<a name="IDX224"></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>When <code>%e_to_numlog</code> is <code>true</code>, 
<code>%e^(r*log(expr))</code> simplifies to <code>expr^r</code> if <code>r</code> is a rational number.
</p>
<p>When <code>radexpand</code> is <code>false</code>, certain transformations are inhibited.
<code>radcan (sqrt (1-x))</code> remains <code>sqrt (1-x)</code>
and is not simplified to <code>%i sqrt (x-1)</code>. 
<code>radcan (sqrt (x^2 - 2*x + 11))</code> remains <code>sqrt (x^2 - 2*x + 1)</code>
and is not simplified to <code>x - 1</code>.
</p>
<p><code>example (radcan)</code> displays some examples.
</p>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>radexpand</b>
<a name="IDX225"></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 &gt; 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>
</dd></dl>


<dl>
<dt><u>Option variable:</u> <b>radsubstflag</b>
<a name="IDX226"></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>
</dd></dl>

<dl>
<dt><u>Declaration:</u> <b>rassociative</b>
<a name="IDX227"></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>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>scsimp</b><i> (<var>expr</var>, <var>rule_1</var>, ..., <var>rule_n</var>)</i>
<a name="IDX228"></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>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>simpsum</b>
<a name="IDX229"></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>
</dd></dl>

<dl>
<dt><u>Function:</u> <b>sumcontract</b><i> (<var>expr</var>)</i>
<a name="IDX230"></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>
</dd></dl>


<dl>
<dt><u>Option variable:</u> <b>sumexpand</b>
<a name="IDX231"></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>
<table><tr><td>&nbsp;</td><td><pre class="example">(%i1) sumexpand: true$
(%i2) sum (f (i), i, 0, m) * sum (g (j), j, 0, n);
                     m      n
                    ====   ====
                    \      \
(%o2)                &gt;      &gt;     f(i1) g(i2)
                    /      /
                    ====   ====
                    i1 = 0 i2 = 0
(%i3) sum (f (i), i, 0, m)^2;
                     m      m
                    ====   ====
                    \      \
(%o3)                &gt;      &gt;     f(i3) f(i4)
                    /      /
                    ====   ====
                    i3 = 0 i4 = 0
</pre></td></tr></table>
</dd></dl>

<dl>
<dt><u>Option variable:</u> <b>sumsplitfact</b>
<a name="IDX232"></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>
</dd></dl>

<dl>
<dt><u>Declaration:</u> <b>symmetric</b>
<a name="IDX233"></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>
</dd></dl>


<dl>
<dt><u>Function:</u> <b>unknown</b><i> (<var>expr</var>)</i>
<a name="IDX234"></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>
</dd></dl>

<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_8.html#SEC33" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </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_72.html#SEC264" 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>September, 20 2006</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
 </font>
 <br>

</p>
</body>
</html>