Numerical averaging of a highly oscillatory data set.

109 Views Asked by At

I have an oscillatory data set.


enter image description here


I want to find the average value of the set some time after the initial disturbance. I've obtained the data via RK4. In the past, for more reasonable functions, I've just used a trapezoid rule integration and divided by the range of integration. But now I'm wondering if that will work on such a weird set with sharp peaks. And would it be numerically negligent of me to simply take the mean of the y-values as the average function value, why? Any other suggestions?

Looks pretty linear, should I fit a line (or parabola) through it via least squares then integrate that?

Side question: I believe, in order to preserve the accuracy of RK4, I should be using some averaging method that preserves that 4th order accuracy, right?