I try to solve a system of coupled equations, where a very nasty division operation occurs. In fact, I need to compute a derivative of two exponential decaying functions. Let's illustrate this with the following example which can easily computed in an analytical way. Assume we have given the function $$f(z) = e^{-2z^2}$$ and compute the quotient $$ \frac{\partial_z f(z)}{f(z)} = \frac{-4 z e^{-2z^2}}{e^{-2z^2}} = -4 z . $$ I'm considering a symmetric interval around $0$ and I only have given the function $f$, so I need to compute its derivate $\partial_z f$ (so far I use spectral methods to do this, but I also tried other methods without any significant difference). At some magnitude of $|z|$ the rounding errors during the computation of the derivate $\partial_z f(z)$ become comparable to the function values of $f(z)$ and the quotient does not longer represent any meaningful.
In order to get rid of the "error noise" in my numerical solution I tried to work with low pass filters. Since I know which characteristic the solution should have I divided the singal in to parts, the left(this one reversed) and rigth one and it tunred out it work not as expected. The higher oscillatory frequencies are damped pretty well according to the order of the filter, but unforunatly the filtered signal is averaged around zero on the ouside and in the middle (where the sperated left and right part are glued togehter) the function has a big plateu where it is zero. Which in total causes the approximation is not even close to adequate.
Currently i don't see any other option to perfrom this computation numericaly, why I decided to ask this question here. Maybe there is a standart ansatz to solve problems like this, which I don't have heared from so far. I would be very thankful for your input what I could try else.
Cheers