Sunteți pe pagina 1din 9

Numerical Integration

Gauss Quadrature 2 point and 3


point formula

Presented by
PARKHE RAVINDRA AMBADAS

PARKHE R A Numerical Intergration 1


Gauss Quadrature 2 point formula
Define function f(x)

Find out value of c & d

c=(xn-x0)/2

d=(xn+x0/2)

where x0=lower limit, xn=upper limit

also find out x1 & x2

x1=(-c/sqrt(3))+d;

x2=(c/sqrt(3))+d;

area=a*{f(x1)+f(x2)}

PARKHE R A Numerical Intergration 2


 Find the integration of x*x*x+x-1 with limits 1 to 4
using gauss Quadrature 2 point formula.
Solution:
Given data
x2=(c/sqrt(3))+d = (1.5/sqrt(3))+2.5
Define function f(x)= x*x*x+x-1 X0=1
Xn=4 x2= 3.3660
Find out value of c & d
f(x1)= 4.996
c=(xn-x0)/2 = (4-1)/2 = 1.5
d=(xn+x0/2) = (4+1)/2 = 2.5 f(x2)= 40.5026

where x0=lower limit, xn=upper limit


Area=c*(f(x1)+f(x2))
also find out x1 & x2
Area = 1.5*(4.996+40.5026)
x1=(-c/sqrt(3))+d = (-1.5/sqrt(3))+2.5

x1= 1.6339
Area= 68.25

PARKHE R A Numerical Intergration 3


 Find the integration of x*exp(x) with limits 1 to 2
using gauss Quadrature 2 point formula.
Solution:
Given data
x2=(c/sqrt(3))+d = (0.5/sqrt(3))+1.5
Define function f(x)= x*exp(x) X0=1
Xn=2 x2= 1.7886
Find out value of c & d f(x1)= 4.067545
c=(xn-x0)/2 = (2-1)/2 = 0.5
d=(xn+x0/2) = (2+1)/2 = 1.5 f(x2)= 10.699

where x0=lower limit, xn=upper limit Area=c*(f(x1)+f(x2))

also find out x1 & x2 Area = 1.5*(4.996+40.5026)


x1=(-c/sqrt(3))+d = (-0.5/sqrt(3))+1.5
Area= 7.3890
x1= 1.2113

PARKHE R A Numerical Intergration 4


Gauss Quadrature 3 point formula
 Define function
 Find out value of c & d
 c=(xn-x0)/2
 d=(xn+x0/2)
where x0=lower limit, xn=upper limit
 also find out x1, x2 & x3.
 x1=(c*sqrt(3/5))+d;
 x2= (-c*sqrt(3/5))+d;
 x3=d;
 area=c*(5/9*f(x1)+8/9*f(x3)+5/9*f(x2))

PARKHE R A Numerical Intergration 5


 Find the integration of x*x-5*x+2 with limits 3 to 5
using gauss Quadrature 3 point formula.
Solution:
x3=d
Given data
Define function f(x)= x*x-5*x+2 X0=3 Xn=5 x3=4
Find out value of c & d
c=(xn-x0)/2 = (5-3)/2 = 1 f(x1)= 0.9233502
d=(xn+x0/2) = (5+3)/2 = 4
where x0=lower limit, xn=upper limit
f(x2)= -3.7237948
also find out x1 & x2
x1=(c*sqrt(3))+d = (1*sqrt(3/5))+4
f(x3)= -2.
x1= 4.7745
Area=c*(5/9*f(x1)+8/9*f(x3)+5/9*f(x2))
x2=(-c*sqrt(3/5))+d
= (-1*sqrt(3/5))+4
x2= 3.2254
Area= -3.3333
PARKHE R A Numerical Intergration 6
 Find the integration of 1/(1+x*x) with limits 0 to 1
using gauss Quadrature 3 point formula.
Solution:
Given data
Define function f(x)= 1/(1+x*x)
x3=d
X0=0 Xn=1
x3=0.5
Find out value of c & d
c=(xn-x0)/2 = (1-0)/2 = 0.5
f(x1)= 0.5595
d=(xn+x0/2) = (1+0)/2 = 0.5
where x0=lower limit, xn=upper limit

also find out x1 & x2 f(x2)= 0.9874


x1=(c*sqrt(3))+d = (0.5*sqrt(3/5))+0.5
x1= 0.8873 f(x3)= 0.8
x2=(-c*sqrt(3/5))+d
= (-0.5*sqrt(3/5))+0.5 Area=c*(5/9*f(x1)+8/9*f(x3)+5/9*f(x2))
x2= 0.1127

Area= 0.7853
PARKHE R A Numerical Intergration 7
Excercise
 Solve the integral using Guass Legander 3 point
formula

Solve the integral using Guass Legender 2 point


formula

PARKHE R A Numerical Intergration 8


Thank You
PARKHE R A Numerical Intergration 9

S-ar putea să vă placă și