Integration method

Hello everyone

Is the integration routine a secret, or are there hints (or even availability) to the user? I’m trying to make a simple RC lowpass with a C-block and, while backward Euler works, it’s only close, not exact (not really surprising). Simpson’s rule seems to yield the same errors, and I suspect it’s because the midpoint is calculated based on the past sample, not the current one (together with the implicit of the future one). I know the samples are not equidistant, but I still lack “foresight”. Before trying everything, I figured it’s safer to ask first.

Vlad