Numerical Integration (Numerical Method)
Lets define a function
Romberg Method
Use Romberg Method to compute R4,4, of order O(h8) for the ∫30f(x)dx
Let f(x)=|x2−2x|+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=hn−1∑j=0f(xj+xj+12)⏟Mn[a,b](f)+(b−a)h26f″(μ)⏟Error Term
With n=6,
h=b−an=3−06=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)+2n−1∑j=1f(xj)+f(b)]⏟Tn[a,b](f)+(b−a)h212f″(μ)⏟Error Term
With n=6,
h=b−an=3−06=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
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=hn−1∑j=0f(xj+xj+12)⏟Mn[a,b](f)+(b−a)h26f″(μ)⏟Error Term
With n=6,
h=b−an=3−06=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)+2n−1∑j=1f(xj)+f(b)]⏟Tn[a,b](f)+(b−a)h212f″(μ)⏟Error Term
With n=6,
h=b−an=3−06=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/2−1∑j=1f(x2j)+odd term(x1,x3,...)⏞4n/2∑j=1f(x2j−1)+f(b)]⏟Sn[a,b](f)+(b−a)h4180f(4)(μ)⏟Error Term
With n=6,
h=b−an=3−06=12
Sn=6[0,3](f)=(12)3[f(0)+4f(12)+2f(1)+4f(32)+2f(2)+4f(52)+f(3)]=4.054365079
With n=6,
h=b−an=3−06=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:
h3−020=3R1,1(3)2[f(0)+f(3)]=6.3753−021=32R1,2(32)2[f(0)+2f(32)+f(3)]=4.91253−022=34R1,3(34)2[f(0)+2(f(34)+f(32)+f(94))+f(3)]=4.2405913−023=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.3754−1=4.4254.2405914(4.240591)−4.91254−1=4.0166214.1041574(4.104157)−4.2405914−1=4.058679
↓
(h2)O(h4)O(h6)O(h8)6.3754.91254.4254.2405914.01662142(4.016621)−4.42542−1=3.9893964.1041574.05867942(4.058679)−4.01662142−1=4.061483
↓
(h2)O(h4)O(h6)O(h8)6.3754.91254.4254.2405914.0166213.9893964.1041574.0586794.06148343(4.061483)−3.98939643−1=4.062627
↓
(h2)O(h4)O(h6)O(h8)6.3754.91254.4254.2405914.0166213.9893964.1041574.0586794.0614834.062627
∴∫30f(x)dx≈4.062627
Gaussian Quadrature
Using the properties of Lengendre polynomial, the results are shown below:
ntiwiDegree10212±√13133±√35,059,8954±√(3−2√65)7,±√(3+2√65)718+√3036,18−√3036750,±13√5−2√107,±13√5+2√107128255,322+13√70900,322−13√709009
and apply the following formula:
∫baf(x)dx=b−a2∫1−1f((b−a)t+(b+a)2)≈b−a2n∑i=1wif((b−a)ti+(b+a)2)
Use Gaussian Quadrature to find the approximation of ∫2−2x3exdx
Note: f((b−a)t+(b+a)2)=f((2−(−2))t+(2−2)2)=f(4t+02)=f(2t)
n=1,
∫2−2x3exdx=2−(−2)2∫1−1f(2t)dt=42[2⋅f(2⋅0)]=0
n=2,
∫2−2x3exdx=2−(−2)2∫1−1f(2t)dt=42[1⋅f(2⋅(−√13))+1⋅f(2⋅√13)]=8.800116
n=3,
∫2−2x3exdx=2−(−2)2∫1−1f(2t)dt=42[59(f(2⋅√35)+f(2⋅(−√35)))+89f(0)]=18.570706
n=4,
∫2−2x3exdx=2−(−2)2∫1−1f(2t)dt=42[18+√3036(f(2⋅√3−2√657)+f(2⋅(−√3−2√657)))+18−√3036(f(2⋅√3+2√657)+f(2⋅(−√3+2√657)))]=19.859939
n=5,
∫2−2x3exdx=2−(−2)2∫1−1f(2t)dt=42[128255f(2⋅0)+322+13√70900(f(2⋅13√5−2√107)+f(2⋅(−13√5−2√107)))+322−13√70900(f(2⋅33√5+2√107)+f(2⋅(−13√5+2√107)))]=19.919469
h3−020=3R1,1(3)2[f(0)+f(3)]=6.3753−021=32R1,2(32)2[f(0)+2f(32)+f(3)]=4.91253−022=34R1,3(34)2[f(0)+2(f(34)+f(32)+f(94))+f(3)]=4.2405913−023=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.3754−1=4.4254.2405914(4.240591)−4.91254−1=4.0166214.1041574(4.104157)−4.2405914−1=4.058679
↓
(h2)O(h4)O(h6)O(h8)6.3754.91254.4254.2405914.01662142(4.016621)−4.42542−1=3.9893964.1041574.05867942(4.058679)−4.01662142−1=4.061483
↓
(h2)O(h4)O(h6)O(h8)6.3754.91254.4254.2405914.0166213.9893964.1041574.0586794.06148343(4.061483)−3.98939643−1=4.062627
↓
(h2)O(h4)O(h6)O(h8)6.3754.91254.4254.2405914.0166213.9893964.1041574.0586794.0614834.062627
∴∫30f(x)dx≈4.062627
Gaussian Quadrature
Using the properties of Lengendre polynomial, the results are shown below:
ntiwiDegree10212±√13133±√35,059,8954±√(3−2√65)7,±√(3+2√65)718+√3036,18−√3036750,±13√5−2√107,±13√5+2√107128255,322+13√70900,322−13√709009
and apply the following formula:
∫baf(x)dx=b−a2∫1−1f((b−a)t+(b+a)2)≈b−a2n∑i=1wif((b−a)ti+(b+a)2)
Use Gaussian Quadrature to find the approximation of ∫2−2x3exdx
Note: f((b−a)t+(b+a)2)=f((2−(−2))t+(2−2)2)=f(4t+02)=f(2t)
n=1,
∫2−2x3exdx=2−(−2)2∫1−1f(2t)dt=42[2⋅f(2⋅0)]=0
n=2,
∫2−2x3exdx=2−(−2)2∫1−1f(2t)dt=42[1⋅f(2⋅(−√13))+1⋅f(2⋅√13)]=8.800116
n=3,
∫2−2x3exdx=2−(−2)2∫1−1f(2t)dt=42[59(f(2⋅√35)+f(2⋅(−√35)))+89f(0)]=18.570706
n=4,
∫2−2x3exdx=2−(−2)2∫1−1f(2t)dt=42[18+√3036(f(2⋅√3−2√657)+f(2⋅(−√3−2√657)))+18−√3036(f(2⋅√3+2√657)+f(2⋅(−√3+2√657)))]=19.859939
n=5,
∫2−2x3exdx=2−(−2)2∫1−1f(2t)dt=42[128255f(2⋅0)+322+13√70900(f(2⋅13√5−2√107)+f(2⋅(−13√5−2√107)))+322−13√70900(f(2⋅33√5+2√107)+f(2⋅(−13√5+2√107)))]=19.919469
Comments
Post a Comment