Solution (source code)

= Solution

\b[Yes.] The Euler recurrence is
$$
y_{n+1}=y_n-h\operatorname{sign}(y_n).
$$
Write $y_0=mh+r$, where $m=\lfloor y_0/h\rfloor$ and $0\leq r<h$. For $n\leq m$, the numerical values agree with the exact linear descent. If $r=0$, the method reaches zero and stays there. If $0<r<h$, then
$$
y_m=r,\qquad y_{m+1}=r-h,
$$
and the recurrence thereafter alternates between $r$ and $r-h$. The exact solution is then zero, while both numerical values have magnitude at most $h$. Thus, uniformly for $0\leq n\leq N$,
$$
|y_n-y(nh)|\leq h=O(h).
$$
This is the <explicit Euler method for the sign-decay equation>.