File: maxima_3.html

package info (click to toggle)
maxima 5.21.1-2squeeze
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 94,928 kB
  • ctags: 43,849
  • sloc: lisp: 298,974; fortran: 14,666; perl: 14,325; tcl: 10,494; sh: 4,052; makefile: 2,975; ansic: 471; awk: 24; sed: 7
file content (750 lines) | stat: -rw-r--r-- 29,147 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
<!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: 3. Help</title>

<meta name="description" content="Maxima 5.21.1 Manual: 3. Help">
<meta name="keywords" content="Maxima 5.21.1 Manual: 3. Help">
<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="Help"></a>
<a name="SEC4"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_2.html#SEC3" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC5" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima_2.html#SEC2" 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_4.html#SEC9" 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_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"> 3. Help </h1>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC5">3.1 Lisp and Maxima</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">            
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC6">3.2 Garbage Collection</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">          
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC7">3.3 Documentation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">               
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC8">3.4 Functions and Variables for Help</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">        
</td></tr>
</table>

<p><a name="Item_003a-Lisp-and-Maxima"></a>
</p><hr size="6">
<a name="Lisp-and-Maxima"></a>
<a name="SEC5"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC4" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC6" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC4" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC4" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_4.html#SEC9" 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_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"> 3.1 Lisp and Maxima </h2>
<p>Maxima is written in Lisp, and it is easy to access Lisp functions and variables
from Maxima and vice versa.
Lisp and Maxima symbols are distinguished by a naming convention.
A Lisp symbol which begins with a dollar sign <code>$</code> corresponds to
a Maxima symbol without the dollar sign.
A Maxima symbol which begins with a question mark <code>?</code> corresponds to
a Lisp symbol without the question mark.
For example, the Maxima symbol <code>foo</code> corresponds to the Lisp symbol <code>$foo</code>,
while the Maxima symbol <code>?foo</code> corresponds to the Lisp symbol <code>foo</code>,
Note that <code>?foo</code> is written without a space between <code>?</code> and <code>foo</code>;
otherwise it might be mistaken for <code>describe (&quot;foo&quot;)</code>.
</p>
<p>Hyphen <code>-</code>, asterisk <code>*</code>, or other special characters in Lisp symbols
must be escaped by backslash <code>\</code> where they appear in Maxima code.
For example, the Lisp identifier <code>*foo-bar*</code> is written <code>?\*foo\-bar\*</code> in Maxima.
</p>
<p>Lisp code may be executed from within a Maxima session.
A single line of Lisp (containing one or more forms) may be executed
by the special command <code>:lisp</code>. For example,
</p>
<pre class="example">(%i1) :lisp (foo $x $y)
</pre>

<p>calls the Lisp function <code>foo</code> with Maxima variables <code>x</code> and <code>y</code> as arguments.
The <code>:lisp</code> construct can appear at the interactive prompt
or in a file processed by <code>batch</code> or <code>demo</code>, but not in a file processed by
<code>load</code>, <code>batchload</code>, <code>translate_file</code>, or <code>compile_file</code>.
</p>
<p>The function <code>to_lisp()</code> opens an interactive Lisp session.
Entering <code>(to-maxima)</code> closes the Lisp session and returns to Maxima.
</p>
<p>Lisp functions and variables which are to be visible in Maxima as
functions and variables with ordinary names (no special punctuation)
must have Lisp names beginning with the dollar sign <code>$</code>.
</p>
<p>Maxima is case-sensitive, distinguishing between lowercase and uppercase letters
in identifiers, while Lisp is not.
There are some rules governing the translation of names between Lisp and Maxima.
</p>
<ol>
<li>
A Lisp identifier not enclosed in vertical bars corresponds to a Maxima identifier
in lowercase.
Whether the Lisp identifier is uppercase, lowercase, or mixed case, is ignored.
E.g., Lisp <code>$foo</code>, <code>$FOO</code>, and <code>$Foo</code> all correspond to Maxima <code>foo</code>.
</li><li>
A Lisp identifier which is all uppercase or all lowercase
and enclosed in vertical bars corresponds to a Maxima identifier with case reversed.
That is, uppercase is changed to lowercase and lowercase to uppercase.
E.g., Lisp <code>|$FOO|</code> and <code>|$foo|</code>
correspond to Maxima <code>foo</code> and <code>FOO</code>, respectively.
</li><li>
A Lisp identifier which is mixed uppercase and lowercase
and enclosed in vertical bars corresponds to a Maxima identifier with the same case.
E.g., Lisp <code>|$Foo|</code> corresponds to Maxima <code>Foo</code>.
</li></ol>

<p>The <code>#$</code> Lisp macro allows the use of Maxima expressions in Lisp code.
<code>#$<var>expr</var>$</code> expands to a Lisp expression equivalent to the Maxima expression <var>expr</var>.
</p>
<pre class="example">(msetq $foo #$[x, y]$)
</pre>

<p>This has the same effect as entering
</p>
<pre class="example">(%i1) foo: [x, y];
</pre>

<p>The Lisp function <code>displa</code> prints an expression in Maxima format.
</p>
<pre class="example">(%i1) :lisp #$[x, y, z]$ 
((MLIST SIMP) $X $Y $Z)
(%i1) :lisp (displa '((MLIST SIMP) $X $Y $Z))
[x, y, z]
NIL
</pre>
<p>Functions defined in Maxima are not ordinary Lisp functions.
The Lisp function <code>mfuncall</code> calls a Maxima function.
For example:
</p>
<pre class="example">(%i1) foo(x,y) := x*y$
(%i2) :lisp (mfuncall '$foo 'a 'b)
((MTIMES SIMP) A B)
</pre>
<p>Some Lisp functions are shadowed in the Maxima package, namely the following.
</p>
<p><code>complement</code>,
<code>continue</code>,
<code>//</code>,
<code>float</code>,
<code>functionp</code>,
<code>array</code>,
<code>exp</code>,
<code>listen</code>,
<code>signum</code>,
<code>atan</code>,
<code>asin</code>,
<code>acos</code>,
<code>asinh</code>,
<code>acosh</code>,
<code>atanh</code>,
<code>tanh</code>,
<code>cosh</code>,
<code>sinh</code>,
<code>tan</code>,
<code>break</code>,
and <code>gcd</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_95.html#Category_003a-Programming">Programming</a>
</p>
</div>


<p><a name="Item_003a-Garbage-Collection"></a>
</p><hr size="6">
<a name="Garbage-Collection"></a>
<a name="SEC6"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC5" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC4" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC4" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_4.html#SEC9" 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_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"> 3.2 Garbage Collection </h2>
<p>Symbolic computation tends to create a good deal
of garbage, and effective handling of this can be crucial to successful
completion of some programs.
</p>
<p>Under GCL, on UNIX systems where the mprotect system call is available
(including SUN OS 4.0 and some variants of BSD) a stratified garbage collection
is available.   This limits the collection to pages which have been recently
written to.    See the GCL documentation under ALLOCATE and GBC.   At the
Lisp level doing (setq si::*notify-gbc* t) will help you determine which
areas might need more space.
</p>
<p><a name="Item_003a-Documentation"></a>
</p><hr size="6">
<a name="Documentation"></a>
<a name="SEC7"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC6" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC8" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC4" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC4" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_4.html#SEC9" 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_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"> 3.3 Documentation </h2>


<p>The Maxima on-line user's manual can be viewed in different forms.
From the Maxima interactive prompt, the user's manual
is viewed as plain text by the <code>?</code> command (i.e., the <code>describe</code> function).
The user's manual is viewed as <code>info</code> hypertext by the <code>info</code> viewer program
and as a web page by any ordinary web browser.
</p>
<p><code>example</code> displays examples for many Maxima functions.
For example,
</p>
<pre class="example">(%i1) example (integrate);
</pre>
<p>yields
</p>
<pre class="example">(%i2) test(f):=block([u],u:integrate(f,x),ratsimp(f-diff(u,x)))
(%o2) test(f) := block([u], u : integrate(f, x), 

                                         ratsimp(f - diff(u, x)))
(%i3) test(sin(x))
(%o3)                           0
(%i4) test(1/(x+1))
(%o4)                           0
(%i5) test(1/(x^2+1))
(%o5)                           0
</pre>
<p>and additional output.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_95.html#Category_003a-Console-interaction">Console interaction</a>
</p>
</div>


<p><a name="Item_003a-Functions-and-Variables-for-Help"></a>
</p><hr size="6">
<a name="Functions-and-Variables-for-Help"></a>
<a name="SEC8"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC7" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_4.html#SEC9" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC4" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC4" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_4.html#SEC9" 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_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"> 3.4 Functions and Variables for Help </h2>

<p><a name="Item_003a-apropos"></a>
</p><dl>
<dt><u>Function:</u> <b>apropos</b><i> (<var>string</var>)</i>
<a name="IDX5"></a>
</dt>
<dd><p>Searches for Maxima names which have <var>string</var> appearing anywhere within
them.  Thus, <code>apropos (exp)</code> returns a list of all the flags and functions
which have <code>exp</code> as part of their names, such as <code>expand</code>, <code>exp</code>,
and <code>exponentialize</code>.  Thus if you can only remember part of the name of
something you can use this command to find the rest of the name. Similarly, you
could say <code>apropos (tr_)</code> to find a list of many of the switches relating
to the translator, most of which begin with <code>tr_</code>.
</p>
<p><code>apropos(&quot;&quot;)</code> returns a list with all Maxima names. 
</p>
<p><code>apropos</code> returns the empty list <code>[]</code>, if no name is found.
</p>
<p>Example:
</p>
<p>Show all Maxima symbols wich have <code>&quot;gamma&quot;</code> in the name:
</p>
<pre class="example">(%i1) apropos(&quot;gamma&quot;);
(%o1) [%gamma, %gammagreek, gamma, gammagreek, gammalim, gamma_expand, 
gamma_imag, gamma_incomplete, gamma_incomplete_generalized, 
gamma_incomplete_regularized, gamma_radius, Gamma, log_gamma, makegamma, 
gamma_incomplete_generalized_regularized]
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_95.html#Category_003a-Help">Help</a>
</p>
</div>

</dd></dl>

<p><a name="Item_003a-demo"></a>
</p><dl>
<dt><u>Function:</u> <b>demo</b><i> (<var>filename</var>)</i>
<a name="IDX6"></a>
</dt>
<dd><p>Evaluates Maxima expressions in <var>filename</var> and displays the results.
<code>demo</code> pauses after evaluating each expression
and continues after the user enters a carriage return.
(If running in Xmaxima, <code>demo</code> may need to see a semicolon <code>;</code>
followed by a carriage return.)
</p>
<p><code>demo</code> searches the list of directories
<code>file_search_demo</code> to find <code>filename</code>.
If the file has the suffix <code>dem</code>,
the suffix may be omitted.
See also <code>file_search</code>.
</p>
<p><code>demo</code> evaluates its argument.
<code>demo</code> returns the name of the demonstration file.
</p>
<p>Example:
</p>
<pre class="example">(%i1) demo (&quot;disol&quot;);

batching /home/wfs/maxima/share/simplification/disol.dem
 At the _ prompt, type ';' followed by enter to get next demo
(%i2)                      load(disol)

_
(%i3)           exp1 : a (e (g + f) + b (d + c))
(%o3)               a (e (g + f) + b (d + c))

_
(%i4)                disolate(exp1, a, b, e)
(%t4)                         d + c

(%t5)                         g + f

(%o5)                   a (%t5 e + %t4 b)

_
(%i5) demo (&quot;rncomb&quot;);

batching /home/wfs/maxima/share/simplification/rncomb.dem
 At the _ prompt, type ';' followed by enter to get next demo
(%i6)                     load(rncomb)

_
                             z         x
(%i7)               exp1 : ----- + ---------
                           y + x   2 (y + x)
                          z         x
(%o7)                   ----- + ---------
                        y + x   2 (y + x)

_
(%i8)                     combine(exp1)
                          z         x
(%o8)                   ----- + ---------
                        y + x   2 (y + x)

_
(%i9)                     rncombine(%)
                             2 z + x
(%o9)                       ---------
                            2 (y + x)

_
                             d   c   b   a
(%i10)                exp2 : - + - + - + -
                             3   3   2   2
                          d   c   b   a
(%o10)                    - + - + - + -
                          3   3   2   2

_
(%i11)                    combine(exp2)
                      2 d + 2 c + 3 (b + a)
(%o11)                ---------------------
                                6

_
(%i12)                   rncombine(exp2)
                      2 d + 2 c + 3 b + 3 a
(%o12)                ---------------------
                                6

_
(%i13) 
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_95.html#Category_003a-Help">Help</a>
 &middot;
<a href="maxima_95.html#Category_003a-Console-interaction">Console interaction</a>
 &middot;
<a href="maxima_95.html#Category_003a-File-input">File input</a>
</p>
</div>


</dd></dl>

<p><a name="Item_003a-describe"></a>
</p><dl>
<dt><u>Function:</u> <b>describe</b><i> (<var>string</var>)</i>
<a name="IDX7"></a>
</dt>
<dt><u>Function:</u> <b>describe</b><i> (<var>string</var>, exact)</i>
<a name="IDX8"></a>
</dt>
<dt><u>Function:</u> <b>describe</b><i> (<var>string</var>, inexact)</i>
<a name="IDX9"></a>
</dt>
<dd><p><code>describe(<var>string</var>)</code> is equivalent to <code>describe(<var>string</var>, exact)</code>.
</p>
<p><code>describe(<var>string</var>, exact)</code> finds an item with title equal
(case-insensitive)
to <var>string</var>, if there is any such item.
</p>
<p><code>describe(<var>string</var>, inexact)</code> finds all documented items which contain <var>string</var> in their titles.
If there is more than one such item, Maxima asks the user to select
an item or items to display.
</p>
<p>At the interactive prompt,
<code>? foo</code> (with a space between <code>?</code> and <code>foo</code>)
is equivalent to <code>describe(&quot;foo&quot;, exact)</code>,
and <code>?? foo</code> is equivalent to <code>describe(&quot;foo&quot;, inexact)</code>.
</p>
<p><code>describe(&quot;&quot;, inexact)</code> yields a list of all topics documented in the on-line manual.
</p>
<p><code>describe</code> quotes its argument.
<code>describe</code> returns <code>true</code> if some documentation is found, otherwise <code>false</code>.
</p>
<p>See also <a href="#SEC7">Documentation</a>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) ?? integ
 0: Functions and Variables for Elliptic Integrals
 1: Functions and Variables for Integration
 2: Introduction to Elliptic Functions and Integrals
 3: Introduction to Integration
 4: askinteger  (Functions and Variables for Simplification)
 5: integerp  (Functions and Variables for Miscellaneous Options)
 6: integer_partitions  (Functions and Variables for Sets)
 7: integrate  (Functions and Variables for Integration)
 8: integrate_use_rootsof  (Functions and Variables for
    Integration)
 9: integration_constant_counter  (Functions and Variables for
    Integration)
 10: nonnegintegerp  (Functions and Variables for linearalgebra)
Enter space-separated numbers, `all' or `none': 7 8

 -- Function: integrate (&lt;expr&gt;, &lt;x&gt;)
 -- Function: integrate (&lt;expr&gt;, &lt;x&gt;, &lt;a&gt;, &lt;b&gt;)
     Attempts to symbolically compute the integral of &lt;expr&gt; with
     respect to &lt;x&gt;.  `integrate (&lt;expr&gt;, &lt;x&gt;)' is an indefinite
     integral, while `integrate (&lt;expr&gt;, &lt;x&gt;, &lt;a&gt;, &lt;b&gt;)' is a
     definite integral, [...]
     
 -- Option variable: integrate_use_rootsof
     Default value: `false'

     When `integrate_use_rootsof' is `true' and the denominator of
     a rational function cannot be factored, `integrate' returns
     the integral in a form which is a sum over the roots (not yet
     known) of the denominator.
     [...]
</pre>
<p>In this example, items 7 and 8 were selected 
(output is shortened as indicated by <code>[...]</code>.
All or none of the items could have been selected by entering <code>all</code> or <code>none</code>,
which can be abbreviated <code>a</code> or <code>n</code>, respectively.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_95.html#Category_003a-Help">Help</a>
 &middot;
<a href="maxima_95.html#Category_003a-Console-interaction">Console interaction</a>
</p>
</div>

</dd></dl>

<p><a name="Item_003a-example"></a>
</p><dl>
<dt><u>Function:</u> <b>example</b><i> (<var>topic</var>)</i>
<a name="IDX10"></a>
</dt>
<dt><u>Function:</u> <b>example</b><i> ()</i>
<a name="IDX11"></a>
</dt>
<dd><p><code>example (<var>topic</var>)</code> displays some examples of <var>topic</var>, which is a
symbol or a string. To get examples for operators like <code>if</code>, <code>do</code>, or
<code>lambda</code> the argument must be a string, e.g. <code>example (&quot;do&quot;)</code>. 
<code>example</code> is not case sensitive. Most topics are function names.
</p>
<p><code>example ()</code> returns the list of all recognized topics.
</p>
<p>The name of the file containing the examples is given by the global option 
variable <code>manual_demo</code>, which defaults to <code>&quot;manual.demo&quot;</code>.
</p>
<p><code>example</code> quotes its argument. <code>example</code> returns <code>done</code> unless
no examples are found or there is no argument, in which case <code>example</code>
returns the list of all recognized topics.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) example(append);
(%i2) append([x+y,0,-3.2],[2.5E+20,x])
(%o2)                    [y + x, 0, - 3.2, 2.5E+20, x]
(%o2)                                done
(%i3) example(&quot;lambda&quot;);
(%i4) lambda([x,y,z],z^2+y^2+x^2)
                                           2    2    2
(%o4)                   lambda([x, y, z], z  + y  + x )
(%i5) %(1,2,a)
                                     2
(%o5)                               a  + 5
(%i6) a+2+1
(%o6)                                a + 3
(%o6)                                done
(%i7) example(&quot;allROOTS&quot;);
(%i8) (1+2*x)^3 = 13.5*(1+x^5)
                                   3          5
(%o8)                     (2 x + 1)  = 13.5 (x  + 1)
(%i9) allroots(%)
(%o9) [x = .8296749902129361, x = - 1.015755543828121, 
x = .9659625152196369 %i - .4069597231924075, 
x = - .9659625152196369 %i - .4069597231924075, x = 1.0]
(%o9)                                done
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_95.html#Category_003a-Help">Help</a>
 &middot;
<a href="maxima_95.html#Category_003a-Console-interaction">Console interaction</a>
</p>
</div>

</dd></dl>

<p><a name="Item_003a-manual_005fdemo"></a>
</p><dl>
<dt><u>Option variable:</u> <b>manual_demo</b>
<a name="IDX12"></a>
</dt>
<dd><p>Default value: <code>&quot;manual.demo&quot;</code>
</p>
<p><code>manual_demo</code> specifies the name of the file containing the examples for 
the function <code>example</code>. See <code>example</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_95.html#Category_003a-Help">Help</a>
 &middot;
<a href="maxima_95.html#Category_003a-Global-variables">Global variables</a>
</p>
</div>

</dd></dl>


<p><a name="Item_003a-Command-Line"></a>
</p><hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC4" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_4.html#SEC9" 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_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>