Sunteți pe pagina 1din 9

COMPUTATION OF GAUSS–JACOBI, GAUSS–RADAU–JACOBI

AND GAUSS–LOBATTO–JACOBI QUADRATURE FORMULAE


USING GOLUB-WELSCH METHOD

FLORIAN LEONARD GOZMAN

Abstract. Calculation of Gauss-Lobatto-Jacobi and Gauss-Radau-Jacobi


quadrature coefficients of fixed nodes are expressed using factorial and Γ func-
tions. Computation algorithms of Gauss-Jacobi, Gauss-Lobatto-Jacobi and
Gauss-Radau-Jacobi quadrature formulae are presented using Golub-Welsch
method.

1. Introduction
Given a real function f defined on an interval (closed or open) and a weighting
function w, define the quadrature formulae of Gauss type,[4] by
Zb n−1
X
(1.1) w(x)f (x)dx = Ai f (xi ) + Rn [f ]
a i=0

where
• w(x) ≥ 0, x ∈ (a, b) (nonnegative),
• exist moments
Zb
µk = xi w(x)dx, k = 0, 1, . . . , µ0 > 0.
a

• Ai are quadrature formula’s coefficients and xi are quadrature formula’s


nodes that should be calculated such that degree of exactness of (1.1) will
be maximum.
Definition 1. [4] Given a weighting function w on [−1, 1] such that
α β
w(α,β) (x) = (1 − x) (1 + x) , α, β > −1,
a well-behaved real function f on [−1, 1], and the following quadrature formula:
Z1 n−1
X k
X
(1.2) w(α,β) (x) f (x) dx = Ai f (xi ) + Bj f (yj ) + Rn+k [f ] ;
−1 i=0 j=1

with k ≥ 0 fixed nodes, we define:

Date: March 25, 2005.


Key words and phrases. Gauss quadrature formulae, Numerical analysis.
1
2 FLORIAN LEONARD GOZMAN

• (k = 0)Gauss-Jacobi quadrature formula in the form:


Z1 n−1
X
(1.3) w(α,β) (x) f (x) dx = Ai f (xi ) + Rn [f ] ;
−1 i=0

• (k = 1) Gauss-Radau-Jacobi quadrature formulae in two forms:


Z1 n−1
[1] [1] [1]
X
(1.4) w(α,β) (x) f (x) dx = Ai f (xi ) + B1 f (−1) + Rn+1 [f ] ,
−1 i=0

Z1 n−1
[2] [2] [2]
X
(1.5) w(α,β) (x) f (x) dx = Ai f (xi ) + B1 f (1) + Rn+1 [f ] ;
−1 i=0

• (k = 2) Gauss-Lobatto-Jacobi quadrature formula in the form:


Z1 n−1
X
(1.6) w(α,β) (x) f (x) dx = Ai f (xi ) + B1 f (−1) + B2 f (1) + Rn+2 [f ],
−1 i=0

where R[f ] is the remainder, Ai are coefficients of free nodes, Bj are coefficients of
fixed nodes, xi are free nodes and yj .
Remark 1. [4] If we consider the quadrature formula from Definition 1 then max-
imum degree of exactness is 2n + k − 1.
Remark 2. [4, 3] Regarding Definition 1, in order to have a maximum degree of
exactness all free nodes are roots of Jacobi orthogonal polynomials of n degree,
which have expression in the form
n
(−1) dn h n i
(1.7) Jn(α1 ,β 1 ) (x) = n w(−α1 ,−β 1 ) (x) n w(α1 ,β 1 ) (x) 1 − x2 ,
2 n! dx

 (α, β) , k = 0
(α + 1, β) , k = 1, y1 = 1

(1.8) (α1 , β 1 ) := .

 (α, β + 1) , k = 1, y1 = −1
(α + 1, β + 1) , k = 2, y1 = −1, y2 = 1

Exist also quadrature formulae of Gauss type more generally with multiple fixed
nodes (k > 2) studied by D.D. Stancu, [4], but we will not insist on them.
Remark 3. [4, 3] Regarding (1.7) we have also the following recurrence formula:
(α ,β 1 )
J−11 (x) := 0,
(α ,β )
J0 1 1 (x) := 1,
(α ,β 1 ) (α ,β 1 )
(1.9) 1
Jn+1 (x) = (x − an ) Jn(α1 ,β 1 ) (x) − bn Jn−1
1
(x), n ≥ 1,
where
R1 
(α ,β )
2 R1  (α1 ,β 1 )
2
x Jn 1 1 (x) w(α1 ,β 1 ) (x) dx Jn (x) w(α1 ,β 1 ) (x) dx
−1 −1
an = , bn = ·
R1 
(α ,β )
2 R1 
(α1 ,β 1 )
2
Jn 1 1 (x) w(α1 ,β 1 ) (x) dx Jn−1 (x) w(α1 ,β 1 ) (x) dx
−1 −1

This result holds also for all orthogonal polynomial with a given weighting function.
3

Remark 4. [4] If we consider quadrature formulae from Definition 1 then all xi


free nodes set is contained in (−1, 1) and Ai > 0, i = 0, n − 1.

Remark 5. [4] If we consider quadrature formulae from Definition 1 with fixed


nodes yj then Ai can be calculated as follow:
 Ci
1−xi , k = 1, y1 = 1


Ci
(1.10) Ai = 1+xi , , k = 1, y1 = −1 , i = 0, n − 1
Ci
, k = 2, y1 = −1, y2 = 1


1−x2i

where Ci are coefficients from a Gauss-Jacobi quadrature formula like (1.3) (without
fixed nodes) with w(α1 ,β 1 ) as weighting function where (α1 , β 1 ) are given in (1.8).

Remark 6. [4] Regarding definition 1 the Bj coefficients can be calculated using


the following formulae
 1
(α1 ,β 1 )
R (α,β) Jn (x)

 w (x) (α 1 ,β 1 ) (−1)
dx, k = 1, y1 = −1, j = 1
J


 −1 n


 R1 (α,β) J (α1 ,β 1 ) (x)
w (x) n(α1 ,β1 ) dx, k = 1, y1 = 1, j = 1



Jn (1)

(1.11) Bj = −1
R1 (α,β) Jn(α1 ,β 1 )
(x) 1−x
w (x) (α 2 dx, k = 2, y1 = −1, y2 = 1, j = 0


1 ,β 1 ) (−1)



 −1 J n


 R1 (α,β) J (α1 ,β 1 ) (x)
w (x) n(α1 ,β1 ) 1+x 2 dx, k = 2, y1 = −1, y2 = 1, j = 1



−1 Jn (1)

where (α1 , β 1 ) are given in (1.8).

In section two we will obtain an expression for Bj coefficients using Γ functions.

Theorem 1. (Golub-Welsch, [2, 1]) Having all an ,bn coefficients from orthogonal
polynomial recurrence formula like (1.9) and consider the following threediagonal
matrix:
 √ 
a0 a1 0 0 ... 0 0
√ √ 
 b1 a1 b2 0 ... 0 0 
 
 √ √ 
 0 b2 a2 b3 . . . 0 0 
T = 
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 p 
 0 0 0 0 . . . αn−1 bn−1 
 
p
0 0 0 0 ... bn−1 an−1

then all xi nodes and Ai coefficients from a quadrature formula of Gauss type (see
(1.1)) are obtained as follow:
(i) xi are eigen values of T ;
2
(ii) Ai = µ0 v1,i , where vi are normalized eigen vectors of T of xi .

In order to use Theorem 1 for computing the quadrature nodes and coefficients
we should have µ0 , ai and bi already computed..
4 FLORIAN LEONARD GOZMAN

Remark 7. [4] In the case of Jacobi orthogonal polynomials we can calculate ex-
plicitly ai and bi recurrence coefficients by using the following formulae:
β−α
a0 = ,
α+β+2
β 2 − α2
(1.12) an = n > 1,
(2n + α + β) (2n + α + β + 2)
4 (1 + α) (1 + β)
b1 = 2,
(3 + α + β) (2 + α + β)
4n (n + α + β) (n + α) (n + β)
(1.13) bn = 2 n > 1.
(2n + α + β + 1) (2n + α + β) (2n + α + β − 1)
Remark 8. [4] The moment of order zero µ0 , which appears in Gauss-Jacobi quad-
rature formulae, can be calculated as follow:
Z1
Γ (α + 1)Γ (β + 1)
(1.14) µ0 = w(α,β) (x)dx = 2α+β+1 .
Γ (α + β + 2)
−1
5

2. Calculation of Gauss-Radau-Jacobi and Gauss-Lobatto-Jacobi


quadrature coefficients of fixed nodes
In this section we try to obtain explicit computing formulae for all quadrature
coefficients Bj of fixed nodes yj showed in the first section. From Remark 6 we have
R1 (α,β+1) (α,β)
to calculate integrals in the form Jn w . Using Leipniz-Newton formula
−1
we have:
1 1 dn h (α,β+1) n i
Jn(α,β+1) (x) = w (x) x2
− 1
2n n! w(α,β+1) dxn
n n   (k)  (n−k)
(−1) 1 X n α+n β+n+1
= n (1 − x) (1 + x)
2 n! w(α,β+1) k
k=0
n n  
(−1) 1 X n k Γ (α + n + 1) α+n−k
= n (−1) (1 − x) ×
2 n! w (α,β+1) k Γ (α + n + 1 − k)
k=0
Γ (β + n + 2) β+k+1
× (1 + x)
Γ (β + k + 2)
n n  
(−1) Γ (α + n + 1) Γ (β + n + 2) X n k
= (−1) ×
2n n! k
k=0
w(n−k,k) (x)
(2.1) × .
Γ (α + n + 1 − k) Γ (β + k + 2)
From (2.1) we have:
n n  
(−1) Γ (α + n + 1) Γ (β + n + 2) X n k
w(α,β) Jn(α,β+1) (x) = (−1) ×
2n n! k
k=0
(α+n−k,β+k)
w (x)
(2.2) × .
Γ (α + n + 1 − k) Γ (β + k + 2)
From (2.2) we have:
Z1 n n  
(α,β) (−1) Γ (α + n + 1) Γ (β + n + 2) X n
w Jn(α,β+1) (x) dx = ×
2n n! k
−1 k=0

R1
w(α+n−k,β+k) (x) dx
k −1
× (−1)
Γ (α + n + 1 − k) Γ (β + k + 2)
n n  
(−1) Γ (α + n + 1) Γ (β + n + 2) X n k
= (−1) ×
2n n! k
k=0

2α+β+n+1 Γ (α+n+1−k)Γ (β+k+1)


Γ (α+β+n+2)
×
Γ (α + n + 1 − k) Γ (β + k + 2)
(2.3)
n n 
(−1) 2α+β+1 Γ (α + n + 1) Γ (β + n + 2) X n

k 1
= (−1) .
n!Γ (α + β + n + 2) k β+k+1
k=0
6 FLORIAN LEONARD GOZMAN

In order to calculate the combination sum from the last expression we are using
Newton binomial decomposition and then we integrate the sum on (0, 1) as follow:

n   Z1 X
n  
X n k 1 n k
(−1) = (−1) xβ+k dx
k β+k+1 k
k=0 0 k=0
Z1
n
= xβ (1 − x) dx
0
= B (β + 1, n + 1)
Γ (β + 1) n!
(2.4) = .
Γ (β + n + 2)

From (2.3) and (2.4) we obtain

Z1
n Γ (β + 1) Γ (α + n + 1)
(2.5) w(α,β) Jn(α,β+1) (x) dx = (−1) 2α+β+1 .
Γ (α + β + n + 2)
−1

Replacing x with −1 in (2.1) we obtain

n Γ (β + n + 2)
(2.6) Jn(α,β+1) (−1) = (−1) .
Γ (β + 2) n!

From (1.11), (2.5) and (2.6) we obtain the final expression of the coefficient of fixed
node y1 = −1 from Gauss-Radau-Jacobi quadrature formula i.e.

[1] n!Γ (β + 1) Γ (β + 2) Γ (α + n + 1)
B1 = B1 = 2α+β+1 .
Γ (β + n + 2) Γ (α + β + n + 2)

Using the same technique of calculation we can calculate Gauss-Lobatto-Jacobi


quadrature coefficients of fixed nodes also.
In conclusion we have the following result:

Theorem 2. Given a quadrature formula like in Definition 1 then the quadrature


coefficients of fixed nodes have the following expression:
(1) For Gauss-Radau-Jacobi (one fixed node i.e. k = 1) we have:

[1] n!Γ (β + 1) Γ (β + 2) Γ (α + n + 1)
(2.7) B1 = 2α+β+1 ,
Γ (β + n + 2) Γ (α + β + n + 2)
[2] n!Γ (α + 1) Γ (α + 2) Γ (β + n + 1)
(2.8) B1 = 2α+β+1 ;
Γ (α + n + 2) Γ (α + β + n + 2)

(2) For Gauss-Lobatto-Jacobi (two fixed nodes i.e. k = 2) we have:

n!Γ (β + 1) Γ (β + 2) Γ (α + n + 2)
(2.9) B1 = 2α+β+1 ,
Γ (β + n + 2) Γ (α + β + n + 3)
n!Γ (α + 1) Γ (α + 2) Γ (β + n + 2)
(2.10) B2 = 2α+β+1 .
Γ (α + n + 2) Γ (α + β + n + 3)
7

3. Computation of gaussian quadrature coefficients and nodes using


Golub-Welsch method
We showed in previous section in Theorem 1 that if we have known recursion
coefficients an and bn from formula (1.9) we can compute xi and Ai from (1.3).
Because we have a Jacobi polynomial we have an and bn already calculated. Based
on these results we deduce Algorithm 1. Some calculation examples are given in
Table 1
Algorithm 1. (Golub-Welsch algorithm for computing Gauss-Jacobi quadrature
nodes and coefficients)
Input:
• n - number of nodes;
• α, β - real values > −1;
Return:
• (xi )i=0,n−1 - nodes;
• (Ai )i=0,n−1 - coefficients;
Steps:
(1) Calculate (ai )i=0,n−1 and (bi )i=0,n−1 using (1.12) and (1.13);
(2) Calculate (xi )i=0,n−1 and (Ai )i=0,n−1 using Theorem 1;
End algorithm
Following, we can compute Gauss-Jacobi-Radau quadrature nodes and coeffi-
cients using Algotithm 2. Some calculation examples are given in Table 2
Algorithm 2. (Algorithm for computing Gauss-Jacobi-Radau quadrature nodes
and coefficiensts)
Input:
• n - number of free nodes;
• α, β - real values > −1;
Return:
• y1 = −1 (or y1 = 1) - known fixed node;
• (xi )i=0,n−1 - free nodes;
• (Ai )i=0,n−1 - free nodes coefficients;
[1] [2]
• B1 (or B1 ) - fixed node coefficient;
Steps:
(1) Calculate (xi )i=0,n−1 and (Ci )i=0,n−1 (gaussian coefficients) using
Algorithm 1 with input parameters: n, α, β + 1 (or n, α + 1, β);
(2) Calculate (Ai )i=0,n−1 from (Ci )i=0,n−1 and (xi )i=0,n−1 using (1.10) from
Remark 5
[1] [2]
(3) Calculate B1 (or B1 ) using (2.7) (or (2.8)) from Theorem 2
End algorithm
Analogous we have Algorithm 3 for computation of Gauss-Jacobi-Lobatto quad-
rature coefficients and nodes. Some calculation examples are given in Table 3.
8 FLORIAN LEONARD GOZMAN

(α, β) = (0, 0) (α, β) = (−1/2, −1/2) (α, β) = (−1/2, 1/2)


nodes coeff nodes coeff nodes coeff
-0.9739 0.0667 -0.9877 0.3142 -0.9556 0.0133
-0.8651 0.1495 -0.8910 0.3142 -0.8262 0.0520
-0.6794 0.2191 -0.7071 0.3142 -0.6235 0.1127
-0.4334 0.2693 -0.4540 0.3142 -0.3653 0.1899
-0.1489 0.2955 -0.1564 0.3142 -0.0747 0.2768
0.1489 0.2955 0.1564 0.3142 0.2225 0.3658
0.4334 0.2693 0.4540 0.3142 0.5000 0.4488
0.6794 0.2191 0.7071 0.3142 0.7331 0.5185
0.8651 0.1495 0.8910 0.3142 0.9010 0.5688
0.9739 0.0667 0.9877 0.3142 0.9888 0.5951
Table 1. Gauss-Jacobi quadrature nodes and coefficients (n = 10)

Algorithm 3. (Algorithm for computing Gauss-Jacobi-Lobatto quadrature nodes


and coeffciensts)
Input:
• n - number of free nodes;
• α, β - real values > −1;
Return:
• y1 = −1 and y2 = 1 - known fixed nodes;
• (xi )i=0,n−1 - free nodes;
• (Ai )i=0,n−1 - free nodes coefficients;
• B1 and B2 - fixed nodes coefficients;
Steps:
(1) Calculate (xi )i=0,n−1 and (Ci )i=0,n−1 (gaussian coefficients) using
Algorithm 1 with input parameters: n, α + 1, β + 1;
(2) Calculate (Ai )i=0,n−1 from (Ci )i=0,n−1 and (xi )i=0,n−1 using (1.10) from
Remark 5
(3) Calculate B1 and B2 using (2.9) and (2.10) from Theorem 2
End algorithm
9

(α, β) = (0, 0) (α, β) = (−1/2, −1/2) (α, β) = (−1/2, 1/2)


nodes coeff nodes coeff nodes coeff
-1.0000 0.0165 -1.0000 0.1496 -1.0000 0.0018
-0.9399 0.0998 -0.9556 0.2992 -0.9176 0.0247
-0.8034 0.1713 -0.8262 0.2992 -0.7630 0.0689
-0.6020 0.2289 -0.6235 0.2992 -0.5470 0.1305
-0.3519 0.2679 -0.3653 0.2992 -0.2870 0.2048
-0.0735 0.2852 -0.0747 0.2992 -0.0041 0.2856
0.2107 0.2794 0.2225 0.2992 0.2788 0.3664
0.4777 0.2509 0.5000 0.2992 0.5387 0.4406
0.7058 0.2022 0.7331 0.2992 0.7547 0.5023
0.8765 0.1370 0.9010 0.2992 0.9093 0.5465
0.9762 0.0609 0.9888 0.2992 0.9898 0.5695
Table 2. Gauss-Jacobi-Radau quadrature nodes and coefficients
(n = 10,k = 1)

(α, β) = (0, 0) (α, β) = (−1/2, −1/2) (α, β) = (−1/2, 1/2)


nodes coeff nodes coeff nodes coeff
-1.0000 0.0152 -1.0000 0.1428 -1.0000 0.0016
-0.9449 0.0917 -0.9595 0.2856 -0.9245 0.0217
-0.8193 0.1580 -0.8413 0.2856 -0.7825 0.0605
-0.6329 0.2125 -0.6549 0.2856 -0.5827 0.1150
-0.3995 0.2513 -0.4154 0.2856 -0.3399 0.1814
-0.1366 0.2714 -0.1423 0.2856 -0.0723 0.2545
0.1366 0.2714 0.1423 0.2856 0.2004 0.3290
0.3995 0.2513 0.4154 0.2856 0.4580 0.3993
0.6329 0.2125 0.6549 0.2856 0.6813 0.4603
0.8193 0.1580 0.8413 0.2856 0.8539 0.5075
0.9449 0.0917 0.9595 0.2856 0.9628 0.5372
1.0000 0.0152 1.0000 0.2856 1.0000 0.2737
Table 3. Gauss-Jacobi-Lobatto quadrature nodes and coefficients
(n = 10, k = 2)

References
[1] Gautschi, W., Numerical Analysis. An Introduction, Birkhäuser, Boston • Basel • Berlin,
1997.
[2] Golub, G. H. and Welsch, J. H., Calculation of Gauss quadrature rules, Math. Comput., 1969.
[3] Stancu, D. D., Coman, Gh., Agratini, O., Trâmbiţaş, R., Numerical analysis and approxi-
mation teory (in romanian), vol. I, ”Babeş–Bolyai” Univerisity, Cluj University Press, Cluj–
Napoca, 2001.
[4] Stancu, D. D., Coman, Gh., Blaga, P., Numerical analysis and approximation teory (in ro-
manian), vol. II, ”Babeş–Bolyai” University, Cluj University Press, Cluj–Napoca, 2002.

Cluj-Napoca, Romania
E-mail address: fgozman@math.ubbcluj.ro
URL: http://www.ubbcluj.ro

S-ar putea să vă placă și