Question - Your task is to write a function that compute a definite integral, namely,
a∫bf(x)dx
where f is an arbitrary continuous unary function. Naturally, you should provide a numerical solution using a simple method such as the trapezoidal method over a collection of boxes that sub-divide the integration interval [a, b]. Formally, given f, a, b and n, subdivide the range [a, b] into n sub-intervals (of which (b-a)/n) and compute the integral as the sum of the surfaces of the trapezoid embedded in each sub-interval.