β« 1 6 x x + 1 d x = ( x + 1 ) 3 / 2 ( 3 x β 2 ) 15 β£ 1 6 = \displaystyle{\int^{6}_{1}}x\sqrt{x+1}dx=\frac{(x+1)^{3/2}(3x-2)}{15}|^6_1= β« 1 6 β x x + 1 β d x = 15 ( x + 1 ) 3/2 ( 3 x β 2 ) β β£ 1 6 β =
= ( 6 + 1 ) 3 / 2 ( 3 β
6 β 2 ) 15 β ( 1 + 1 ) 3 / 2 ( 3 β 2 ) 15 = 39.13 =\frac{(6+1)^{3/2}(3\cdot6-2)}{15}-\frac{(1+1)^{3/2}(3-2)}{15}=39.13 = 15 ( 6 + 1 ) 3/2 ( 3 β
6 β 2 ) β β 15 ( 1 + 1 ) 3/2 ( 3 β 2 ) β = 39.13
Trapezium rule:
β« x 0 x n f ( x ) d x = 1 2 h [ y 0 + y n + 2 ( y 1 + y 2 + . . . y n ) ] \displaystyle{\int^{x_n}_{x_0}}f(x)dx=\frac{1}{2}h[y_0+y_n+2(y_1+y_2+...y_n)] β« x 0 β x n β β f ( x ) d x = 2 1 β h [ y 0 β + y n β + 2 ( y 1 β + y 2 β + ... y n β )]
Let h = Ξ x = 1 s e c h=\Delta x=1\ sec h = Ξ x = 1 sec , then:
y 0 = f ( 1 ) = 2 = 1.41 y_0=f(1)=\sqrt{2}=1.41 y 0 β = f ( 1 ) = 2 β = 1.41
y 1 = f ( 2 ) = 2 3 = 3.46 y_1=f(2)=2\sqrt{3}=3.46 y 1 β = f ( 2 ) = 2 3 β = 3.46
y 2 = f ( 3 ) = 6 y_2=f(3)=6 y 2 β = f ( 3 ) = 6
y 3 = f ( 4 ) = 4 5 = 8.94 y_3=f(4)=4\sqrt{5}=8.94 y 3 β = f ( 4 ) = 4 5 β = 8.94
y 4 = f ( 5 ) = 5 6 = 12.25 y_4=f(5)=5\sqrt{6}=12.25 y 4 β = f ( 5 ) = 5 6 β = 12.25
y 5 = f ( 6 ) = 6 7 = 15.87 y_5=f(6)=6\sqrt{7}=15.87 y 5 β = f ( 6 ) = 6 7 β = 15.87
β« 1 6 x x + 1 d x = 1 2 [ 1.41 + 15.87 + 2 ( 3.46 + 6 + 8.94 + 12.25 ) ] = 39.29 \displaystyle{\int^{6}_{1}}x\sqrt{x+1}dx=\frac{1}{2}[1.41+15.87+2(3.46+6+8.94+12.25)]=39.29 β« 1 6 β x x + 1 β d x = 2 1 β [ 1.41 + 15.87 + 2 ( 3.46 + 6 + 8.94 + 12.25 )] = 39.29
Accuracy:
Ξ΅ = 39.29 β 39.13 = 0.16 \varepsilon=39.29-39.13=0.16 Ξ΅ = 39.29 β 39.13 = 0.16
Simpsonβs rule:
β« x 0 x n f ( x ) d x = 1 3 h [ y 0 + 4 y 1 + 2 y 2 + 4 y 3 + 2 y 4 + . . . + 4 y n β 1 + y n ] \displaystyle{\int^{x_n}_{x_0}}f(x)dx=\frac{1}{3}h[y_0+4y_1+2y_2+4y_3+2y_4+...+4y_{n-1}+y_n] β« x 0 β x n β β f ( x ) d x = 3 1 β h [ y 0 β + 4 y 1 β + 2 y 2 β + 4 y 3 β + 2 y 4 β + ... + 4 y n β 1 β + y n β ]
In Simpson's Rule, n must be even.
Let n=10, then:
h = 0.5 h=0.5 h = 0.5
y 0 = f ( 1 ) = 1.41 y_0=f(1)=1.41 y 0 β = f ( 1 ) = 1.41
y 1 = f ( 1.5 ) = 1.5 2.5 = 2.37 y_1=f(1.5)=1.5\sqrt{2.5}=2.37 y 1 β = f ( 1.5 ) = 1.5 2.5 β = 2.37
y 2 = f ( 2 ) = 3.46 y_2=f(2)=3.46 y 2 β = f ( 2 ) = 3.46
y 3 = f ( 2.5 ) = 2.5 3.5 = 4.68 y_3=f(2.5)=2.5\sqrt{3.5}=4.68 y 3 β = f ( 2.5 ) = 2.5 3.5 β = 4.68
y 4 = f ( 3 ) = 6 y_4=f(3)=6 y 4 β = f ( 3 ) = 6
y 5 = f ( 3.5 ) = 3.5 4.5 = 7.42 y_5=f(3.5)=3.5\sqrt{4.5}=7.42 y 5 β = f ( 3.5 ) = 3.5 4.5 β = 7.42
y 6 = f ( 4 ) = 8.94 y_6=f(4)=8.94 y 6 β = f ( 4 ) = 8.94
y 7 = f ( 4.5 ) = 4.5 5.5 = 10.55 y_7=f(4.5)=4.5\sqrt{5.5}=10.55 y 7 β = f ( 4.5 ) = 4.5 5.5 β = 10.55
y 8 = f ( 5 ) = 12.25 y_8=f(5)=12.25 y 8 β = f ( 5 ) = 12.25
y 9 = f ( 5.5 ) = 5.5 6.5 = 14.02 y_9=f(5.5)=5.5\sqrt{6.5}=14.02 y 9 β = f ( 5.5 ) = 5.5 6.5 β = 14.02
y 10 = f ( 6 ) = 15.87 y_{10}=f(6)=15.87 y 10 β = f ( 6 ) = 15.87
β« 1 6 x x + 1 d x = 0.5 3 ( 1.41 + 4 β
2.37 + 2 β
3.46 + 4 β
4.68 + 2 β
6 + \displaystyle{\int^{6}_{1}}x\sqrt{x+1}dx=\frac{0.5}{3}(1.41+4\cdot2.37+2\cdot3.46+4\cdot4.68+2\cdot6+ β« 1 6 β x x + 1 β d x = 3 0.5 β ( 1.41 + 4 β
2.37 + 2 β
3.46 + 4 β
4.68 + 2 β
6 +
+ 4 β
7.42 + 2 β
8.94 + 4 β
10.55 + 2 β
12.25 + 4 β
14.02 + 15.87 ) = 39.12 +4\cdot7.42+2\cdot8.94+4\cdot10.55+2\cdot12.25+4\cdot14.02+15.87)=39.12 + 4 β
7.42 + 2 β
8.94 + 4 β
10.55 + 2 β
12.25 + 4 β
14.02 + 15.87 ) = 39.12
Accuracy:
Ξ΅ = 39.13 β 39.12 = 0.01 \varepsilon=39.13-39.12=0.01 Ξ΅ = 39.13 β 39.12 = 0.01
Mid ordinate rule:
for n=5, h=1
β« 1 6 x x + 1 d x = h ( y ( 1.5 ) + y ( 2.5 ) + y ( 3.5 ) + y ( 4.5 ) + y ( 5.5 ) ) = \displaystyle{\int^{6}_{1}}x\sqrt{x+1}dx=h(y(1.5)+y(2.5)+y(3.5)+y(4.5)+y(5.5))= β« 1 6 β x x + 1 β d x = h ( y ( 1.5 ) + y ( 2.5 ) + y ( 3.5 ) + y ( 4.5 ) + y ( 5.5 )) =
= 2.27 + 4.68 + 7.42 + 10.55 + 14.02 = 38.94 =2.27+4.68+7.42+10.55+14.02=38.94 = 2.27 + 4.68 + 7.42 + 10.55 + 14.02 = 38.94
Accuracy:
Ξ΅ = 39.13 β 38.94 = 0.16 \varepsilon=39.13-38.94=0.16 Ξ΅ = 39.13 β 38.94 = 0.16
So, in this case, the best accuracy is for Simpsonβs rule.
Comments
Leave a comment