From a Differential Equation to a Numerical Step
A differential equation such as \(y'=f(t,y)\) specifies the slope of a solution at each point. If an initial value is known, the equation and initial value together form an initial-value problem. Sometimes the exact solution is difficult to find, or the immediate goal is simply to estimate the solution a short time later.
The forward Euler method makes that estimate using the slope at the starting point. It moves forward in time by a chosen step size and treats the slope as constant over that short step. The result is an approximation, not necessarily the exact solution.
Definition of the Forward Euler Update
Consider the initial-value problem \(y'=f(t,y)\), with starting data \(y(t_0)=y_0\). Choose a forward step size \(h>0\). The slope rule gives the slope \(f(t_0,y_0)\) at the starting point. The forward Euler estimate one step later is
Here, \(t_1\) is the new time and \(y_1\) is the numerical estimate of the solution at that time. The slope is evaluated at the known starting pair \((t_0,y_0)\), not at the unknown point \((t_1,y_1)\).
For repeated steps with a fixed step size, the same rule is written
The symbols \(y_n\) represent successive numerical approximations. In general, \(y_n\) need not equal the exact solution value \(y(t_n)\). The recurrence gives a procedure for generating estimates from the initial data.
Why the Update Uses the Starting Slope
At the starting point, the differential equation says that the solution has slope \(y'(t_0)=f(t_0,y_0)\). The tangent line to the solution at that point therefore has equation
To estimate the solution at the next time \(t_1=t_0+h\), evaluate this tangent line at \(t_1\):
This is exactly the forward Euler update. It is called a forward step because the new time is ahead of the starting time, and the estimate uses information available at the starting point.
Worked Examples
Worked Example: One Step for Exponential Growth
Use one forward Euler step for \(y'=y\), starting from \(t_0=0\), \(y_0=2\), with \(h=0.1\).
The slope rule is \(f(t,y)=y\). At the starting point, the slope is
The new time is
The new solution estimate is
Check by substituting the computed slope and step size into the update: \(2+(0.1)(2)=2.2\), as obtained. Thus one Euler step gives the estimate \(y_1=2.2\) at \(t_1=0.1\).
Worked Example: A Negative Slope
Use one forward Euler step for \(y'=-2y\), starting from \(t_0=1\), \(y_0=5\), with \(h=0.1\).
Here \(f(t,y)=-2y\). Evaluate it at the starting value:
The new time is \(t_1=1+0.1=1.1\). The solution estimate is
The negative slope produces a decrease in the estimate. Checking the update directly gives \(y_0+h f(t_0,y_0)=5+(0.1)(-10)=4\). Therefore the one-step estimate is \(y_1=4\) at \(t_1=1.1\).
Worked Example: A Nonlinear Slope Rule
Use one forward Euler step for \(y'=y^2\), starting from \(t_0=2\), \(y_0=1\), with \(h=0.2\).
The slope rule is \(f(t,y)=y^2\). At the starting point,
The new time is
Apply the update using the slope just calculated:
Check the arithmetic in the recurrence: \(y_0+h f(t_0,y_0)=1+(0.2)(1)=1.2\). The one-step Euler estimate at time \(2.2\) is \(1.2\).
Reading the Update as a Change
The update can also be viewed as a formula for the estimated change in \(y\):
This separates the roles of the quantities. The value \(f(t_0,y_0)\) is a rate of change per unit of time; \(h\) is the amount of time advanced; and their product estimates the change in the solution. Adding that change to \(y_0\) gives the next estimate.
Units provide a useful check. If \(t\) is measured in hours and \(y\) in liters, then \(f(t,y)\) has units of liters per hour. Multiplying by \(h\), measured in hours, gives liters:
Thus the Euler increment has the same units as \(y\), so it can correctly be added to the starting solution value. Units cannot detect every arithmetic error, but they can expose an incorrectly formed update.
A Common Mistake: Using the Wrong Slope
A frequent error is to evaluate the slope rule at the new estimate instead of at the known starting point. For the problem \(y'=y\), \(y_0=2\), and \(h=0.1\), the correct starting slope is \(f(0,2)=2\), so the one-step estimate is \(2+(0.1)(2)=2.2\).
An incorrect calculation might first guess the new value and then use that guessed value as the slope. For instance, using \(2.2\) as the slope gives \(2+(0.1)(2.2)=2.22\). This is not the forward Euler step: the rule requires the slope at the known point, which is \(y_0=2\). The corrected update is \(y_1=2+(0.1)(2)=2.2\).
What One Euler Step Does—and Does Not—Tell You
A single update tells you how the method estimates the solution one chosen step beyond the initial point. It does not by itself give an exact solution, nor does it establish how close the estimate is to the true solution. The estimate is based on the starting slope, while the actual slope may change during the step.
The size \(h\) is part of the method: it determines how far forward in time the update goes and how much of the starting slope is used. For a given starting point and slope rule, changing \(h\) changes both the new time and the numerical estimate. Whether a particular step is sufficiently accurate is a separate question from correctly applying the recurrence.
The central sequence of operations is short, but the order matters: identify the starting point, evaluate its slope, advance time by \(h\), and add \(h\) times the starting slope to the current solution estimate.
Check Your Understanding
For each question, apply the one-step rule carefully and keep the starting point distinct from the new estimate.
- For \(y'=3y\), with \(t_0=0\), \(y_0=1\), and \(h=0.2\), what are \(t_1\) and \(y_1\)?
- For \(y'=-y\), with \(t_0=4\), \(y_0=6\), and \(h=0.5\), calculate the starting slope and the one-step estimate.
- For \(y'=y^2\), with \(t_0=1\), \(y_0=2\), and \(h=0.1\), calculate the new time and estimate.
- In the forward Euler update, why is the slope evaluated at \((t_0,y_0)\) rather than at \((t_1,y_1)\)?
- If \(y\) is measured in meters and time in seconds, what units must \(f(t,y)\) and \(h f(t,y)\) have?