File: maxima_65.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 (958 lines) | stat: -rw-r--r-- 43,139 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
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
<!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: 65. simplification</title>

<meta name="description" content="Maxima Manual: 65. simplification">
<meta name="keywords" content="Maxima Manual: 65. 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="SEC232"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_64.html#SEC231" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC233" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima_64.html#SEC229" 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_66.html#SEC242" 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"> 65. simplification </h1>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC233">65.1 Introduction to simplification</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC234">65.2 Definitions for simplification</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="Introduction-to-simplification"></a>
<a name="SEC233"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC232" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC234" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC232" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC232" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_66.html#SEC242" 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"> 65.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>
<hr size="6">
<a name="Definitions-for-simplification"></a>
<a name="SEC234"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC233" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC235" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC232" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC232" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_66.html#SEC242" 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"> 65.2 Definitions for simplification </h2>


<hr size="6">
<a name="SEC235"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC234" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC236" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC232" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC234" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_66.html#SEC242" 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>
<h3 class="subsection"> 65.2.1 Package absimp </h3>

<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>
<table><tr><td>&nbsp;</td><td><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></td></tr></table>


<hr size="6">
<a name="SEC236"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC235" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC237" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC232" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC234" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_66.html#SEC242" 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>
<h3 class="subsection"> 65.2.2 Package facexp </h3>

<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>
<dl>
<dt><u>Function:</u> <b>facsum</b><i> (<var>expr</var>, <var>arg_1</var>, ..., <var>arg_n</var>)</i>
<a name="IDX1837"></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.   With  no  variable  specification,  for example
<code>facsum (<var>expr</var>)</code>, the  result returned  is the same  as that  returned by
<code>ratsimp (<var>expr</var>)</code>.
</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></dd></dl>

<dl>
<dt><u>Global variable:</u> <b>nextlayerfactor</b>
<a name="IDX1838"></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></dd></dl>

<dl>
<dt><u>Global variable:</u> <b>facsum_combine</b>
<a name="IDX1839"></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></dd></dl>

<dl>
<dt><u>Function:</u> <b>factorfacsum</b><i> (<var>expr</var>, <var>arg_1</var>, ... <var>arg_n</var>)</i>
<a name="IDX1840"></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></dd></dl>

<dl>
<dt><u>Function:</u> <b>collectterms</b><i> (<var>arg_1</var>, ..., <var>arg_n</var>)</i>
<a name="IDX1841"></a>
</dt>
<dd><p>If several  expressions  have been
simplified  with  <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></dd></dl>


<hr size="6">
<a name="SEC237"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC236" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC238" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC232" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC234" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_66.html#SEC242" 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>
<h3 class="subsection"> 65.2.3 Package functs </h3>

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

<dl>
<dt><u>Function:</u> <b>wronskian</b><i> ([<var>f_1</var>, ..., <var>f_n</var>], <var>x</var>)</i>
<a name="IDX1843"></a>
</dt>
<dd><p>Returns the Wronskian matrix of the functions <var>f_1</var>, ..., <var>f_n</var> in the variable <var>x</var>.
</p>
<p><var>f_1</var>, ..., <var>f_n</var> may be the names of user-defined functions,
or expressions in the variable <var>x</var>.
</p>
<p>The determinant of the Wronskian matrix is the Wronskian determinant of the set of functions.
The functions are linearly dependent if this determinant is zero.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p></dd></dl>


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

<dl>
<dt><u>Function:</u> <b>rational</b><i> (<code>z</code>)</i>
<a name="IDX1845"></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></dd></dl>

<dl>
<dt><u>Function:</u> <b>logand</b><i> (<code>x</code>,<code>y</code>)</i>
<a name="IDX1846"></a>
</dt>
<dd><p>Returns logical (bit-wise) &quot;and&quot; of arguments x and y.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p></dd></dl>

<dl>
<dt><u>Function:</u> <b>logor</b><i> (<code>x</code>,<code>y</code>)</i>
<a name="IDX1847"></a>
</dt>
<dd><p>Returns logical (bit-wise) &quot;or&quot; of arguments x and y.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p></dd></dl>

<dl>
<dt><u>Function:</u> <b>logxor</b><i> (<code>x</code>,<code>y</code>)</i>
<a name="IDX1848"></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></dd></dl>



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

<dl>
<dt><u>Function:</u> <b>linear</b><i> (<var>expr</var>, <var>x</var>)</i>
<a name="IDX1850"></a>
</dt>
<dd><p>When <var>expr</var> is an expression linear in variable <var>x</var>,
<code>linear</code> returns <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>.
Otherwise, <code>linear</code> returns <var>expr</var>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p></dd></dl>

<dl>
<dt><u>Function:</u> <b>gcdivide</b><i> (<var>p</var>, <var>q</var>)</i>
<a name="IDX1851"></a>
</dt>
<dd><p>When <code>takegcd</code> is <code>true</code>,
<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.
</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></dd></dl>


<dl>
<dt><u>Function:</u> <b>arithmetic</b><i> (<var>a</var>, <var>d</var>, <var>n</var>)</i>
<a name="IDX1852"></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></dd></dl>

<dl>
<dt><u>Function:</u> <b>geometric</b><i> (<var>a</var>, <var>r</var>, <var>n</var>)</i>
<a name="IDX1853"></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></dd></dl>

<dl>
<dt><u>Function:</u> <b>harmonic</b><i> (<var>a</var>, <var>b</var>, <var>c</var>, <var>n</var>)</i>
<a name="IDX1854"></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></dd></dl>

<dl>
<dt><u>Function:</u> <b>arithsum</b><i> (<var>a</var>, <var>d</var>, <var>n</var>)</i>
<a name="IDX1855"></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></dd></dl>

<dl>
<dt><u>Function:</u> <b>geosum</b><i> (<var>a</var>, <var>r</var>, <var>n</var>)</i>
<a name="IDX1856"></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></dd></dl>

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

<dl>
<dt><u>Function:</u> <b>gd</b><i> (<var>x</var>)</i>
<a name="IDX1858"></a>
</dt>
<dd><p>Returns the Gudermannian function
<code>2 * atan(%e^<var>x</var> - %pi/2)</code>.
</p>
<p>To use this function write first <code>load(functs)</code>.
</p></dd></dl>

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

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

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

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

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

<dl>
<dt><u>Function:</u> <b>combination</b><i> (<var>n</var>, <var>r</var>)</i>
<a name="IDX1864"></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></dd></dl>

<dl>
<dt><u>Function:</u> <b>permutation</b><i> (<var>n</var>, <var>r</var>)</i>
<a name="IDX1865"></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></dd></dl>

<hr size="6">
<a name="SEC238"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC237" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC239" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC232" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC234" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_66.html#SEC242" 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>
<h3 class="subsection"> 65.2.4 Package ineq </h3>

<p>The <code>ineq</code> package contains simplification rules
for inequalities.
</p>
<p>Example session:
</p>
<table><tr><td>&nbsp;</td><td><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&gt;=4;  /* a sample inequality */
(%o2)                               a &gt;= 4
(%i3) (b&gt;c)+%; /* add a second, strict inequality */
(%o3)                            b + a &gt; c + 4
(%i4) 7*(x&lt;y); /* multiply by a positive number */
(%o4)                              7 x &lt; 7 y
(%i5) -2*(x&gt;=3*z); /* multiply by a negative number */
(%o5)                           - 2 x &lt;= - 6 z
(%i6) (1+a^2)*(1/(1+a^2)&lt;=1); /* Maxima knows that 1+a^2 &gt; 0 */
                                        2
(%o6)                             1 &lt;= a  + 1
(%i7) assume(x&gt;0)$ x*(2&lt;3); /* assuming x&gt;0 */
(%o7)                              2 x &lt; 3 x
(%i8) a&gt;=b; /* another inequality */
(%o8)                               a &gt;= b
(%i9) 3+%; /* add something */
(%o9)                           a + 3 &gt;= b + 3
(%i10) %-3; /* subtract it out */
(%o10)                              a &gt;= b
(%i11) a&gt;=c-b; /* yet another inequality */
(%o11)                            a &gt;= c - b
(%i12) b+%; /* add b to both sides */
(%o12)                            b + a &gt;= c
(%i13) %-c; /* subtract c from both sides */
(%o13)                         - c + b + a &gt;= 0
(%i14) -%;  /* multiply by -1 */
(%o14)                          c - b - a &lt;= 0
(%i15) (z-1)^2&gt;-2*z; /* determining truth of assertion */
                                      2
(%o15)                         (z - 1)  &gt; - 2 z
(%i16) expand(%)+2*z; /* expand this and add 2*z to both sides */
                                   2
(%o16)                            z  + 1 &gt; 0
(%i17) %,pred;
(%o17)                               true
</pre></td></tr></table>
<p>Be careful about using parentheses
around the inequalities: when the user types in <code>(A &gt; B) + (C = 5)</code> the
result is <code>A + C &gt; B + 5</code>, but <code>A &gt; B + C = 5</code> is a syntax error,
and <code>(A &gt; 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>
<table><tr><td>&nbsp;</td><td><pre class="example">eq: a &gt; b;
2*eq;
% - eq;
</pre></td></tr></table>
<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 (&quot;+&quot;, &quot;+rule1&quot;)</code> to specifically remove the first rule on <code>&quot;+&quot;</code>
or <code>disprule (&quot;*rule2&quot;)</code> to display the definition of the second multiplicative rule.
</p>

<hr size="6">
<a name="SEC239"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC238" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC240" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC232" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC234" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_66.html#SEC242" 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>
<h3 class="subsection"> 65.2.5 Package rducon </h3>

<dl>
<dt><u>Function:</u> <b>reduce_consts</b><i> (<var>expr</var>)</i>
<a name="IDX1866"></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>
<table><tr><td>&nbsp;</td><td><pre class="example">declare ([<var>objects to be given the constant property</var>], constant)$
</pre></td></tr></table>
<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>
<table><tr><td>&nbsp;</td><td><pre class="example">map ('fortran, const_eqns)$
</pre></td></tr></table>
<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></dd></dl>


<hr size="6">
<a name="SEC240"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC239" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC241" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC232" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC234" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_66.html#SEC242" 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>
<h3 class="subsection"> 65.2.6 Package scifac </h3>

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

<hr size="6">
<a name="SEC241"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC240" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_66.html#SEC242" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC232" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC234" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_66.html#SEC242" 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>
<h3 class="subsection"> 65.2.7 Package sqdnst </h3>

<dl>
<dt><u>Function:</u> <b>sqrtdenest</b><i> (<var>expr</var>)</i>
<a name="IDX1868"></a>
</dt>
<dd><p>Denests <code>sqrt</code> of simple, numerical, binomial surds, where possible.  E.g.
</p>
<table><tr><td>&nbsp;</td><td><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></td></tr></table>
<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></dd></dl>


<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC232" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_66.html#SEC242" 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>