# Other Methods for Numerical Integration

I know four common methods for numerical integration of signals such as Midpoint, Trapezoid, Simpson's rule, and FFT integration property. Are there other methods?

• Even basic Euler can have higher than double precision given enough sampling rate. What exactly are you interested in? For example, trapezoidal is used in SPICE engines and it's only limited to the *tol parameters -- which can be used with arbitrary precision, if you have enough coffee. Nov 10, 2022 at 13:29
• Sounds to me you should be fine with the ones you've already mentioned but, you know better the precise context of what you need. I'll just say that, if this is part of a loop (e.g. dynamic) then even simple Euler will suffice (simple number crunching for the uC + the loop will compensate), and if it's offline, even a bilinear will do remarkably well for sampling 10x or better. Nov 10, 2022 at 13:40
• If you're integrating acceleration to get displacement, then a better integration method won't save you. The noise and measurement error of the acceleration is already enough to make the problem unfeasible and the uncertainty of the initial conditions is adding a lot on top. You can easily estimate the accumulated error with time and then understand that any reasonable medium to long term displacement predictions are impossible without support from other sensors. Nov 10, 2022 at 14:28
• @YazanAlatoom that's really the point here: you want to calculate some theoretical function on all the previous signal, call it "Integral". But how well that function gets approximated by your actual numerical method is a question that needs a precise definition of "well". You write "accuracy"; but accurate / true to what "true value"? This depends on what you're trying to integrate, for what purpose. So Jdip asking to clarify whether you're integrating acceleration to get displacement or integrating displacement (which I agree makes little sense) is necessary. Nov 10, 2022 at 18:51
• "I am trying to integrate displacement from acceleration data." so, you want to integrate acceleration data? Nov 10, 2022 at 19:27

Forward Euler method:

$$y(n) = y(n-1) + K*[t(n) - t(n-1)]*u(n-1)$$

Backward Euler method:

$$y(n) = y(n-1) + K*[t(n) - t(n-1)]*u(n)$$

Trapezoidal method:

$$y(n) = y(n-1) + K*[t(n)-t(n-1)]*[u(n)+u(n-1)]/2$$

• Thanks a lot... Nov 10, 2022 at 19:55