I have a logarithmic grid, upon which i have two functions that are similar to this one (this is only the last 100 points):
These are essentially very similar to a Sin function at this point. I need to take the integral of two of these functions multiplied together, along with the position:
$$ \int_0^R f_1(r)\; r\; f_2(r)\; dr $$
Unfortunately, this gives me functions similar to the following:
I need to integrate these with high accuracy, but I'm not sure how to do it. There are a few options that I know of, but I expect there are more that I'm not sure of:
I can interpolate the original functions (is cubic interpolation a good interpolation strategy for sinusoids and products of sinusoids?), then multiply the interpolated functions together at specific points and use something from this scicomp post
I can switch the order of the interpolation and multiplication, multiplying the values I have, then taking the interpolation.
I can do a simpler Simpsons rule approximation, though I'm not sure how to do such a thing on a non-uniform grid.