As a concrete example, suppose that our problem is
\begin{equation*}
y(0)=e^{-2},\ y'=8(1-2t)y,\ \varepsilon=0.1
\end{equation*}
and that we have gotten as far as
\begin{equation*}
t_n=0.33,\ y_n=0.75,\ \ \text{trial }h=0.094
\end{equation*}
Then, using \(E=|A_{1,n+1}-A_{2,n+1}|\) to denote the magnitude of the estimated local truncation error in \(A_{2,n+1}\) and \(r\) the corresponding error rate
\begin{align*}
f(t_n,y_n)&=8(1-2\times 0.33) 0.75=2.04 \\
A_{1,n+1}&=y_n+hf(t_n,y_n)=0.75+0.094\times 2.04=0.942 \\
y_{\rm mid}&=y_n+\tfrac{h}{2}f(t_n,y_n)
=0.75+\tfrac{0.094}{2}\times 2.04=0.846 \\
f\big(t_n+\tfrac{h}{2},y_{\rm mid}\big)
&=8\Big[1-2\big(0.33+\tfrac{0.094}{2}\big)\Big]0.846=1.66 \\
A_{2,n+1}&=y_{\rm mid}+\tfrac{h}{2}f(t_n+\tfrac{h}{2},y_{\rm mid})
=0.846+\tfrac{0.094}{2}1.66=0.924\\
E&=|A_{1,n+1}-A_{2,n+1}|=|0.942-0.924|=0.018\\
r&=\frac{|E|}{h}=\frac{0.018}{0.094}=0.19
\end{align*}
Since \(r=0.19>\varepsilon=0.1\,\text{,}\) the current step size is unacceptable and we have to recompute with the new step size
\begin{equation*}
\text{new } h=0.9\frac{\varepsilon}{r}(\text{old }h)
=0.9\ \frac{0.1}{0.19}\ 0.094
=0.045
\end{equation*}
to give
\begin{align*}
f(t_n,y_n)&=8(1-2\times0.33)0.75=2.04 \\
A_{1,n+1}&=y_n+hf(t_n,y_n)=0.75+0.045\times 2.04=0.842 \\
y_{\rm mid}&=y_n+\tfrac{h}{2}f(t_n,y_n)
=0.75+\tfrac{0.045}{2}\times 2.04=0.796 \\
f\big(t_n+\tfrac{h}{2},y_{\rm mid}\big)
&=8\Big[1-2\big(0.33+\tfrac{0.045}{2}\big)\Big]0.796=1.88 \\
A_{2,n+1}&=y_{\text{mid}}
+\tfrac{h}{2}f(t_n +\tfrac{h}{2},y_{\rm mid})
=0.796+\tfrac{0.045}{2}1.88
=0.838 \\
E&=A_{1.n+1}-A_{2.n+1}=0.842-0.838=0.004 \\
r&=\frac{|E|}{h}=\frac{0.004}{0.045}=0.09
\end{align*}
This time \(\,r=0.09\lt \varepsilon=0.1\,\text{,}\) is acceptable so we set \(t_{n+1}=0.33+0.045=0.375\) and
\begin{equation*}
y_{n+1}=A_{2,n+1}=0.838
\end{equation*}
The initial trial step size from \(t_{n+1}\) to \(t_{n+2}\) is
\begin{equation*}
\text{new }h = 0.9\frac{\varepsilon}{r}(\text{old }h)
=0.9\,\frac{0.1}{0.09}\,.045=.045
\end{equation*}
By a fluke, it has turned out that the new \(h\) is the same as the old \(h\) (to three decimal places). If \(r\) had been significantly smaller than \(\varepsilon\text{,}\) then the new \(h\) would have been signficantly bigger than the old \(h\) - indicating that it is (relatively) easy to estimate things in this region, making a larger step size sufficient.