Using splines to find the Area Under the Curve