Section8.2Thinking in Steps: How Euler’s Method Works One Step at a Time
Now that we understand the difference between analytic and numerical solutions, we’re ready to explore one of the most fundamental numerical methods: Euler’s method. But before we dive into the full algorithm, we need to understand the core idea that powers it—the concept of iteration.
This shift towards numerical approximation is not merely a workaround but a powerful approach that expands our capacity to solve differential equations arising in complex systems for which exact solutions are not readily derivable. Euler’s method, as we will see, is the entry point into this expansive field of computational mathematics, demonstrating how straightforward concepts can be used to approximate solutions to complex problems.
In this section, we’ll break down Euler’s method into its simplest form: a single step. By mastering this one-step process, you’ll understand the foundation upon which the entire method is built.
That task is simple: use the information you already have to generate new information. Do it once, and you get the next step. Do it a hundred times, and you build a whole solution.
Think of following a hiking trail using only a compass—you don’t know exactly where the trail ends, but if you keep stepping in the right direction, you’ll trace the path. In Euler’s method, that “direction” is the slope from the differential equation.
More precisely, if \((t_{\text{cur}}, y_{\text{cur}})\) is a point on the solution and you know the slope there, you can predict where the next point \((t_{\text{new}}, y_{\text{new}})\) will be.
First question: “What does it mean to move in the direction of a slope?” Suppose you’re at the point \((1,1)\) and the slope there is \(\frac{3}{2}\text{.}\)
Slope is “rise over run”: for every unit you move (“run” horizontally), you move a certain amount vertically (“rise”). From \((1,1)\text{,}\) a slope of \(\frac{3}{2}\) means that for every 2 units of “run,” you rise 3 units, like so:
“Rise” doesn’t always mean “up”—if the slope is negative, “rise” is actually a fall. We’ll keep calling it “rise” for simplicity, but note that it may point downward.
Of course, there’s nothing special about using a “run” of 2. We could have used \(4\) (rise would then be 6) or even \(\pi\) (rise would be \(\frac{3}{2}\pi\)). All of the following fractions
In Euler’s method, we intentionally choose a small run called the step size, \(h\text{.}\) Therefore, for a small run \(h\text{,}\) you get the corresponding rise by:
So given a direction (slope) to move and the step size (\(h\)) to take, this formula gives you the rise. Next, we’ll see how this simple relationship is the core of Euler’s one-step move.
\begin{equation*}
\text{rise} = \text{slope} \cdot h.
\end{equation*}
This single equation captures the entire one-step task: start at the current point, compute the slope, take a step of size \(h\) in that direction, and arrive at the next point. Euler’s method is simply this step repeated many times.