8. Trapezoid rule integration