0% found this document useful (0 votes)
163 views

FXDX WFX: Gaussian Quadrature Formula

0.6931 To three decimal places.

Uploaded by

chandan
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)
163 views

FXDX WFX: Gaussian Quadrature Formula

0.6931 To three decimal places.

Uploaded by

chandan
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

Lecture -6

Gaussian quadrature formula:


This formula is applicable only when the function f  x  is explicitly known in terms of its

argument and the limits of integration are -1 to +1. According to this formula the integral is
expressed as a weighted sum of n- terms in the form
1 n

 f ( x) dx  i 1 wi f ( xi ) ...(c)
1

where , ,…, are unknown coefficients known as weights and −1 < < <⋯<
< 1 are also unknown values of x called weighting factors. This is known as n-terms formula
in which there are 2n unknowns. These 2n unknowns will be evaluated by requiring that
“formula (C) be true for all polynomials of degree (2n-1) { i.e. one less to the number of
unknowns} or less. Then, it must certainly be true for simplest cases i.e. for
, , ,……. ”. The formulae based upon this principle are known as Gaussian
quadrature formulae. The satisfaction of (C) for ( ) = , ,……. will lead to a set of
2n linear equations in ′s. Their solution will give the values of ′s and ′s. Substituting back
these values in (C), one gets n-terms Gaussian quadrature formula.

Example: Derivation of 2-terms formula:


For 2-terms formula (C) becomes

∫ ( ) = ( )+ ( ) ...(D)
Since (D) has four unknowns, as per principle of the method, it must be true for all polynomials
of degree 3 or less. Then, it must certainly be true for the simplest cases ( ) = , , ,
( ) = x0 ; ∫ x0 ≡2= .1 + .1 ...(1)

( ) = x1 ; ∫ x1 =0= + ...(2)

( )= ; ∫ ≡ = + ...(3)

( )= ; ∫ =0= + ...(4)
From equations (2) and (4) i.e. (2)  − (4), we get ( − ) = 0  either
=0 = 0 or =  .
The only valid solution is =− , other reduces our formula (D) into a single term or invalid.

We then find = = 1 and − = = .


Thus, two-terms formula becomes


1
∫ ( ) = (− ) f( ).
√ 3
Similarly, the three-terms formula is given by

∫ ( ) =  x1  +  x2  +  x3 
Where = = , = , − x1  x3  3 / 5, =0

and thus ∫ ( ) = − + (0) + ( )}

In fact, the values of x in two-terms or three-terms formula are the zeros of Legendre
polynomials ( ), ( ), respectively.
Similarly, the higher terms formula can be obtained.
If the limits of integration are a to b instead of -1 to +1, then the liner transformation
( ) ( )
= =( )

1
 b  a  t  b  a  
will change the limits as follows: ∫ ( ) = ( ) 
1
f
 2
 dt

EXAMPLES
Ex.1: Calculate the value of the integral
. 1 3
∫ log e x by (a) Trapezoidal rule (b) Simpson’s rd rule (c) Simpson’s th rule
3 8
taking h = 0.2 retaining the numerical values to 7 decimals. Compare the results with exact
values.
Solution:
∶ 4.0 4.2 4.4 4.6 4.8 5.0 5.2

log e x : 1.3862944 1.4350845 1.4816045 1.5260563 1.5686159 1.6094379 1.6486586

(a) By Trapezoidal rule, we have


.
∫ . log e x = [ . + 2{ . + . + . + . + . }+ . ]

=1.8276551
1
(b) By Simpson’s rd rule, we have
3
.
∫ . log e x = [ . + 4{ . + . + . } + 2{ . + . }+ . ]

= 1.8278472
3
(c) By Simpson's th rule, we have
8
3
log e x dx  h  y4.0  3 y4.2  y4.4  y4.8  y5.0   2 y4.6  y5.2 
5.2
4.0 8
= 1.8278470.
.
Actual value of ∫. = log e x − 1 5.2
4.0
= 1.8278475

Hence the errors due to different formulae are


(a) 0.0001924 (b) 0.0000003 (c) 0.0000005
1
We observe that Simpson’s rd rule is more accurate
3
1
Ex.2: Calculate by Simpson’s rd rule an approximate value of the integral
3
3

x
4
dx by taking seven equidistant ordinates. Compare it with the exact value and the value
3

obtained by using the Trapezoidal rule.

Solution:
x -3 -2 -1 0 1 2 3
y= 81 16 1 0 1 16 81

By Simpson’s rule, we get


3
h
3
 x 4 dx 
3
+ 4{ + + } + 2{ + } + y3 = 98
3
3  x5 
 x dx     97.2
4
The exact value of
3  5  3
However, by Trapezoidal rule
3
h

3
x 4 dx 
2
+ 2{ + + + + }  y3 = 115.

In this case we observe that the Trapezoidal rule does not give an accurate result.

Example 3: Use Romberg’s method to compute I = ∫ correct to three decimal places

with Trapezoidal rule.


Solution:
We take h = 0.5,0.25 and 0.125 successively and using T.R., we get
I(0.5) = 0.7084, (0.25) = 0.6970 and I (0.125) = 0.6941
 I more correct  Iless correct 
Now, using the formula: Iimproved = I more correct +  
 2n  1 

I(0.5,0.25) = 0.6970 + (0.6970 − 0.7084) = 0.6932

I(0.25,0.125) = 0.6941 + (0.6941 − 0.6970) = 0.6931

Finally,
I(0.5,0.25,0.125) = 0.6931 + (0.6931 − 0.6932)

= 0.6931
In tabular form
I Error ( ) ( ) ( )
0.5 0.7084
0.6932
0.25 0.6970 0.6931
0.6931
0.125 0.6931

Example 4: Evaluate the integral


 /2
I sin x dx , using two-terms Gaussian formula.
0

Solution: First we must change the limits of integration from (0,  /2) to (-1, 1).
Let =
 / 2  t   / 2 =

( + 1), so =

dt .
2 4
 
∴ I = ∫ sin( ( + 1))

  
= 1.0. 1− + 1.0  1+
√ √

= 0.99847

You might also like