I am solving this particular ODE:
$$ \begin{cases} u'(t)=-2\,tu^2/20, \quad t \in [0,\sqrt{20}]\\ u(0) = 1 \end{cases} $$ which the analytical solution is given: $$ u(t) = \frac{1}{1 + t^2/20}. $$
Furthermore, I am evaluating the expression at different step sizes, as such:
$$n=2^k, h=\sqrt{20}/2^k, 0 \le k \le 9$$
I then calculate the value for $u(t=\sqrt{20})$ and compare it to the value of the approximate function given by the Euler method at the same point. I expected the error to be halved at each iteration. However, surprisingly, the error at $n=2$ is in the order of $1\cdot10^{-16}$. After that, the error behaves as expected. My results are shown in the table below:
| n | u Euler | u Exact | Error | Ratio |
|---|---|---|---|---|
| 1 | 1.0 | 0.5 | 0.5 | - |
| 2 | 0.4999999999999999 | 0.5 | 1.1102230246251565e-16 | 4503599627370496.0 |
| 4 | 0.5083560943603516 | 0.5 | 0.008356094360351562 | 1.328638687821671e-14 |
| 8 | 0.5045486124686074 | 0.5 | 0.0045486124686073826 | 1.83706447142328 |
| 16 | 0.5022642864188357 | 0.5 | 0.0022642864188356926 | 2.0088503074387125 |
| 32 | 0.5011213922644928 | 0.5 | 0.0011213922644928154 | 2.0191742805179653 |
| 64 | 0.5005571541057451 | 0.5 | 0.0005571541057450835 | 2.012714710220388 |
| 128 | 0.5002775936902161 | 0.5 | 0.0002775936902160714 | 2.0070849064019067 |
| 256 | 0.5001385392778465 | 0.5 | 0.00013853927784646114 | 2.0037183283409346 |
| 512 | 0.5000692038113869 | 0.5 | 6.920381138686427e-05 | 2.0019024251713047 |
Why is this happening at $n=2$?