Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
f (x) dx =
1
(x)g(x) dx
x2
2
1/ 1 x (ChebyshevGauss) and (x) = e
(GaussHermite).
-2
Gauss 2
-4
-6
wi g(xi ).
i=1
Trap
-8
-10
-1
1 GaussLegendre quadrature
Comparison between 2-point Gaussian and trapezoidal quadrature. The blue line is the polynomial y(x) = 7x3 8x2 3x+3
, whose integral in [1, 1] is 2/3. The trapezoidal rule returns
the integral of the orange dashed line, equal to y(1) + y(1) =
10 . The 2-point Gaussian quadrature
rule returns the
integral
of the black dashed curve, equal to y( 1/3) + y( 1/3) =
2/3 . Such a result is exact since the green region has the same
area of the red regions.
legendre polynomials
1
Pn (x)
0.5
GaussLegendre
quadrature. With the n-th polynomial
f (x) dx =
wi f (xi ).
1
normalized
to
give
Pn(1) = 1, the i-th Gauss node, x, is
i=1
the i-th root of P ; its weight is given by (Abramowitz &
Gaussian quadrature as above will only produce accurate Stegun 1972, p. 887)
results if the function f(x) is well approximated by a polynomial function within the range [1, 1]. The method is
not, for example, suitable for functions with singularities.
2
However, if the integrated function can be written as wi =
2 ) [P (x )]2 .
(1
x
f (x) = (x)g(x) , where g(x) is approximately polyn i
i
nomial and (x) is known, then alternative weights wi
and points xi that depend on the weighting function (x) Some low-order rules for solving the integration problem
may give better results, where
are listed below.
1
3 OTHER FORMS
Change of interval
(x) h(x) dx =
(x) r(x) dx.
An integral over [a, b] must be changed into an integral
a
a
over [1, 1] before applying the Gaussian quadrature rule.
This change of interval can be done in the following way: Because of the choice of nodes xi, the corresponding relation
ba
f (x) dx =
2
f
1
ba
a+b
x+
2
2
)
dx.
f (x) dx =
a
ba
wi f
2 i=1
n
a+b
ba
xi +
2
2
i=1
wi h(xi ) =
wi r(xi )
i=1
.
3.1.1 General formula for the weights
The weights can be expressed as
Other forms
b
The integration problem can be expressed in a slightly
(x)pn1 (x)2 dx
more general way by introducing a positive weight func- wi = an a
an1 pn (xi )pn1 (xi )
tion into the integrand, and allowing an interval other
than [1, 1]. That is, the problem is to calculate
where ak is the coecient of xk in pk (x) . To prove this,
note that using Lagrange interpolation one can express
b
r(x) in terms of r(xi ) as
(x) f (x) dx
a
n
x xj
for some choices of a, b, and . For a = 1, b = 1,
r(x) =
r(xi )
xi xj
and (x) = 1, the problem is the same as that considi=1
1jn
ered above. Other choices lead to other integration rules.
j=i
Some of these are tabulated below. Equation numbers
because r(x) has degree less than n and is thus xed by
are given for Abramowitz and Stegun (A & S).
the values it attains at n dierent points. Multiplying both
sides by (x) and integrating from a to b yields
3.1
Fundamental theorem
(x)r(x)dx =
a
i=1
r(xi )
(x)
a
(x) xk pn (x) dx = 0,
a
1jn
j=i
x xj
dx
xi xj
3.2
(xi xj ) =
1jn
j=i
pn (xi )
an
wi =
pn (xi )
(
)
pn1 (x)
pn1 (x)
xn1
+
an1
an1
(x)
(x)
a
pn (x)
dx
x xi
)k
1 xxi
1
=
x xi
x xi
(
+
x
xi
)k
(x)pn1 (x)2 dx
a
According to Eq. (2), the weights are obtained by dividing this by pn (xi ) and that yields the expression in Eq.
(1).
pn (x)
an
dx =
x xi
an1 pn1 (xi )
1
x xi
wi can also be expressed in terms of the orthogonal polynomials pn (x) and now pn+1 (x) . In the 3-term recurrence relation pn+1 (xi ) = (a)pn (xi ) + (b)pn1 (xi ) the
term with pn (xi ) vanishes, so pn1 (xi ) in Eq. (1) can
be replaced by pn+1 (xi )/b .
yields
(x)
a
x pn (x)
dx = xki
x xi
(x)
a
pn (x)
dx
x xi
provided k n , because
f (x) =
1
x
xi
)k
(x xj )2
1jn
j=i
x xi
(x)
a
pn (x)
1
dx =
x xi
q(xi )
(x)
a
q(x)pn (x)
dx
x xi
(x)f (x)dx =
a
wj f (xj ) = wi f (xi ).
j=1
4
3.2.1
3 OTHER FORMS
Gautschis theorem
Gautschis theorem (Gautschi, 1968) states that orthogonal polynomials pr with (pr , ps ) = 0 for r = s for a
scalar product (, ) to be specied later, degree (pr ) = r
and leading coecient one (i.e. monic orthogonal polynomials) satisfy the recurrence relation
a0
b1
0
J=
0
. . .
...
1
0
...
a1 1
0
b2 a2
1
... ... ...
. . . 0 bn2
... ...
0
...
...
0
...
an2
bn1
...
...
...
1
an1
for r = 0, 1, . . . , n 1 where n is the maximal degree which can be taken to be innity, and where ar,s =
(xpr , ps )/(ps , ps ) . First of all, it is obvious that the
polynomials dened by the recurrence relation starting
with p0 (x) = 1 have leading coecient one and correct
degree. Given the starting point by p0 , the orthogonality The zeros xj of the polynomials up to degree n which are
of pr can be shown by induction. For r = s = 0 one has used as nodes for the Gaussian quadrature can be found
by computing the eigenvalues of this tridiagonal matrix.
This procedure is known as GolubWelsch algorithm.
(p1 , p0 ) = ((xa0,0 p0 , p0 ) = (xp0 , p0 )a0,0 (p0 , p0 ) = (xp
p0 )(xp0 ,the
p0 )weights
= 0. and nodes, it is preferable to
For0 ,computing
Now if p0 , p1 , . . . , pr are orthogonal, then also pr+1 , consider the symmetric tridiagonal matrix J with elements
because in
i = 1, . . . , n
(pr+1 , ps ) = (xpr , ps )ar,r (pr , ps )ar,r1 (pr1 , ps ) . . .ar,0 (p0 , psJ) i,i = Ji,i = ai1
0 =
or
See, for instance, (Gil, Segura & Temme 2007) for further details.
ar :=
(xpr , pr )
,
(pr , pr )
(x)dx.
a
f (2n) ()
(pr , pr ) , since xpr1 diers from pr by a degree less
(x) f (x) dx
wi f (xi ) =
(pn , pn )
(2n)!
than r).
a
i=1
5
for some in (a, b), where p is the monic (i.e. the leading
coecient is 1) orthogonal polynomial of degree n and
where
f (x) dx =
(f, g) =
n1
2
[f (1)+f (1)]+
wi f (xi )+Rn .
n(n 1)
i=2
Weights:
2
,
n(n 1)[Pn1 (xi )]2
xi = 1.
Remainder:
a < < b.
1 < < 1.
ClenshawCurtis quadrature
3.4
GaussKronrod rules
5 References
Abramowitz, Milton; Stegun, Irene A., eds. (December 1972) [1964]. Chapter 25.4, Integration. Handbook of Mathematical Functions with
Formulas, Graphs, and Mathematical Tables. Applied Mathematics Series 55 (10 ed.). New York,
USA: United States Department of Commerce,
National Bureau of Standards; Dover Publications.
ISBN 978-0-486-61272-0. LCCN 64-60036. MR
0167642.
3.5
GaussLobatto rules
Also known as Lobatto quadrature (Abramowitz & Stegun 1972, p. 888), named after Dutch mathematician
Rehuel Lobatto. It is similar to Gaussian quadrature with
the following dierences:
1. The integration points include the end points of the
integration interval.
2. It is accurate for polynomials up to degree 2n
3, where n is the number of integration points
(Quarteroni, Sacco & Saleri 2000).
Lobatto quadrature of function f(x) on interval [1, 1]:
6
Piessens, R. (1971). Gaussian quadrature formulas
for the numerical integration of Bromwichs integral
and the inversion of the laplace transform. J. Eng.
Math. 5 (1). pp. 19. doi:10.1007/BF01535429.
Danloy, Bernard (1973).
Numerical construction of Gaussian quadrature formulas for
1
EXTERNAL LINKS
6 External links
Hazewinkel, Michiel, ed. (2001), Gauss quadrature formula, Encyclopedia of Mathematics,
Springer, ISBN 978-1-55608-010-4
ALGLIB contains a collection of algorithms for numerical integration (in C# / C++ / Delphi / Visual
Basic / etc.)
Sagar, Robin P. (1991). A Gaussian quadrature for the calculation of generalized Fermi-Dirac
integrals. Comp. Phys. Commun. 66 (23): 271275.
Bibcode:1991CoPhC..66..271S.
doi:10.1016/0010-4655(91)90076-W.
Yakimiw, E. (1996).
Accurate computation of weights in classical Gauss-Christoel
quadrature rules.
J. Comp.
Phys.
129:
406430.
Bibcode:1996JCoPh.129..406Y.
doi:10.1006/jcph.1996.0258.
Laurie, Dirk P. (1999), Accurate recovery of recursion coecients from Gaussian quadrature formulas, J. Comp. Appl. Math. 112 (1-2): 165180,
doi:10.1016/S0377-0427(99)00228-9
7.1
Text
7.2
Images
File:Comparison_Gaussquad_trapezoidal.svg Source:
https://upload.wikimedia.org/wikipedia/commons/9/93/Comparison_
Gaussquad_trapezoidal.svg License: CC BY-SA 4.0 Contributors: Own work Original artist: Paolostar
File:Legendrepolynomials6.svg Source: https://upload.wikimedia.org/wikipedia/commons/c/c8/Legendrepolynomials6.svg License:
CC BY-SA 3.0 Contributors: Own work Original artist: Geek3
7.3
Content license