F=∫05ex+x
Trapezium rule:
∫x0xnf(x)dx=21h[y0+yn+2(y1+y2+...yn)]
Value of e = 2.718
Now:
y0=f(0)=0
y1=f(1)=2.718
y2=f(2)=6.85
y3=f(3)=9.88
y4=f(4)=12.87
y5=f(5)=15.82
Let the value of h = 1 ,then:
∫05ex+x=21[0+15.82+2(2.718+6.85+9.88+12.87)]
∫05ex+x=40.228
Simpson’s rule:
∫x0xnf(x)dx=31h[y0+4y1+2y2+4y3+2y4+...+4yn−1+yn]
Let h = 0.5 ,as n is even here so n = 10
y0=f(0)=0
y1=f(0.5)=2.066
y2=f(1)=2.718
y3=f(1.5)=5.30
y4=f(2)= 6.85
y5=f(2.5)=8.37
y6=f(3)=9.88
y7=f(3.5)=11.38
y8=f(4)=12.87
y9=f(4.5)=14.35
y10=f(5)=15.82
Putting the values in above formula:
∫05ex+x=30.5[0+4(2.066)+2(2.718)+4(5.30)+2(6.85)
4(8.317)+2(9.88)+4(11.38)+2(12.87)+4(14.35)+15.82
=41.018
Mid ordinate rule:
for n=5, h=1
∫05ex+x=h[y(0.5)+y(1.5)+y(2.5)+y(3.5)+y(4.5)]
= 1[2.066+5.30+8.37+11.38+14.35]
= 41.466
Comments