FXDX WFX: Gaussian Quadrature Formula
FXDX WFX: Gaussian Quadrature Formula
FXDX WFX: Gaussian Quadrature Formula
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.
∫ ( ) = ( )+ ( ) ...(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.
∫ ( ) = x1 + x2 + x3
Where = = , = , − x1 x3 3 / 5, =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
=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
x
4
dx by taking seven equidistant ordinates. Compare it with the exact value and the value
3
Solution:
x -3 -2 -1 0 1 2 3
y= 81 16 1 0 1 16 81
In this case we observe that the Trapezoidal rule does not give an accurate result.
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
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