File: maxima_23.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 (1156 lines) | stat: -rw-r--r-- 41,736 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
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
<!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: 23. Numerical</title>

<meta name="description" content="Maxima 5.21.1 Manual: 23. Numerical">
<meta name="keywords" content="Maxima 5.21.1 Manual: 23. Numerical">
<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="Numerical"></a>
<a name="SEC86"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_22.html#SEC85" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC87" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima_22.html#SEC83" 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_24.html#SEC91" 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"> 23. Numerical </h1>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC87">23.1 Introduction to fast Fourier transform</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">                     
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC88">23.2 Functions and Variables for fast Fourier transform</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC89">23.3 Introduction to Fourier series</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC90">23.4 Functions and Variables for Fourier series</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<p><a name="Item_003a-Introduction-to-fast-Fourier-transform"></a>
</p><hr size="6">
<a name="Introduction-to-fast-Fourier-transform"></a>
<a name="SEC87"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC86" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC88" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC86" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC86" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_24.html#SEC91" 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"> 23.1 Introduction to fast Fourier transform </h2>

<p>The <code>fft</code> package comprises functions for the numerical (not symbolic) computation
of the fast Fourier transform.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_95.html#Category_003a-Fourier-transform">Fourier transform</a>
 &middot;
<a href="maxima_95.html#Category_003a-Numerical-methods">Numerical methods</a>
 &middot;
<a href="maxima_95.html#Category_003a-Share-packages">Share packages</a>
 &middot;
<a href="maxima_95.html#Category_003a-Package-fft">Package fft</a>
</p>
</div>




<p><a name="Item_003a-Functions-and-Variables-for-fast-Fourier-transform"></a>
</p><hr size="6">
<a name="Functions-and-Variables-for-fast-Fourier-transform"></a>
<a name="SEC88"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC87" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC89" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC86" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC86" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_24.html#SEC91" 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"> 23.2 Functions and Variables for fast Fourier transform </h2>

<p><a name="Item_003a-polartorect"></a>
</p><dl>
<dt><u>Function:</u> <b>polartorect</b><i> (<var>r</var>, <var>t</var>)</i>
<a name="IDX788"></a>
</dt>
<dd><p>Translates complex values of the form <code>r %e^(%i t)</code> to the form <code>a + b %i</code>,
where <var>r</var> is the magnitude and <var>t</var> is the phase.
<var>r</var> and <var>t</var> are 1-dimensional arrays of the same size.
The array size need not be a power of 2.
</p>
<p>The original values of the input arrays are
replaced by the real and imaginary parts, <code>a</code> and <code>b</code>, on return.
The outputs are calculated as
</p>
<pre class="example">a = r cos(t)
b = r sin(t)
</pre>
<p><code>polartorect</code> is the inverse function of <code>recttopolar</code>.
</p>
<p><code>load(fft)</code> loads this function. See also <code>fft</code>.
</p>
<div class=categorybox>


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

</dd></dl>

<p><a name="Item_003a-recttopolar"></a>
</p><dl>
<dt><u>Function:</u> <b>recttopolar</b><i> (<var>a</var>, <var>b</var>)</i>
<a name="IDX789"></a>
</dt>
<dd><p>Translates complex values of the form <code>a + b %i</code> to the form <code>r %e^(%i t)</code>,
where <var>a</var> is the real part and <var>b</var> is the imaginary part.
<var>a</var> and <var>b</var> are 1-dimensional arrays of the same size.
The array size need not be a power of 2.
</p>
<p>The original values of the input arrays are
replaced by the magnitude and angle, <code>r</code> and <code>t</code>, on return.
The outputs are calculated as
</p>
<pre class="example">r = sqrt(a^2 + b^2)
t = atan2(b, a)
</pre>
<p>The computed angle is in the range <code>-%pi</code> to <code>%pi</code>. 
</p>
<p><code>recttopolar</code> is the inverse function of <code>polartorect</code>.
</p>
<p><code>load(fft)</code> loads this function. See also <code>fft</code>.
</p>
<div class=categorybox>


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

</dd></dl>

<p><a name="Item_003a-inverse_005ffft"></a>
</p><dl>
<dt><u>Function:</u> <b>inverse_fft</b><i> (<var>y</var>)</i>
<a name="IDX790"></a>
</dt>
<dd><p>Computes the inverse complex fast Fourier transform.
<var>y</var> is a list or array (named or unnamed) which contains the data to transform.
The number of elements must be a power of 2.
The elements must be literal numbers (integers, rationals, floats, or bigfloats)
or symbolic constants,
or expressions <code>a + b*%i</code> where <code>a</code> and <code>b</code> are literal numbers
or symbolic constants.
</p>
<p><code>inverse_fft</code> returns a new object of the same type as <var>y</var>,
which is not modified.
Results are always computed as floats
or expressions <code>a + b*%i</code> where <code>a</code> and <code>b</code> are floats.
</p>
<p>The inverse discrete Fourier transform is defined as follows.
Let <code>x</code> be the output of the inverse transform.
Then for <code>j</code> from 0 through <code>n - 1</code>,
</p>
<pre class="example">x[j] = sum(y[k] exp(+2 %i %pi j k / n), k, 0, n - 1)
</pre>
<p><code>load(fft)</code> loads this function.
</p>
<p>See also <code>fft</code> (forward transform), <code>recttopolar</code>, and <code>polartorect</code>.
</p>
<p>Examples:
</p>
<p>Real data.
</p>
<pre class="example">(%i1) load (fft) $
(%i2) fpprintprec : 4 $
(%i3) L : [1, 2, 3, 4, -1, -2, -3, -4] $
(%i4) L1 : inverse_fft (L);
(%o4) [0.0, 14.49 %i - .8284, 0.0, 2.485 %i + 4.828, 0.0, 
                       4.828 - 2.485 %i, 0.0, - 14.49 %i - .8284]
(%i5) L2 : fft (L1);
(%o5) [1.0, 2.0 - 2.168L-19 %i, 3.0 - 7.525L-20 %i, 
4.0 - 4.256L-19 %i, - 1.0, 2.168L-19 %i - 2.0, 
7.525L-20 %i - 3.0, 4.256L-19 %i - 4.0]
(%i6) lmax (abs (L2 - L));
(%o6)                       3.545L-16
</pre>
<p>Complex data.
</p>
<pre class="example">(%i1) load (fft) $
(%i2) fpprintprec : 4 $                 
(%i3) L : [1, 1 + %i, 1 - %i, -1, -1, 1 - %i, 1 + %i, 1] $
(%i4) L1 : inverse_fft (L);
(%o4) [4.0, 2.711L-19 %i + 4.0, 2.0 %i - 2.0, 
- 2.828 %i - 2.828, 0.0, 5.421L-20 %i + 4.0, - 2.0 %i - 2.0, 
2.828 %i + 2.828]
(%i5) L2 : fft (L1);
(%o5) [4.066E-20 %i + 1.0, 1.0 %i + 1.0, 1.0 - 1.0 %i, 
1.55L-19 %i - 1.0, - 4.066E-20 %i - 1.0, 1.0 - 1.0 %i, 
1.0 %i + 1.0, 1.0 - 7.368L-20 %i]
(%i6) lmax (abs (L2 - L));                    
(%o6)                       6.841L-17
</pre>
<div class=categorybox>


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


</dd></dl>

<p><a name="Item_003a-fft"></a>
</p><dl>
<dt><u>Function:</u> <b>fft</b><i> (<var>x</var>)</i>
<a name="IDX791"></a>
</dt>
<dd><p>Computes the complex fast Fourier transform.
<var>x</var> is a list or array (named or unnamed) which contains the data to transform.
The number of elements must be a power of 2.
The elements must be literal numbers (integers, rationals, floats, or bigfloats)
or symbolic constants,
or expressions <code>a + b*%i</code> where <code>a</code> and <code>b</code> are literal numbers
or symbolic constants.
</p>
<p><code>fft</code> returns a new object of the same type as <var>x</var>,
which is not modified.
Results are always computed as floats
or expressions <code>a + b*%i</code> where <code>a</code> and <code>b</code> are floats.
</p>
<p>The discrete Fourier transform is defined as follows.
Let <code>y</code> be the output of the transform.
Then for <code>k</code> from 0 through <code>n - 1</code>,
</p>
<pre class="example">y[k] = (1/n) sum(x[j] exp(-2 %i %pi j k / n), j, 0, n - 1)
</pre>
<p>When the data <var>x</var> are real,
real coefficients <code>a</code> and <code>b</code> can be computed such that
</p>
<pre class="example">x[j] = sum (a[k] * cos (2*%pi*j*k / n) + b[k] * sin (2*%pi*j*k / n), k, 0, n/2)
</pre>
<p>with
</p>
<pre class="example">a[0] = realpart (y[0])
b[0] = 0
</pre>
<p>and, for k from 1 through n/2 - 1,
</p>
<pre class="example">a[k] = realpart (y[k] + y[n - k])
b[k] = imagpart (y[n - k] - y[k])
</pre>
<p>and
</p>
<pre class="example">a[n/2] = realpart (y[n/2])
b[n/2] = 0
</pre>
<p><code>load(fft)</code> loads this function.
</p>
<p>See also <code>inverse_fft</code> (inverse transform), <code>recttopolar</code>, and <code>polartorect</code>.
</p>
<p>Examples:
</p>
<p>Real data.
</p>
<pre class="example">(%i1) load (fft) $
(%i2) fpprintprec : 4 $
(%i3) L : [1, 2, 3, 4, -1, -2, -3, -4] $
(%i4) L1 : fft (L);
(%o4) [0.0, - 1.811 %i - .1036, 0.0, .6036 - .3107 %i, 0.0, 
                         .3107 %i + .6036, 0.0, 1.811 %i - .1036]
(%i5) L2 : inverse_fft (L1);
(%o5) [1.0, 2.168L-19 %i + 2.0, 7.525L-20 %i + 3.0, 
4.256L-19 %i + 4.0, - 1.0, - 2.168L-19 %i - 2.0, 
- 7.525L-20 %i - 3.0, - 4.256L-19 %i - 4.0]
(%i6) lmax (abs (L2 - L));
(%o6)                       3.545L-16
</pre>
<p>Complex data.
</p>
<pre class="example">(%i1) load (fft) $
(%i2) fpprintprec : 4 $
(%i3) L : [1, 1 + %i, 1 - %i, -1, -1, 1 - %i, 1 + %i, 1] $
(%i4) L1 : fft (L);
(%o4) [0.5, .3536 %i + .3536, - 0.25 %i - 0.25, 
0.5 - 6.776L-21 %i, 0.0, - .3536 %i - .3536, 0.25 %i - 0.25, 
0.5 - 3.388L-20 %i]
(%i5) L2 : inverse_fft (L1);
(%o5) [1.0 - 4.066E-20 %i, 1.0 %i + 1.0, 1.0 - 1.0 %i, 
- 1.008L-19 %i - 1.0, 4.066E-20 %i - 1.0, 1.0 - 1.0 %i, 
1.0 %i + 1.0, 1.947L-20 %i + 1.0]
(%i6) lmax (abs (L2 - L));
(%o6)                       6.83L-17
</pre>
<p>Computation of sine and cosine coefficients.
</p>
<pre class="example">(%i1) load (fft) $
(%i2) fpprintprec : 4 $
(%i3) L : [1, 2, 3, 4, 5, 6, 7, 8] $
(%i4) n : length (L) $
(%i5) x : make_array (any, n) $
(%i6) fillarray (x, L) $
(%i7) y : fft (x) $
(%i8) a : make_array (any, n/2 + 1) $
(%i9) b : make_array (any, n/2 + 1) $
(%i10) a[0] : realpart (y[0]) $
(%i11) b[0] : 0 $
(%i12) for k : 1 thru n/2 - 1 do
   (a[k] : realpart (y[k] + y[n - k]),
    b[k] : imagpart (y[n - k] - y[k]));
(%o12)                        done
(%i13) a[n/2] : y[n/2] $
(%i14) b[n/2] : 0 $
(%i15) listarray (a);
(%o15)          [4.5, - 1.0, - 1.0, - 1.0, - 0.5]
(%i16) listarray (b);
(%o16)           [0, - 2.414, - 1.0, - .4142, 0]
(%i17) f(j) := sum (a[k] * cos (2*%pi*j*k / n) + b[k] * sin (2*%pi*j*k / n), k, 0, n/2) $
(%i18) makelist (float (f (j)), j, 0, n - 1);
(%o18)      [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]
</pre>
<div class=categorybox>


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


</dd></dl>

<p><a name="Item_003a-fortindent"></a>
</p><dl>
<dt><u>Option variable:</u> <b>fortindent</b>
<a name="IDX792"></a>
</dt>
<dd><p>Default value: 0
</p>
<p><code>fortindent</code> controls the left margin indentation of
expressions printed out by the <code>fortran</code> command.  0 gives normal
printout (i.e., 6 spaces), and positive values will causes the
expressions to be printed farther to the right.
</p>
<div class=categorybox>


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


</dd></dl>

<p><a name="Item_003a-fortran"></a>
</p><dl>
<dt><u>Function:</u> <b>fortran</b><i> (<var>expr</var>)</i>
<a name="IDX793"></a>
</dt>
<dd><p>Prints <var>expr</var> as a Fortran statement.
The output line is indented with spaces.
If the line is too long, <code>fortran</code> prints continuation lines.
<code>fortran</code> prints the exponentiation operator <code>^</code> as <code>**</code>,
and prints a complex number <code>a + b %i</code> in the form <code>(a,b)</code>.
</p>
<p><var>expr</var> may be an equation. If so, <code>fortran</code> prints an assignment
statement, assigning the right-hand side of the equation to the left-hand side.
In particular, if the right-hand side of <var>expr</var> is the name of a matrix,
then <code>fortran</code> prints an assignment statement for each element of the matrix.
</p>
<p>If <var>expr</var> is not something recognized by <code>fortran</code>,
the expression is printed in <code>grind</code> format without complaint.
<code>fortran</code> does not know about lists, arrays, or functions.
</p>
<p><code>fortindent</code> controls the left margin of the printed lines.
0 is the normal margin (i.e., indented 6 spaces). Increasing <code>fortindent</code>
causes expressions to be printed further to the right.
</p>
<p>When <code>fortspaces</code> is <code>true</code>, <code>fortran</code> fills out
each printed line with spaces to 80 columns.
</p>
<p><code>fortran</code> evaluates its arguments;
quoting an argument defeats evaluation.
<code>fortran</code> always returns <code>done</code>.
</p>
<p>Examples:
</p>
<pre class="verbatim">(%i1) expr: (a + b)^12$
(%i2) fortran (expr);
      (b+a)**12                                                                 
(%o2)                         done
(%i3) fortran ('x=expr);
      x = (b+a)**12                                                             
(%o3)                         done
(%i4) fortran ('x=expand (expr));
      x = b**12+12*a*b**11+66*a**2*b**10+220*a**3*b**9+495*a**4*b**8+792
     1   *a**5*b**7+924*a**6*b**6+792*a**7*b**5+495*a**8*b**4+220*a**9*b
     2   **3+66*a**10*b**2+12*a**11*b+a**12
(%o4)                         done
(%i5) fortran ('x=7+5*%i);
      x = (7,5)                                                                 
(%o5)                         done
(%i6) fortran ('x=[1,2,3,4]);
      x = [1,2,3,4]                                                             
(%o6)                         done
(%i7) f(x) := x^2$
(%i8) fortran (f);
      f                                                                         
(%o8)                         done
</pre>
<div class=categorybox>


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


</dd></dl>

<p><a name="Item_003a-fortspaces"></a>
</p><dl>
<dt><u>Option variable:</u> <b>fortspaces</b>
<a name="IDX794"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>fortspaces</code> is <code>true</code>, <code>fortran</code> fills out
each printed line with spaces to 80 columns.
</p>
<div class=categorybox>


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


</dd></dl>

<p><a name="Item_003a-horner"></a>
</p><dl>
<dt><u>Function:</u> <b>horner</b><i> (<var>expr</var>, <var>x</var>)</i>
<a name="IDX795"></a>
</dt>
<dt><u>Function:</u> <b>horner</b><i> (<var>expr</var>)</i>
<a name="IDX796"></a>
</dt>
<dd><p>Returns a rearranged representation of <var>expr</var> as
in Horner's rule, using <var>x</var> as the main variable if it is specified.
<code>x</code> may be omitted in which case the main variable of the canonical rational expression
form of <var>expr</var> is used.
</p>
<p><code>horner</code> sometimes improves stability if <code>expr</code> is
to be numerically evaluated.  It is also useful if Maxima is used to
generate programs to be run in Fortran. See also <code>stringout</code>.
</p>
<pre class="example">(%i1) expr: 1e-155*x^2 - 5.5*x + 5.2e155;
                           2
(%o1)            1.0E-155 x  - 5.5 x + 5.2E+155
(%i2) expr2: horner (%, x), keepfloat: true;
(%o2)            (1.0E-155 x - 5.5) x + 5.2E+155
(%i3) ev (expr, x=1e155);
Maxima encountered a Lisp error:

 floating point overflow

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
(%i4) ev (expr2, x=1e155);
(%o4)                       7.0E+154
</pre>
<div class=categorybox>


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


</dd></dl>

<p><a name="Item_003a-find_005froot"></a>
</p><dl>
<dt><u>Function:</u> <b>find_root</b><i> (<var>expr</var>, <var>x</var>, <var>a</var>, <var>b</var>)</i>
<a name="IDX797"></a>
</dt>
<dt><u>Function:</u> <b>find_root</b><i> (<var>f</var>, <var>a</var>, <var>b</var>)</i>
<a name="IDX798"></a>
</dt>
<dt><u>Option variable:</u> <b>find_root_error</b>
<a name="IDX799"></a>
</dt>
<dt><u>Option variable:</u> <b>find_root_abs</b>
<a name="IDX800"></a>
</dt>
<dt><u>Option variable:</u> <b>find_root_rel</b>
<a name="IDX801"></a>
</dt>
<dd><p>Finds a root of the expression <var>expr</var> or the function <var>f</var>
over the closed interval <em>[<var>a</var>, <var>b</var>]</em>.
The expression <var>expr</var> may be an equation,
in which case <code>find_root</code> seeks a root of <code>lhs(<var>expr</var>) - rhs(<var>expr</var>)</code>.
</p>
<p>Given that Maxima can evaluate <var>expr</var> or <var>f</var> over <em>[<var>a</var>, <var>b</var>]</em>
and that <var>expr</var> or <var>f</var> is continuous,
<code>find_root</code> is guaranteed to find the root,
or one of the roots if there is more than one.
</p>
<p><code>find_root</code> initially applies binary search.
If the function in question appears to be smooth enough,
<code>find_root</code> applies linear interpolation instead.
</p>
<p>The accuracy of <code>find_root</code> is governed by <code>find_root_abs</code> and <code>find_root_rel</code>.
<code>find_root</code> stops when the function in question
evaluates to something less than or equal to <code>find_root_abs</code>,
or if successive approximants <var>x_0</var>, <var>x_1</var> differ by no more than
<code>find_root_rel * max(abs(x_0), abs(x_1))</code>.
The default values of <code>find_root_abs</code> and <code>find_root_rel</code> are both zero.
</p>
<p><code>find_root</code> expects the function in question to have a different sign at the endpoints
of the search interval.
When the function evaluates to a number at both endpoints
and these numbers have the same sign,
the behavior of <code>find_root</code> is governed by <code>find_root_error</code>.
When <code>find_root_error</code> is <code>true</code>,
<code>find_root</code> prints an error message.
Otherwise <code>find_root</code> returns the value of <code>find_root_error</code>.
The default value of <code>find_root_error</code> is <code>true</code>.
</p>
<p>If <var>f</var> evaluates to something other than a number at any step in the search algorithm,
<code>find_root</code> returns a partially-evaluated <code>find_root</code> expression.
</p>
<p>The order of <var>a</var> and <var>b</var> is ignored;
the region in which a root is sought is <em>[min(<var>a</var>, <var>b</var>), max(<var>a</var>, <var>b</var>)]</em>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) f(x) := sin(x) - x/2;
                                        x
(%o1)                  f(x) := sin(x) - -
                                        2
(%i2) find_root (sin(x) - x/2, x, 0.1, %pi);
(%o2)                   1.895494267033981
(%i3) find_root (sin(x) = x/2, x, 0.1, %pi);
(%o3)                   1.895494267033981
(%i4) find_root (f(x), x, 0.1, %pi);
(%o4)                   1.895494267033981
(%i5) find_root (f, 0.1, %pi);
(%o5)                   1.895494267033981
(%i6) find_root (exp(x) = y, x, 0, 100);
                            x
(%o6)           find_root(%e  = y, x, 0.0, 100.0)
(%i7) find_root (exp(x) = y, x, 0, 100), y = 10;
(%o7)                   2.302585092994046
(%i8) log (10.0);
(%o8)                   2.302585092994046
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_95.html#Category_003a-Algebraic-equations">Algebraic equations</a>
 &middot;
<a href="maxima_95.html#Category_003a-Numerical-methods">Numerical methods</a>
</p>
</div>


</dd></dl>

<p><a name="Item_003a-newton"></a>
</p><dl>
<dt><u>Function:</u> <b>newton</b><i> (<var>expr</var>, <var>x</var>, <var>x_0</var>, <var>eps</var>)</i>
<a name="IDX802"></a>
</dt>
<dd><p>Returns an approximate solution of <code><var>expr</var> = 0</code> by Newton's method,
considering <var>expr</var> to be a function of one variable, <var>x</var>.
The search begins with <code><var>x</var> = <var>x_0</var></code>
and proceeds until <code>abs(<var>expr</var>) &lt; <var>eps</var></code>
(with <var>expr</var> evaluated at the current value of <var>x</var>).
</p>
<p><code>newton</code> allows undefined variables to appear in <var>expr</var>,
so long as the termination test <code>abs(<var>expr</var>) &lt; <var>eps</var></code> evaluates
to <code>true</code> or <code>false</code>.
Thus it is not necessary that <var>expr</var> evaluate to a number.
</p>
<p><code>load(newton1)</code> loads this function.
</p>
<p>See also <code>realroots</code>, <code>allroots</code>, <code>find_root</code>, and <code>mnewton</code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) load (newton1);
(%o1) /usr/share/maxima/5.10.0cvs/share/numeric/newton1.mac
(%i2) newton (cos (u), u, 1, 1/100);
(%o2)                   1.570675277161251
(%i3) ev (cos (u), u = %);
(%o3)                 1.2104963335033528E-4
(%i4) assume (a &gt; 0);
(%o4)                        [a &gt; 0]
(%i5) newton (x^2 - a^2, x, a/2, a^2/100);
(%o5)                  1.00030487804878 a
(%i6) ev (x^2 - a^2, x = %);
                                           2
(%o6)                6.098490481853958E-4 a
</pre>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_95.html#Category_003a-Algebraic-equations">Algebraic equations</a>
 &middot;
<a href="maxima_95.html#Category_003a-Numerical-methods">Numerical methods</a>
</p>
</div>


</dd></dl>


<p><a name="Item_003a-Introduction-to-Fourier-series"></a>
</p><hr size="6">
<a name="Introduction-to-Fourier-series"></a>
<a name="SEC89"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC88" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC90" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC86" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC86" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_24.html#SEC91" 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"> 23.3 Introduction to Fourier series </h2>

<p>The <code>fourie</code> package comprises functions for the symbolic computation
of Fourier series.
There are functions in the <code>fourie</code> package to calculate Fourier integral
coefficients and some functions for manipulation of expressions.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_95.html#Category_003a-Fourier-transform">Fourier transform</a>
 &middot;
<a href="maxima_95.html#Category_003a-Share-packages">Share packages</a>
 &middot;
<a href="maxima_95.html#Category_003a-Package-fourie">Package fourie</a>
</p>
</div>



<p><a name="Item_003a-Functions-and-Variables-for-Fourier-series"></a>
</p><hr size="6">
<a name="Functions-and-Variables-for-Fourier-series"></a>
<a name="SEC90"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC89" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_24.html#SEC91" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC86" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC86" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_24.html#SEC91" 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"> 23.4 Functions and Variables for Fourier series </h2>

<p><a name="Item_003a-equalp"></a>
</p><dl>
<dt><u>Function:</u> <b>equalp</b><i> (<var>x</var>, <var>y</var>)</i>
<a name="IDX803"></a>
</dt>
<dd><p>Returns <code>true</code> if <code>equal (<var>x</var>, <var>y</var>)</code> otherwise <code>false</code> (doesn't give an
error message like <code>equal (x, y)</code> would do in this case).
</p>
<div class=categorybox>


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

</dd></dl>

<p><a name="Item_003a-remfun"></a>
</p><dl>
<dt><u>Function:</u> <b>remfun</b><i> (<var>f</var>, <var>expr</var>)</i>
<a name="IDX804"></a>
</dt>
<dt><u>Function:</u> <b>remfun</b><i> (<var>f</var>, <var>expr</var>, <var>x</var>)</i>
<a name="IDX805"></a>
</dt>
<dd><p><code>remfun (<var>f</var>, <var>expr</var>)</code>
replaces all occurrences of <code><var>f</var> (<var>arg</var>)</code> by <var>arg</var> in <var>expr</var>.
</p>
<p><code>remfun (<var>f</var>, <var>expr</var>, <var>x</var>)</code>
replaces all occurrences of <code><var>f</var> (<var>arg</var>)</code> by <var>arg</var> in <var>expr</var>
only if <var>arg</var> contains the variable <var>x</var>.
</p>
<div class=categorybox>


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

</dd></dl>

<p><a name="Item_003a-funp"></a>
</p><dl>
<dt><u>Function:</u> <b>funp</b><i> (<var>f</var>, <var>expr</var>)</i>
<a name="IDX806"></a>
</dt>
<dt><u>Function:</u> <b>funp</b><i> (<var>f</var>, <var>expr</var>, <var>x</var>)</i>
<a name="IDX807"></a>
</dt>
<dd><p><code>funp (<var>f</var>, <var>expr</var>)</code>
returns <code>true</code> if <var>expr</var> contains the function <var>f</var>.
</p>
<p><code>funp (<var>f</var>, <var>expr</var>, <var>x</var>)</code>
returns <code>true</code> if <var>expr</var> contains the function <var>f</var> and the variable
<var>x</var> is somewhere in the argument of one of the instances of <var>f</var>.
</p>
<div class=categorybox>


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

</dd></dl>

<p><a name="Item_003a-absint"></a>
</p><dl>
<dt><u>Function:</u> <b>absint</b><i> (<var>f</var>, <var>x</var>, <var>halfplane</var>)</i>
<a name="IDX808"></a>
</dt>
<dt><u>Function:</u> <b>absint</b><i> (<var>f</var>, <var>x</var>)</i>
<a name="IDX809"></a>
</dt>
<dt><u>Function:</u> <b>absint</b><i> (<var>f</var>, <var>x</var>, <var>a</var>, <var>b</var>)</i>
<a name="IDX810"></a>
</dt>
<dd><p><code>absint (<var>f</var>, <var>x</var>, <var>halfplane</var>)</code>
returns the indefinite integral of <var>f</var> with respect to
<var>x</var> in the given halfplane (<code>pos</code>, <code>neg</code>, or <code>both</code>).
<var>f</var> may contain expressions of the form
<code>abs (x)</code>, <code>abs (sin (x))</code>, <code>abs (a) * exp (-abs (b) * abs (x))</code>.
</p>
<p><code>absint (<var>f</var>, <var>x</var>)</code> is equivalent to <code>absint (<var>f</var>, <var>x</var>, pos)</code>.
</p>
<p><code>absint (<var>f</var>, <var>x</var>, <var>a</var>, <var>b</var>)</code>
returns the definite integral of <var>f</var> with respect to <var>x</var> from <var>a</var> to <var>b</var>.
<var>f</var> may include absolute values.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_95.html#Category_003a-Package-fourie">Package fourie</a>
 &middot;
<a href="maxima_95.html#Category_003a-Integral-calculus">Integral calculus</a>
</p>
</div>

</dd></dl>

<p><a name="Item_003a-fourier"></a>
</p><dl>
<dt><u>Function:</u> <b>fourier</b><i> (<var>f</var>, <var>x</var>, <var>p</var>)</i>
<a name="IDX811"></a>
</dt>
<dd><p>Returns a list of the Fourier coefficients of <code><var>f</var>(<var>x</var>)</code> defined
on the interval <code>[-p, p]</code>.
</p>
<div class=categorybox>


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

</dd></dl>

<p><a name="Item_003a-foursimp"></a>
</p><dl>
<dt><u>Function:</u> <b>foursimp</b><i> (<var>l</var>)</i>
<a name="IDX812"></a>
</dt>
<dd><p>Simplifies <code>sin (n %pi)</code> to 0 if <code>sinnpiflag</code> is <code>true</code> and
<code>cos (n %pi)</code> to <code>(-1)^n</code> if <code>cosnpiflag</code> is <code>true</code>.
</p>
<div class=categorybox>


<p>Categories:&nbsp;&nbsp;<a href="maxima_95.html#Category_003a-Package-fourie">Package fourie</a>
 &middot;
<a href="maxima_95.html#Category_003a-Trigonometric-functions">Trigonometric functions</a>
 &middot;
<a href="maxima_95.html#Category_003a-Simplification-functions">Simplification functions</a>
</p>
</div>

</dd></dl>

<p><a name="Item_003a-sinnpiflag"></a>
</p><dl>
<dt><u>Option variable:</u> <b>sinnpiflag</b>
<a name="IDX813"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>See <code>foursimp</code>.
</p>
<div class=categorybox>


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


</dd></dl>

<p><a name="Item_003a-cosnpiflag"></a>
</p><dl>
<dt><u>Option variable:</u> <b>cosnpiflag</b>
<a name="IDX814"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>See <code>foursimp</code>.
</p>
<div class=categorybox>


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


</dd></dl>

<p><a name="Item_003a-fourexpand"></a>
</p><dl>
<dt><u>Function:</u> <b>fourexpand</b><i> (<var>l</var>, <var>x</var>, <var>p</var>, <var>limit</var>)</i>
<a name="IDX815"></a>
</dt>
<dd><p>Constructs and returns the Fourier series from the list of
Fourier coefficients <var>l</var> up through <var>limit</var> terms (<var>limit</var>
may be <code>inf</code>). <var>x</var> and <var>p</var> have same meaning as in
<code>fourier</code>.
</p>
<div class=categorybox>


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

</dd></dl>

<p><a name="Item_003a-fourcos"></a>
</p><dl>
<dt><u>Function:</u> <b>fourcos</b><i> (<var>f</var>, <var>x</var>, <var>p</var>)</i>
<a name="IDX816"></a>
</dt>
<dd><p>Returns the Fourier cosine coefficients for <code><var>f</var>(<var>x</var>)</code> defined on <code>[0, <var>p</var>]</code>.
</p>
<div class=categorybox>


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

</dd></dl>

<p><a name="Item_003a-foursin"></a>
</p><dl>
<dt><u>Function:</u> <b>foursin</b><i> (<var>f</var>, <var>x</var>, <var>p</var>)</i>
<a name="IDX817"></a>
</dt>
<dd><p>Returns the Fourier sine coefficients for <code><var>f</var>(<var>x</var>)</code> defined on <code>[0, <var>p</var>]</code>.
</p>
<div class=categorybox>


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

</dd></dl>

<p><a name="Item_003a-totalfourier"></a>
</p><dl>
<dt><u>Function:</u> <b>totalfourier</b><i> (<var>f</var>, <var>x</var>, <var>p</var>)</i>
<a name="IDX818"></a>
</dt>
<dd><p>Returns <code>fourexpand (foursimp (fourier (<var>f</var>, <var>x</var>, <var>p</var>)), <var>x</var>, <var>p</var>, 'inf)</code>.
</p>
<div class=categorybox>


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

</dd></dl>

<p><a name="Item_003a-fourint"></a>
</p><dl>
<dt><u>Function:</u> <b>fourint</b><i> (<var>f</var>, <var>x</var>)</i>
<a name="IDX819"></a>
</dt>
<dd><p>Constructs and returns a list of the Fourier integral coefficients of <code><var>f</var>(<var>x</var>)</code>
defined on <code>[minf, inf]</code>.
</p>
<div class=categorybox>


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

</dd></dl>

<p><a name="Item_003a-fourintcos"></a>
</p><dl>
<dt><u>Function:</u> <b>fourintcos</b><i> (<var>f</var>, <var>x</var>)</i>
<a name="IDX820"></a>
</dt>
<dd><p>Returns the Fourier cosine integral coefficients for <code><var>f</var>(<var>x</var>)</code> on <code>[0, inf]</code>.
</p>
<div class=categorybox>


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

</dd></dl>

<p><a name="Item_003a-fourintsin"></a>
</p><dl>
<dt><u>Function:</u> <b>fourintsin</b><i> (<var>f</var>, <var>x</var>)</i>
<a name="IDX821"></a>
</dt>
<dd><p>Returns the Fourier sine integral coefficients for <code><var>f</var>(<var>x</var>)</code> on <code>[0, inf]</code>.
</p>
<div class=categorybox>


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

</dd></dl>

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