\section{ORDINARY DIFFERENTIAL EQUATIONS} Consider the initial value problem $$\eqalign{y'(x)&=f(x,y(x)),\quad a\le x\le b,\cr y(a)&=A,\cr}\eqno(1)$$ where $f(x,y)$ is continuous for $a\le x\le b$ and all $y$. There does not necessarily exist a unique solution $y(x)$ throughout $[a,b]$. The problem $y'=\sqrt{|y|}$, $y(0)=0$, $0\le x\le b$ has infinitely many solutions $\displaystyle y(x)=\cases{0, &$0\le x\le c$,\cr {1\over4}(x-c)^2, &$c\epsilon$, then $h$ must be reduced to $\gamma h$ and a step of length $\gamma h$ taken from $(x_n,y_n)$. If a step of length $\gamma h$ were used, the local error would be given by $$\hbox{local error }=(\gamma h)^5\tau_0+{\cal O}(h^6)=\gamma^5h\hbox{ est }+{\cal O}(h^6)$$ for some constant $\tau_0$. Now the step should be as large as possible, so local error $\approx \gamma h\epsilon$. Therefore $\displaystyle \gamma h\epsilon\approx \gamma^5h\hbox{ est }\Rightarrow \gamma=\left({\epsilon\over\hbox{ est}}\right)^{1/4}$. This is the ``optimal'' $\gamma$. Rejecting a step is costly, so in practice the conservative step $.8\gamma h$ is used. In summary, starting from $(x_n,y_n)$: \item{1)} Take a step of length $h$, and compute the estimate est of the local error relative to $h$. \item{2)} Compute $\displaystyle \gamma=\left({\epsilon\over est}\right)^{1/4}$, replace $h$ by $.8\gamma h$. \item{3)} If $|\hbox{est}|\le\epsilon$, accept $y_{n+1}$ and continue from $(x_{n+1},y_{n+1})$. \item{4)} If $|\hbox{est}|>\epsilon$, reject $y_{n+1}$ and continue from $(x_n,y_n)$. Other practical considerations are that $h$ should never exceed some maximum step size, nor be smaller than the floating point granularity at $x_n$, nor be permitted to increase or decrease by more than some fixed factors. The maximum step size limit prevents stepping over sudden changes in the solution, and the increase/decrease factors mollify ``chattering.''