# Trapezoidal rule

The trapezoidal rule is given by the following formula: $\int_{a}^{b}f(x) \approx \frac{b-a}{2}[f(a)+2\sum_{i=1}^{n-1}f(x_i)+f(b)]$

I have been given a question which wants me to evaluate the trapezoidal rule for two points, does this mean I evaluate the above equation for n=0 or n=2 ?

It means $$\int_a^b f(x)dx=\frac{b-a}{2}\left[f(a)+f(b)\right]$$