TeX source:
=\sum_{j=1}^{3} f\left(x_{j-1}\right)\left(x_{j}-x_{j-1}\right) \text { or } \sum_{k=0}^{2} f\left(x_{k}\right)\left(x_{k+1}-x_{k}\right)