0% found this document useful (0 votes)
183 views5 pages

Notes On Gauss-Legendre Quadrature

The document describes the Gauss-Legendre quadrature method for numerically approximating definite integrals. It involves transforming the integral limits to [-1,1], then applying either the 2-point or 3-point Gauss-Legendre rule formulas. Several examples are provided to demonstrate approximating integrals of various functions up to 5th order accuracy. Worked solutions show the step-by-step calculations and compare the approximate results to exact values.

Uploaded by

DENNIS KIBE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
183 views5 pages

Notes On Gauss-Legendre Quadrature

The document describes the Gauss-Legendre quadrature method for numerically approximating definite integrals. It involves transforming the integral limits to [-1,1], then applying either the 2-point or 3-point Gauss-Legendre rule formulas. Several examples are provided to demonstrate approximating integrals of various functions up to 5th order accuracy. Worked solutions show the step-by-step calculations and compare the approximate results to exact values.

Uploaded by

DENNIS KIBE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

GAUSS-LEGENDRE QUADRATURE METHOD OF APPROXIMATION

Given a function f (x) which is continuous on the interval [a, b] , by use of Gauss-Legendre
b
Quadrature rule, the integral  f ( x)dx
a
can be numerically approximated.

Procedure
a) Change the variable by using the transformation formula
ab ba ba
x  t  dx  dt
2 2 2

b) Change the limits from the interval [a, b] to [1, 1]


c) Use the either Gauss Legendre n-point rule to approximate the integral.
Where n  2, 3, 4..... . For instance, lets consider 2nd and 3rd point rule and transform
b

 f ( x)dx
a
.

1. Gauss quadrature 2-point rule


ab b2 ba
b 1


a
f ( x)dx   f 
1
2
 t
2  2
dt

 1   1 
1
  g (t )dt  g     g  
1  3  3
ba ab ba 
Where, g (t )  f  t
2  2 2 

2. Gauss quadrature 3-point rule


ab b2 ba
b 1

a f ( x ) dx  1 f  2  2 t  2 dt
1
  g(t )dt 
  
5 g  3 5  8 g (0)  5 g 3 5 
1
9
ba ab ba 
Where, g (t )  f  t
2  2 2 

Worked examples
Example 1.
a) Use the 2-point Gauss-Legendre Rule to approximate
4
I   xe 2 x dx  5216.926477
0

1
Solution. ……………………………………………………
Coordinate transformation
ba ba
a  0, b  4  x  t  2t  2  x  2t  2  dx  2dt ……(2)
2 2
Substituting (2) in (1) gives the transformed integral as
4 1
I   xe 2 x dx   (4t  4)e 4t  4 dt.............................................(3)
0 1

Using 2-point Gaussian Quadrature formula on (3) for approximation yields

 1   1 
1
I   g (t )dt  g     g  
1  3   3 
where, g (t )  (4t  4)e 4t  4
4 4
 4  4 3  4  4
 I   4  e   4  e 3

 3  3
 9.16765732373  3468.37627894
 3477.5439361
 3477.5439361 
Error  1    100%  33.34%
 5216.926477 

b) Use 3-point Gaussian Quadrature approximation method to evaluate the integral.

2
1
I   g (t )dt 
  
5 g  3 5  8 g (0)  5 g 3 5 
1
9
1
I   g (t )dt 
  
5 g  3 5  8 g (0)  5 g 3 5 
1
9
1
I   g (t )dt 
  
5 g  0.6  8 g (0)  5 g 0.6 
1
9

I
5
9
  8
9
 
5
9

4  4 0.6 e 4 4 0.6   4e 4  4  4 0.6 e 4 4  0.6 

I  1.23399530  194.126755673  4771.7459382


 4967.106689173

 249.819787827 
Error     100%  4.79%
 5216.926477 

Remarks: The 3-point approximation is more accurate than the 2-point one

Example 3. Use the three-point Gauss-Legendre Rule to approximate


5
dx
I 
1
x

Solution………………………………………………………………………………………..
Using

ab ba ba


b 1

a
f ( x)dt   f 
1
2
 t
2  2
dt

1
f(x)  , a  1 and b  5 ,
x

3
ba
b 1
dx 1
a x  1  a  b b  a  2 dt
  t
 2 2 
ba
1
  a  b  bt  at  dt
1

5 1
1
  6  5t  t 
1
dx

1
4
  6  4t
1
dt

1
2
 dt (2)
1
3  2t

Hence, evaluate the transformed integral using the Gauss-Legendre approximation 3-point rule
1
2
I  3  2t
1
dt (3)

Recall.
1
 
5 f  3 5  8 f (0)  5 f  35 
 g (t )dt 
1
9

2
where, g (t ) 
3  2t
Hence,

 2  2  2 
5   8   5 
1 3 2 3 5  3 3 2 3 5 
2    
1 3  2t dt  9
 2  16  2 
5    5 
  1.45081  3  4.54919 
9
6.8927  5.3333  2.9819

9
15.2079

9
 1.6898
Error.

4
Exact;

2 ln(3  2t ) t  1
1
2
I  3  2t
1
dt 
2 t  1
 ln 5  ln 1  ln 5  1.6094

𝐸𝑟𝑟𝑜𝑟 = 1.6094 − 1.6898 = −0.0804


Example 4. Use Gauss-Legendre quadrature 2-point and 3-point formulae to approximate

I   x 4  1dx
4

a) 2

Ans. 200.4014

I   2 x 2  3x dx
3
b)
2
1
3
c) I   1  t  dt  4.6666667
2

(Exercise: Repeat the above integrals for 2- point rule)

You might also like