SplineIntegrate.txt The indefinite integral of y = a x^3 + b x^2 + c x + d is inty(x) = a/4 x^4 + b/3 x^3 + c/2 x^2 + d x The definite integral from x=xa to x = xb is inty(xb) - inty(xa) Given the Spline fit coefficients ai, bi, ci, di i=1..n-1 Case 1 The x values are equally spaced and xa=x1 and xb=xn h = xi+1 - xi integral = h^4/4 sum(ai) + h^3/3 sum(bi) + h^2/2 sum(ci) + h sum(di) where sum is i=1..n-1 Case 2 The x values are not equally spaced. hi = xi+1 - xi integral = sum(hi^4/4 ai + hi^3/3 bi + hi^2/2 ci + hi di) where sum is i=1..n-1 Use Horner's method to evaluate polynomials