Midpoint addition

Added midpoint formula to integrate.js as well as a testing function to
integrate.html