Created a class for X . Wrote methods to calculate P  and rhs. Much
easier this way. Also, implemented trapezoid rule through a method.