From a Current Value to a New Estimate
A differential equation gives a rate of change. For an initial-value problem, that rate is specified by an equation such as \(y'=f(x,y)\), together with a known value of the solution at a particular input. The equation tells us how the solution is changing at a point, but it does not usually give the solution value at every later input by direct calculation.
The forward Euler method uses the derivative at a known point to estimate the solution at a nearby, larger value of the independent variable. Its update has two parts: first move the independent variable forward; then use the current derivative to estimate the corresponding change in the solution.
The subscript \(n\) labels the current step; it does not mean that \(y_n\) is the exact solution value. The method uses the differential equation to find the current slope \(f(x_n,y_n)\), then multiplies that slope by the step size. The resulting change is added to the current solution estimate.
Reading the Update Correctly
The first equation, \(x_{n+1}=x_n+h\), advances the independent variable. Because \(h>0\), this is a forward step. The second equation advances the solution estimate. It can also be written as
This form emphasizes the central calculation: change in the approximate solution = step size times current derivative. If the derivative is positive, the update increases the solution value; if it is negative, the update decreases it. If the derivative is zero at the current point, this step leaves the solution estimate unchanged.
The point used to evaluate the derivative is important. The method uses \(f(x_n,y_n)\), the derivative at the known current point. It does not use \(f(x_{n+1},y_{n+1})\), because those are the values being estimated. Evaluating the derivative at the new point would define a different update rule and would require the unknown new solution value.
Units provide a useful check. If \(x\) is measured in seconds and \(y\) in grams, then \(dy/dx\) has units of grams per second. Multiplying the derivative by a step measured in seconds gives grams, the units of a change in \(y\). Thus it can be added to the current value of \(y\).
Why the Formula Is Reasonable
At a point where the solution is differentiable, its derivative describes its instantaneous rate of change. Over a short interval of length \(h\), the forward Euler method estimates the change by using that current rate throughout the interval. The estimate is \(h f(x_n,y_n)\).
The reason this calculation is internally consistent is exact: the straight segment from \((x_n,y_n)\) to the updated point has slope equal to the derivative at the current point. Indeed, the update gives \(x_{n+1}-x_n=h\) and \(y_{n+1}-y_n=h f(x_n,y_n)\), so
Thus the step moves forward by \(h\) while using the current slope as the estimated rate across that step. The calculation does not claim that the actual derivative remains constant over the interval. If the rate changes, the exact solution may end the step above or below the Euler estimate. The update is a numerical approximation, not a guarantee of an exact solution value.
Worked Examples
Worked Example: A Decreasing Slope at the Current Point
Suppose \(y'=2x-y\), and the current point is \(x_n=1\), \(y_n=3\). Take \(h=0.2\). First evaluate the derivative at the current point:
Advance the independent variable:
Now update the solution estimate using the current derivative:
The Euler estimate at \(x=1.2\) is \(2.8\). Check the step by calculating its slope:
This agrees with the derivative \(2(1)-3=-1\) at the current point. The check confirms that the update used the given current slope correctly.
Worked Example: A Decay Rate
Suppose an amount \(y\), measured in milligrams, satisfies \(y'=-0.4y\), where time \(x\) is measured in hours. At the current time \(x_n=2\), the amount is \(y_n=10\) milligrams. Take a step of \(h=0.5\) hours. The current derivative is
Advance time by half an hour:
The estimated change in amount is the rate multiplied by the time step:
Therefore the updated estimate is
Check the arithmetic using the original update: \(10+(0.5)(-0.4)(10)=10-2=8\). The change is negative, as expected for the negative rate, and its units are milligrams.
Worked Example: A Positive Current Derivative
Suppose \(y'=x+y\), with current values \(x_n=0\) and \(y_n=1\), and choose \(h=0.25\). Evaluate the derivative at the current point:
The next independent-variable value is
The solution estimate becomes
To check the update, calculate the slope of the segment between the two points:
The differential equation gives \(f(0,1)=1\) at the current point, so the updated value is consistent with the current slope.
A Common Error: Using the Wrong Slope
A common mistake is to evaluate the derivative at the new independent-variable value while keeping the old solution value. For example, in the first worked example, someone might write
and then calculate \(3+(0.2)(-0.6)=2.88\). This is not the forward Euler update from \((1,3)\). It uses a slope evaluated at \(x=1.2\), rather than the required current slope \(f(1,3)=-1\). The correct calculation is
The rule is simple: identify the current point first, evaluate the derivative there, and only then apply the update. Do not substitute a new value for an input that the method requires to remain at its current value.
Applying the Rule Repeatedly
After one update, the newly estimated point can serve as the current point for another update. For each step, use the differential equation at the current estimated point, calculate its derivative, and add the derivative multiplied by the step size. The result of one step becomes the input value for the next.
With a fixed step size \(h\), this repeated calculation is expressed by the same pair of formulas at each step:
At every update, the subscripted values are the current numerical inputs. Even if the initial value is exact, later \(y_n\) values are generally estimates. It is useful to keep that distinction explicit when reporting results.
Summary
The forward Euler update advances the independent variable by \(h\) and estimates the solution change as \(h\) times the derivative at the current point. Its essential formulas are
To use them reliably, evaluate \(f\) at \((x_n,y_n)\), keep track of the sign and units, and label the new solution value as an estimate. A final check is to divide the estimated change in \(y\) by the change in \(x\); the result should equal the derivative used for that step.
Check Your Understanding
For each question, identify the current point and use the current derivative in the update.
- If \(y'=3x+y\), \(x_n=1\), \(y_n=2\), and \(h=0.1\), what are \(x_{n+1}\) and \(y_{n+1}\)?
- If \(y'=-2y\), \(y_n=4\), and \(h=0.25\), what is the Euler estimate for the next \(y\)-value?
- Why must the derivative in the forward Euler formula be evaluated at \((x_n,y_n)\)?
- If \(y_n\) is measured in metres and \(x\) in seconds, what are the units of \(f(x_n,y_n)\) and of \(h f(x_n,y_n)\)?
- For an update with \(h=0.4\), \(y_n=5\), and \(f(x_n,y_n)=2\), verify the next value by checking the slope of the step.