Changed the simpson's rule function.