Approximate the following integral using Gaussian quadrature with n=3. Compare your result with the exact one

Approximate the following integral using Gaussian quadrature with n=3. Compare your result with
the exact one

-√35√2dx.

Solution:

Consider the integral

3.5 √x²-4 dx

Here,

a=3, b=3.5

Transform the given integral into an integral over [-1,1] by using the following transformation:

2x-a-b b-a ⇒x=¹[(b-a)t+a+b]= 0.251 +3.25

This permits Gaussian quadrature to be applied in any interval[a,b], because,

[*f(x) dx = [ ƒ [(b-a)t+a+b) (b_a) dt 2 2

Therefore given integral transforms to,

x S.²³. dx √√x²-4 0.5 3.5 2 3 0.25t+3.25 (0.251 +3.25)² -4 dt

Gaussian quadrature formula with n = 3is,

[₁ ƒ (x) dx = c‚ ƒ (x₁) + c₂ƒ (x₂)+cz ƒ (x₂) …… (1)

Herec₁=1, C₂ = 1, x₁ = 0.5773502692 and x₂ = -0.5773502692, and

f(x): 0.25x +3.25 (0.25x+3.25)² -4

Substituting these values in (1) gives,

-3.5 0.25t+3.25 (0.251 +3.25)²-4 dt

= 0.5ƒ (0.7745966692)+0.8ƒ(0)+0.5ƒ(-0.7745966692) = 0.5 (1.2284090393) +0.8 (1.2686700948)+0.5(1.3224538195) = 2.5448527837

Therefore,

x S.²³. dx √√x²-4 0.5 3.5 2 3 0.25t+3.25 (0.251 +3.25)² -4 dt

= (0.25) (2.5448527837)

= 0.6362131959

 

Previous
Next Post »