1
$\begingroup$

Suppose that I have a finite number of samples of the function $f(x)$ for the range $a < x < b$. I don't have the expression for $f(x)$ but I can do a cubic spline interpolation. If I want to integrate the function $f(x)$ from $x=a$ to $x=b$, would the best approach be to simply do an exact integration for each of the cubic polynomial in the cubic spline, since the error would only be from the interpolation and not from the integration?

  • 0
    If you integrate each cubic spline exactly, you do not only get an approximation of the integral over the spline, but exactly this integral. This will be a good approximation of the inegral over $f$. Simpson's rule is the easiest way to integrate a cubic exactly.2017-02-13
  • 0
    I think that it is the best we can do2017-02-13
  • 0
    @Peter Thanks. I was just wondering if it would be much more efficient to integrate straight off the cubic spline than do a separate simpson's rule integration.2017-02-13

0 Answers 0