The function f is continuous on the closed interval [1,7] and has values in the table below

x f(x)
1 10
4 30
6 40
7 20

Usinf the subintervals [1,4] [4,6] [6,7] what is the trapezoidal apporx. of the integral from 1 to 7 of f(x)dx?

The answer: 160

I tried doing each interval as separate integrals and then using TRAP and then adding them but I got 180. How do I get the right answer?

1 answer

The trapezoidal approximation of the integral from 1 to 7 of f(x)dx is calculated by adding the area of the three trapezoids formed by the three subintervals. The area of each trapezoid is calculated by taking the average of the two endpoints of the interval and multiplying it by the length of the interval.

For the interval [1,4], the area of the trapezoid is (10 + 30)/2 * (4 - 1) = 80.

For the interval [4,6], the area of the trapezoid is (30 + 40)/2 * (6 - 4) = 40.

For the interval [6,7], the area of the trapezoid is (40 + 20)/2 * (7 - 6) = 40.

Adding the areas of the three trapezoids gives a total of 160, which is the trapezoidal approximation of the integral from 1 to 7 of f(x)dx.