f(x) approximates the definite integral of a function from -1 to x using the trapezoidal rule.

