3
<title>QAWS adaptive integration for singular functions - GNU Scientific Library -- Reference Manual</title>
4
<meta http-equiv="Content-Type" content="text/html">
5
<meta name="description" content="GNU Scientific Library -- Reference Manual">
6
<meta name="generator" content="makeinfo 4.8">
7
<link title="Top" rel="start" href="index.html#Top">
8
<link rel="up" href="Numerical-Integration.html#Numerical-Integration" title="Numerical Integration">
9
<link rel="prev" href="QAWC-adaptive-integration-for-Cauchy-principal-values.html#QAWC-adaptive-integration-for-Cauchy-principal-values" title="QAWC adaptive integration for Cauchy principal values">
10
<link rel="next" href="QAWO-adaptive-integration-for-oscillatory-functions.html#QAWO-adaptive-integration-for-oscillatory-functions" title="QAWO adaptive integration for oscillatory functions">
11
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
13
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 The GSL Team.
15
Permission is granted to copy, distribute and/or modify this document
16
under the terms of the GNU Free Documentation License, Version 1.2 or
17
any later version published by the Free Software Foundation; with the
18
Invariant Sections being ``GNU General Public License'' and ``Free Software
19
Needs Free Documentation'', the Front-Cover text being ``A GNU Manual'',
20
and with the Back-Cover Text being (a) (see below). A copy of the
21
license is included in the section entitled ``GNU Free Documentation
24
(a) The Back-Cover Text is: ``You have freedom to copy and modify this
25
GNU Manual, like GNU software.''-->
26
<meta http-equiv="Content-Style-Type" content="text/css">
27
<style type="text/css"><!--
28
pre.display { font-family:inherit }
29
pre.format { font-family:inherit }
30
pre.smalldisplay { font-family:inherit; font-size:smaller }
31
pre.smallformat { font-family:inherit; font-size:smaller }
32
pre.smallexample { font-size:smaller }
33
pre.smalllisp { font-size:smaller }
34
span.sc { font-variant:small-caps }
35
span.roman { font-family:serif; font-weight:normal; }
36
span.sansserif { font-family:sans-serif; font-weight:normal; }
42
<a name="QAWS-adaptive-integration-for-singular-functions"></a>
43
Next: <a rel="next" accesskey="n" href="QAWO-adaptive-integration-for-oscillatory-functions.html#QAWO-adaptive-integration-for-oscillatory-functions">QAWO adaptive integration for oscillatory functions</a>,
44
Previous: <a rel="previous" accesskey="p" href="QAWC-adaptive-integration-for-Cauchy-principal-values.html#QAWC-adaptive-integration-for-Cauchy-principal-values">QAWC adaptive integration for Cauchy principal values</a>,
45
Up: <a rel="up" accesskey="u" href="Numerical-Integration.html#Numerical-Integration">Numerical Integration</a>
49
<h3 class="section">16.8 QAWS adaptive integration for singular functions</h3>
51
<p><a name="index-singular-functions_002c-numerical-integration-of-1359"></a>The QAWS algorithm is designed for integrands with algebraic-logarithmic
52
singularities at the end-points of an integration region. In order to
53
work efficiently the algorithm requires a precomputed table of
57
— Function: gsl_integration_qaws_table * <b>gsl_integration_qaws_table_alloc</b> (<var>double alpha, double beta, int mu, int nu</var>)<var><a name="index-gsl_005fintegration_005fqaws_005ftable_005falloc-1360"></a></var><br>
59
<p>This function allocates space for a <code>gsl_integration_qaws_table</code>
60
struct and associated workspace describing a singular weight function
61
W(x) with the parameters (\alpha, \beta, \mu, \nu),
62
where \alpha > -1, \beta > -1, and \mu = 0, 1,
63
\nu = 0, 1. The weight function can take four different forms
64
depending on the values of \mu and \nu,
65
The singular points (a,b) do not have to be specified until the
66
integral is computed, where they are the endpoints of the integration
69
<p>The function returns a pointer to the newly allocated
70
<code>gsl_integration_qaws_table</code> if no errors were detected, and 0 in
72
</p></blockquote></div>
75
— Function: int <b>gsl_integration_qaws_table_set</b> (<var>gsl_integration_qaws_table * t, double alpha, double beta, int mu, int nu</var>)<var><a name="index-gsl_005fintegration_005fqaws_005ftable_005fset-1361"></a></var><br>
76
<blockquote><p>This function modifies the parameters (\alpha, \beta, \mu, \nu) of
77
an existing <code>gsl_integration_qaws_table</code> struct <var>t</var>.
78
</p></blockquote></div>
81
— Function: void <b>gsl_integration_qaws_table_free</b> (<var>gsl_integration_qaws_table * t</var>)<var><a name="index-gsl_005fintegration_005fqaws_005ftable_005ffree-1362"></a></var><br>
82
<blockquote><p>This function frees all the memory associated with the
83
<code>gsl_integration_qaws_table</code> struct <var>t</var>.
84
</p></blockquote></div>
87
— Function: int <b>gsl_integration_qaws</b> (<var>gsl_function * f, const double a, const double b, gsl_integration_qaws_table * t, const double epsabs, const double epsrel, const size_t limit, gsl_integration_workspace * workspace, double * result, double * abserr</var>)<var><a name="index-gsl_005fintegration_005fqaws-1363"></a></var><br>
89
<p>This function computes the integral of the function f(x) over the
90
interval (a,b) with the singular weight function
91
(x-a)^\alpha (b-x)^\beta \log^\mu (x-a) \log^\nu (b-x). The parameters
92
of the weight function (\alpha, \beta, \mu, \nu) are taken from the
93
table <var>t</var>. The integral is,
94
The adaptive bisection algorithm of QAG is used. When a subinterval
95
contains one of the endpoints then a special 25-point modified
96
Clenshaw-Curtis rule is used to control the singularities. For
97
subintervals which do not include the endpoints an ordinary 15-point
98
Gauss-Kronrod integration rule is used.