Numerical Integration (Numerical Method)

Lets define a function
Let f(x)=|x22x|+11+x and find 30f(x)dx and let a=0,b=3
by using
Composite Midpoint Rule||Composite Trapezoidal Rule||Composite Simpson's Rule||Romberg Method

Composite Midpoint Rule

Formula: Let xi=a+ih and there is a number μ(a,b) such that baf(x)dx=hn1j=0f(xj+xj+12)Mn[a,b](f)+(ba)h26f(μ)Error Term

With n=6,

h=ban=306=12

Mn=6[0,3](f)=12[f(0+0.52)+f(0.5+12)+f(1+1.52)+f(1.5+22)+f(2+2.52)+f(2.5+32)]=12[f(14)+f(34)+f(54)+f(74)+f(94)+f(114)]=4.0644195



Composite Trapezoidal Rule


Formula: Let xi=a+ih and there is a number μ(a,b) such that baf(x)dx=h2[f(a)+2n1j=1f(xj)+f(b)]Tn[a,b](f)+(ba)h212f(μ)Error Term

With n=6,

h=ban=306=12

Tn=6[0,3](f)=(12)2[f(0)+2[f(12)+f(1)+f(32)+f(2)+f(52)]+f(3)]=4.030357143




Composite Simpson's Rule

Formula: Let xi=a+ih and there is a number μ(a,b) such that baf(x)dx=h3[f(a)+even term(x2,x4,...)2n/21j=1f(x2j)+odd term(x1,x3,...)4n/2j=1f(x2j1)+f(b)]Sn[a,b](f)+(ba)h4180f(4)(μ)Error Term

With n=6,

h=ban=306=12

Sn=6[0,3](f)=(12)3[f(0)+4f(12)+2f(1)+4f(32)+2f(2)+4f(52)+f(3)]=4.054365079


Romberg Method

Use Romberg Method to compute R4,4, of order O(h8) for the 30f(x)dx

Solution:

h3020=3R1,1(3)2[f(0)+f(3)]=6.3753021=32R1,2(32)2[f(0)+2f(32)+f(3)]=4.91253022=34R1,3(34)2[f(0)+2(f(34)+f(32)+f(94))+f(3)]=4.2405913023=38R1,4(38)2[f(0)+2(f(38)+f(34)+f(98)+f(32)+f(158)+f(94)+f(218))+f(3)]=4.104157


(h2)O(h4)O(h6)O(h8)6.3754.91254(4.9125)6.37541=4.4254.2405914(4.240591)4.912541=4.0166214.1041574(4.104157)4.24059141=4.058679


(h2)O(h4)O(h6)O(h8)6.3754.91254.4254.2405914.01662142(4.016621)4.425421=3.9893964.1041574.05867942(4.058679)4.016621421=4.061483


(h2)O(h4)O(h6)O(h8)6.3754.91254.4254.2405914.0166213.9893964.1041574.0586794.06148343(4.061483)3.989396431=4.062627


(h2)O(h4)O(h6)O(h8)6.3754.91254.4254.2405914.0166213.9893964.1041574.0586794.0614834.062627

30f(x)dx4.062627


Gaussian Quadrature

Using the properties of Lengendre polynomial, the results are shown below:

ntiwiDegree10212±13133±35,059,8954±(3265)7,±(3+265)718+3036,183036750,±1352107,±135+2107128255,322+1370900,32213709009

and apply the following formula:

baf(x)dx=ba211f((ba)t+(b+a)2)ba2ni=1wif((ba)ti+(b+a)2)


Use Gaussian Quadrature to find the approximation of 22x3exdx

Note: f((ba)t+(b+a)2)=f((2(2))t+(22)2)=f(4t+02)=f(2t)

n=1,

22x3exdx=2(2)211f(2t)dt=42[2f(20)]=0

n=2,

22x3exdx=2(2)211f(2t)dt=42[1f(2(13))+1f(213)]=8.800116

n=3,

22x3exdx=2(2)211f(2t)dt=42[59(f(235)+f(2(35)))+89f(0)]=18.570706

n=4,

22x3exdx=2(2)211f(2t)dt=42[18+3036(f(232657)+f(2(32657)))+183036(f(23+2657)+f(2(3+2657)))]=19.859939


n=5,

22x3exdx=2(2)211f(2t)dt=42[128255f(20)+322+1370900(f(21352107)+f(2(1352107)))+3221370900(f(2335+2107)+f(2(135+2107)))]=19.919469

Comments

Popular Posts