Hi,
I’d like to integrate a function numerically.
I found some packages, e.g., QuadGK.jl, it seems only supports numerical integration with a given function.

In my case, suppose we cannot access the function at arbitrary points.
That is, we can access only some given data points.

Suppose a change of interval is required when using the Gauss-Legendre quadrature and that it will not handle arbitrary input points, as it might be the case in OP’s question?

You can always regularize your Gaussian weights according to the geometric transformation on points, right?
I have not used the library you mentioned. Maybe it provides a straightforward solution though.

Romerg, mentioned by @rafael.guerra above, is surprisingly accurate for integrating smooth functions but it requires the values being integrated be evenly sampled over the independent variable.

You can always fall back to trapezoidal integration if the points are not evenly sampled, but it’s low accuracy.

I"m not sure how the quadrature weighting method would compare in performance and accuracy. Need to try it out.