Typical numerical methods are faster and way cheaper for the same level of accuracy in 1D, but it's trivial to integrate over a surface, volume, hypervolume, etc. with Monte Carlo methods.
The writer would have been well served to discuss why he chose Monte Carlo over than summing up all the small trapezoids.
At least if you can sample the relevant space reasonably accurately, otherwise it becomes really slow.