The usual trapezoidal approximation for a definite integral is:Originally Posted by frozenflames
$\displaystyle
\int_a^b f(x)\ dx=\frac{h}{2} (y_0 + 2y_1+2y_2+...+2y_{n-1}+y_n)
$
but your data don't have a fixed tabulation interval so we need an alternate
definition of the trapezoidal approximation, which is:
$\displaystyle
\int_a^b f(x)\ dx=\sum_1^{n-1}\ (x_{i+1}-x_i)(f(x_{i+1})+f(x_i))/2
$,
which in this case is:
$\displaystyle
\int_a^b f(x)\ dx=3\times 20+2 \times 35 + 1 \times 30 = 160
$
RonL