Answer:
1.1061427
Correct Value (Using calculator) = 0.927007
Explanation:
b=5, a=1, n=8,
h=(b-a)/n=(5-1)/8=0.5
f(x) = 5*cos(4x)/x
The sub-intervals are,
[1, 1.5], [1.5, 2], [2, 2.5], [2.5, 3], [3, 3.5], [3.5, 4], [4, 4.5], [4.5, 5]
Let the integral be denoted by I.
a) From Trapezoidal Rule:
I = [h/2] { f(x0) + 2f(x1) + 2f(x2) + 2f(x3) + 2f(x4) + 2f(x5) + 2(x6) + 2f(x7) + f(x8) }
= [0.5 / 2] { f(1) + 2f(1.5) + 2f(2) + 2f(2.5) + 2f(3) + 2f(3.5) + 2f(4) + 2f(4.5) + f(5) }
= [0.25] { -3.2682 + 2*3.2005 + 2*-0.36375 + 2*-1.6781 + 2*1.4064 + 2*0.19533 + 2*-1.1970 + 2*0.7336 + 0.40808}
= 0.433489
b) From Midpoint Rule:
Values are calculated at midpoint of each interval
I = [h] { f(x1*) + f(x2*) + f(x3*) + f(x4*) + f(x5*) + (x6*) + f(x7*) + f(x8*) }
= [0.5] { f(1.25) + f(1.75) + f(2.25) + f(2.75) + f(3.25) + f(3.75) + f(4.25) + f(4.75) }
= 1.186071
c) Simpson's Rule:
I = [h/3] { f(x0) + 4f(x1) + 2f(x2) + 4f(x3) + 2f(x4) + 4f(x5) + 2(x6) + 4f(x7) + f(x8) }
= [0.5 / 3] { f(1) + 4f(1.5) + 2f(2) + 4f(2.5) + 2f(3) + 4f(3.5) + 2f(4) + 4f(4.5) + f(5) }
= [0.25] { -3.2682 + 4*3.2005 + 2*-0.36375 + 4*-1.6781 + 2*1.4064 + 4*0.19533 + 2*-1.1970 + 4*0.7336 + 0.40808}
= 1.1061427
Correct Value (Using calculator) = 0.927007