I think Euler's Method is a great way to simulate ODE:s. It's not the most accurate, but it's the fastest and simplest.
Euler's Method is usually used with fixed step size, where $k$ is the step size larger than $0$ and $\dot x = f(x,u)$ is our ODE function.
To simulate forward Euler, just iterate this equation:
$$x_{i+1} = x_i + k f(x_i, u)$$
To improve stability for Euler's method, then the step size $k$ needs to be adaptive. The smaller choice of the step $k$, the more stability is guaranteed, but the less accurate the simulation will become. Instead, the adaptive method for the step size is often used to find the best $k$.
Question:
I can I improve stability for Euler's method by implementing adaptive step size?
Best Answer
You will need a second order method to compute the error estimate. You can use any of \begin{array}{c|cc} 0&\\ c&c\\ \hline &1-\frac1{2c}&\frac1{2c} \end{array} The Heun method, $c=1$, has the advantage that one can re-use the second slope as the first slope in the next step.
In the comments the question for a variable-step Heun method came up. I cited the third-order methods in Butcher: "Low-order methods", slide 26, as any explicit 3rd order method contains second order method in its first two stages. In Feldman: "Variable step size methods" you can find several tested low-order embedded methods. For instance one based on Heun's method attributed to Fehlberg that probably started him to search for higher order embedded methods \begin{array}{c|ccc} 0&\\ 1&1\\ \frac12&\frac14&\frac14\\ \hline &\frac16&\frac16&\frac46 \end{array} This computes from the Heun data of the first two stages the point and derivative at the midpoint of the interval. Then applying the Simpson rule to these approximations results in an order 3 approximation.