This works for me exactly as you have listed it! This is the output:
Function for which integration have to do f(v)=
@(v)(5000.*v)./(8.276.*v.^2+2000)
Upper and lower limit of integration [0.00 10.00]
Exact integral for given function is 104.604010
Integral using Trapizoidal method
The value of integral from a=0.000000 to b=10.000000
using 1 equally spaced divisions is : 88.414202857547053
Relative percent Error in trapizoidal rule for n=1 is 15.477234
Integral using Simpson 1/3 method
The value of integral from a=0.000000 to b=10.000000
using 1 equally spaced divisions is : 58.942801905031367
Relative percent Error in Simpson 1/3 rule for n=1 is 43.651489
Integral using Simpson 3/8 method
The value of integral from a=0.000000 to b=10.000000
using 1 equally spaced divisions is : 66.310652143160283
Relative percent Error in Simpson 3/8 rule for n=1 is 36.607925
Integral using Trapizoidal method
The value of integral from a=0.000000 to b=10.000000
using 20 equally spaced divisions is : 104.567194078904976
Relative percent Error in trapizoidal rule for n=20 is 0.035196
Integral using Simpson 1/3 method
The value of integral from a=0.000000 to b=10.000000
using 20 equally spaced divisions is : 104.604038713787162
Relative percent Error in Simpson 1/3 rule for n=20 is 0.000027
Integral using Simpson 3/8 method
The value of integral from a=0.000000 to b=10.000000
using 21 equally spaced divisions is : 104.604063246835111
Relative percent Error in Simpson 3/8 rule for n=21 is 0.000051
Best Answer