# Will the numerical solving of the differential equation be wrong if I take the step too small? [closed]

If I take the step too large I will get error, while if I take the step too small I also get an error. In my case, instead of seeing the function decreasing, i have it increasing if I take the step too small.

• It is very difficult to answer with such few details. Please consider improving your post by at least writing the PDE you are dealing with as well as the numerical scheme. – Coriolis Oct 14 '16 at 11:06

As you can see above, where I used a second order central difference approximation, the error for derivative step sizes between $1$ and $10^{-5}$ produce the expected second order convergence rate. However, past that span of step sizes, the error starts to grow.
• It's a little curious that the approximation starts to fail around $10^{-5}$, are you using single precision? It is also worth noting that some derivative approximations are more sensitive to mesh spacing when it is sufficiently small. Spectral methods are a good example of this, where the condition number of the derivative operator grows as $10^{2p}$ where $p$ is the order of the derivative. – Spencer Bryngelson Oct 14 '16 at 23:59
• @SpencerBryngelson $h^2+\epsilon h^{-1}$ is minimized at $h\sim \epsilon^{1/3}$, so a minimized error at $h\approx 10^{-5}$ makes sense for double-precision arithmetic with $\epsilon\approx 10^{-16}$. – Kirill Oct 15 '16 at 17:15