We consider the case of an arbitrary segment $I = [a,b]$ (with $a < b$), subdivided into $n+1$ equidistant points $a_0, \ldots, a_n$:
$$\forall i \in \llbracket 0, n \rrbracket, \quad a_i = a + ih,$$
where $h = \frac{b-a}{n}$ is the step of the subdivision. The trapezoidal rule is
$$T_n(f) = \frac{b-a}{n} \sum_{i=0}^{n-1} \frac{f(a_i) + f(a_{i+1})}{2}.$$
Represent graphically $T_n(f)$.