Chap18
Chap18
Chap18
P
Chapter 18
Numerical
N i l IIntegration
t ti off
Functions
• The
h particular
i l Gauss
G quadrature
d
formulas described in this section
are called Gauss-Legendre
formulas
Gauss-Legendre
Gauss Legendre Formulas
• The method of undetermined coefficients
offers
ff a third
hi d approach
h (G
(Gauss Quadrature).
Q d )
I c 0 f (a ) c1 f (b)
c 0 c1 b a
ba ba (ba ) / 2
c0 c1 xdx
2 2 ( b a ) / 2 ba ba
I f (a) f (b)
ba ba 2 2
c0 c1 0 Equivalent to the trapezoidal rule
2 2
Two point Gauss-Legendre
g
Formulas
I c 0 f ( x 0 ) c1 f ( x1 )
- x0 and x1 are not fixed at the end
points ->
points. > four unknowns
unknowns. -> > four
equations are required.
It fits the integral g of these
functions y = constant, y = x, y =
x2, y = x13 1
c 0 c1 1dx
d 2 c 0 x 0 c1 x1 xdx
d 0
1 1
2 1 3
c 0 x 0 c1 x1 x dx 0
1
c 0 x c x x dx
2 2 2 3 3
0 1 1 1 1
3
c0 c1 1
1 1
1 1 I f ( ) f ( )
x0 0.5773503 x1 0.5773503 3 3
3 3
Two point Gauss-Legendre
g
Formulas
•Integrals over other intervals require a change in variables
to set the limits from -1 to 1.
a a 0 (1) a1 ba ba
a0 a1
b a 0 (1) a1 2 2
(b a) (b a ) x d ba
x dx dx d
2 2
Example
p 18.3
Q. Use two point Gauss-Legendre formula to evaluate the integral of
the following function from x = 0 and 0.8.
0 8 The exact value is
1.640533. f ( x) 0.2 25 x 200 x 2 675 x 3 900 x 4 400 x 5
x 0.4 0.4 x d dx 0.4dx d
0.8
0 (0.2 25 x 200 x 2 675 x 3 900 x 4 400 x 5 )dx
1
[0.2 25(0.4 0.4 x d ) 200(0.4 0.4 x d ) 2 675(0.4 0.4 x d ) 3
-1
Sol.)
I 0.5555556 f ( 0.7745967 ) 0.8888889 f (0) 0.5555556 f (0.7745967 )
I 0.2813013 0.8732444 0.4859876 1.640533