Say I have a set of N data points. I can use the gsl library gsl\_splines.h routines to create a spline of this data. What I would like to do is to use this spline and the gsl integration library to find the integral of these data. I'm working in C here.

In my code, I have generated the splines I'd use, and since the splines are smooth, I'm judging by eye, I'd expect this method would be more efficient than evaluating the splines and using an algorithm like the trapezoid rule to find the integral, but I'm having trouble coming up with a way to piece the two things together. 

If you can provide any simple examples, I would appreciate it! 

If the gsl libraries aren't what you'd use, I'd be glad to hear any other suggestions.