User:De lune/sandbox

$$ \sum_{i=1}^{n-1} \left( \frac{f(\frac{b-a}{n}i+a) + f(\frac{b-a}{n}(i+1)+a) }{2} \frac{b-a}{n}\right) $$