Added functions for Trapezoidal and Simpson's rule