-
Notifications
You must be signed in to change notification settings - Fork 59
/
quadpack.html
438 lines (395 loc) · 12.3 KB
/
quadpack.html
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
<html>
<head>
<title>
QUADPACK - Numerical Integration
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
QUADPACK <br> Numerical Integration
</h1>
<hr>
<p>
<b>QUADPACK</b>
is a FORTRAN90 library which
estimates integrals using quadrature.
</p>
<p>
The <b>QUADPACK</b> estimate the integral
of a function <b>F(X)</b>. There are routines for nonadaptive
or adaptive integration, finite, semi-infinite or fully infinite
integration regions, integrands with singularities, and integrands
that include a factor of <b>SIN(X)</b> or <b>COS(X)</b>.
</p>
</p>
Many subroutines come in two versions, a "simple" interface and
an "extended" interface. Compare, for example, the routines
QAWF and QAWFE. The first one simply makes sensible choices for
many parameter values. The second one gives the user full control
over all the parameters.
</p>
<h3>
Routines for a finite region:
</h3>
<p>
How to decide what routine to use, if your integration region
is finite:
<ul>
<li>
If you can factor the integrand as F(X)=W(X)*G(X), where G
is smooth on [A,B] and W(X)=COS(OMEGA*X) or SIN(OMEGA*X) then
use QAWO.
</li>
<li>
Otherwise, if you can factor F(X)=W(X)*G(X) where G is smooth
and W(X)=(X-A)**ALFA * (B-X)**BETA * (LOG(X-A))**L * (LOG(B-X))**K
with K, L = 0 or 1, and ALFA, BETA greater than -1, then use QAWS.
</li>
<li>
Otherwise, if you can factor F(X)=W(X)*G(X) where G is smooth
and W(X)=1/(X-C) for some constant C, use QAWC.
</li>
<li>
Otherwise, if you do not care too much about possible
inefficient use of computer time, and do not want to further
analyze the problem, use QAGS.
</li>
<li>
Otherwise, if the integrand is smooth, use QNG or QAG.
</li>
<li>
Otherwise, if there are discontinuities or singularities
of the integrand or of its derivative, and you know where they
are, split the integration range at these points and analyze
each subinterval. You can also use QAGP, which is to be provided
with the x-locations of the singularities or discontinuities.
</li>
<li>
Otherwise, if the integrand has end point singularities, use QAGS.
</li>
<li>
Otherwise, if the integrand has an oscillatory behavior of
nonspecific type, and no singularities, use QAG with KEY=6.
</li>
<li>
Otherwise, use QAGS.
</li>
</ul>
</p>
<h3>
Routines for an infinite region:
</h3>
<p>
<ul>
<li>
If the integrand decays rapidly to zero, truncate the
interval and use the finite interval decision tree.
</li>
<li>
Otherwise, if the integrand oscillates over the entire infinite range,
and the integral is a Fourier transform, use QAWF.
</li>
<li>
Or, if the integrand oscillates over the entire infinite range,
but is not a Fourier transform, then sum the successive positive
and negative contributions by integrating between the zeroes of the
integrand. Apply convergence acceleration with QELG.
</li>
<li>
Otherwise, if you are not constrained by computer time, and
do not wish to analyze the problem further, use QAGI.
</li>
<li>
Otherwise, if the integrand has a non-smooth behavior in
the range, and you know where it occurs, split off these regions
and use the appropriate finite range routines to integrate over
them. Then begin this tree again to handle the remainder of the region.
</li>
<li>
Otherwise, truncation of the interval, or application of
a suitable transformation for reducing the problem to a finite
range may be possible. And you may also call QAGI.
</li>
</ul>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>QUADPACK</b> is available in
<a href = "../../f77_src/quadpack/quadpack.html">a FORTRAN77 version</a> and
<a href = "../../f_src/quadpack/quadpack.html">a FORTRAN90 version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../f_src/intlib/intlib.html">
INTLIB</a>,
a FORTRAN90 library which
numerically estimates integrals.
</p>
<p>
<a href = "../../f_src/kronrod/kronrod.html">
KRONROD</a>,
a FORTRAN90 library which
can compute a Gauss and Gauss-Kronrod pair of quadrature rules
of arbitrary order,
by Robert Piessens, Maria Branders.
</p>
<p>
<a href = "../../f_src/nms/nms.html">
NMS</a>,
a FORTRAN90 library which
includes QUADPACK.
</p>
<p>
<a href = "../../f_src/product_rule/product_rule.html">
PRODUCT_RULE</a>,
a FORTRAN90 program which
can create a multidimensional quadrature rule as a product of
one dimensional rules.
</p>
<p>
<a href = "../../f_src/quadrule/quadrule.html">
QUADRULE</a>,
a FORTRAN90 library which
defines quadrature rules for
various intervals and weight functions.
</p>
<p>
<a href = "../../f_src/slatec/slatec.html">
SLATEC</a>,
a FORTRAN90 library which
includes <b>QUADPACK</b>.
</p>
<p>
<a href = "../../f_src/stroud/stroud.html">
STROUD</a>,
a FORTRAN90 library which
defines quadrature rules for
various geometric shapes.
</p>
<p>
<a href = "../../f_src/tanh_quad/tanh_quad.html">
TANH_QUAD</a>,
a FORTRAN90 library which
sets up the tanh quadrature rule;
</p>
<p>
<a href = "../../f_src/test_int/test_int.html">
TEST_INT</a>,
a FORTRAN90 library which
defines some test integration problems.
</p>
<p>
<a href = "../../f_src/test_int_hermite/test_int_hermite.html">
TEST_INT_HERMITE</a>,
a FORTRAN90 library which
defines some test integration problems over infinite intervals.
</p>
<p>
<a href = "../../f_src/test_int_laguerre/test_int_laguerre.html">
TEST_INT_LAGUERRE</a>,
a FORTRAN90 library which
defines test integrands for integration over [-ALPHA,+Infinity).
</p>
<p>
<a href = "../../f77_src/toms351/toms351.html">
TOMS351</a>,
a FORTRAN77 library which
estimates an integral using Romberg
integration.
</p>
<p>
<a href = "../../f77_src/toms379/toms379.html">
TOMS379</a>,
a FORTRAN77 library which
estimates an integral.
</p>
<p>
<a href = "../../f77_src/toms418/toms418.html">
TOMS418</a>,
a FORTRAN77 library which
estimates the integral of a function
with a sine or cosine factor.
</p>
<p>
<a href = "../../f77_src/toms424/toms424.html">
TOMS424</a>,
a FORTRAN77 library which
estimates the integral of a function
using Clenshaw-Curtis quadrature.
</p>
<p>
<a href = "../../f77_src/toms468/toms468.html">
TOMS468</a>,
a FORTRAN77 library which
carries out the "automatic" integration of a function.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Robert Piessens, Elise deDoncker-Kapenga,
Christian Ueberhuber, David Kahaner,<br>
QUADPACK: A Subroutine Package for Automatic Integration,<br>
Springer, 1983,<br>
ISBN: 3540125531,<br>
LC: QA299.3.Q36.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "quadpack.f90">quadpack.f90</a>, the source code.
</li>
<li>
<a href = "quadpack.sh">quadpack.sh</a>,
commands to compile the source code.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "quadpack_prb.f90">quadpack_prb.f90</a>, a sample problem.
</li>
<li>
<a href = "quadpack_prb.sh">quadpack_prb.sh</a>,
commands to compile, link and run the sample problem.
</li>
<li>
<a href = "quadpack_prb_output.txt">quadpack_prb_output.txt</a>,
the output file.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>AAAA</b> is a dummy subroutine with QUADPACK documentation in its comments.
</li>
<li>
<b>QAG</b> approximates an integral over a finite interval.
</li>
<li>
<b>QAGE</b> estimates a definite integral.
</li>
<li>
<b>QAGI</b> estimates an integral over a semi-infinite or infinite interval.
</li>
<li>
<b>QAGP</b> computes a definite integral.
</li>
<li>
<b>QAGS</b> estimates the integral of a function.
</li>
<li>
<b>QAWC</b> computes a Cauchy principal value.
</li>
<li>
<b>QAWCE</b> computes a Cauchy principal value.
</li>
<li>
<b>QAWF</b> computes Fourier integrals over the interval [ A, +Infinity ).
</li>
<li>
<b>QAWFE</b> computes Fourier integrals.
</li>
<li>
<b>QAWO</b> computes the integrals of oscillatory integrands.
</li>
<li>
<b>QAWS</b> estimates integrals with algebraico-logarithmic endpoint singularities.
</li>
<li>
<b>QAWSE</b> estimates integrals with algebraico-logarithmic endpoint singularities.
</li>
<li>
<b>QC25C</b> returns integration rules for Cauchy Principal Value integrals.
</li>
<li>
<b>QC25O</b> returns integration rules for integrands with a COS or SIN factor.
</li>
<li>
<b>QC25S</b> returns rules for algebraico-logarithmic end point singularities.
</li>
<li>
<b>QCHEB</b> computes the Chebyshev series expansion.
</li>
<li>
<b>QEXTR</b> carries out the Epsilon extrapolation algorithm.
</li>
<li>
<b>QFOUR</b> estimates the integrals of oscillatory functions.
</li>
<li>
<b>QK15</b> carries out a 15 point Gauss-Kronrod quadrature rule.
</li>
<li>
<b>QK15I</b> applies a 15 point Gauss-Kronrod quadrature on an infinite interval.
</li>
<li>
<b>QK15W</b> applies a 15 point Gauss-Kronrod rule for a weighted integrand.
</li>
<li>
<b>QK21</b> carries out a 21 point Gauss-Kronrod quadrature rule.
</li>
<li>
<b>QK31</b> carries out a 31 point Gauss-Kronrod quadrature rule.
</li>
<li>
<b>QK41</b> carries out a 41 point Gauss-Kronrod quadrature rule.
</li>
<li>
<b>QK51</b> carries out a 51 point Gauss-Kronrod quadrature rule.
</li>
<li>
<b>QK61</b> carries out a 61 point Gauss-Kronrod quadrature rule.
</li>
<li>
<b>QMOMO</b> computes modified Chebyshev moments.
</li>
<li>
<b>QNG</b> estimates an integral, using non-adaptive integration.
</li>
<li>
<b>QSORT</b> maintains the order of a list of local error estimates.
</li>
<li>
<b>QWGTC</b> defines the weight function used by QC25C.
</li>
<li>
<b>QWGTO</b> defines the weight functions used by QC25O.
</li>
<li>
<b>QWGTS</b> defines the weight functions used by QC25S.
</li>
<li>
<b>TIMESTAMP</b> prints the current YMDHMS date as a time stamp.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../f_src.html">
the FORTRAN90 source codes</a>.
</p>
<hr>
<i>
Last revised on 29 October 2010.
</i>
</body>
</html>