Why Examine the Error in One Step?
A forward Euler step uses the slope at the start of an interval to estimate the solution at its end. Even if the starting value is exact, the slope usually changes during the step. The resulting difference between the Euler estimate and the exact solution is the local error in one step.
Understanding this error explains why smaller step sizes tend to improve an Euler approximation. More specifically, a Taylor expansion shows that the leading one-step error is proportional to the square of the step size. The coefficient depends on how the solution is bending at the start of the step.
Definition and Sign Convention
Consider an initial-value problem \(y'=f(t,y)\), with exact solution \(y(t)\). At time \(t_0\), suppose the starting value \(y_0=y(t_0)\) is exact. For a step size \(h>0\), the forward Euler estimate at the next time is \(y_0+h f(t_0,y_0)\).
This sign convention means that a positive error indicates that the exact value is greater than the Euler estimate, while a negative error indicates that the exact value is smaller. The error is not necessarily positive.
Deriving the Leading Error
Assume the exact solution has a continuous second derivative near \(t_0\). Taylor’s theorem gives its value after a sufficiently small step as its starting value, plus the first-derivative term, plus a second-derivative term and a remainder:
Here \(o(h^2)\) denotes a remainder whose ratio to \(h^2\) tends to zero as \(h\) tends to zero. Since \(y'(t_0)=f(t_0,y(t_0))\), the first two terms are exactly the terms used by the Euler step. Subtracting the Euler estimate leaves the second-derivative term as the leading error.
The factor \(h^2\) appears because the Euler step includes the exact solution’s first-order change but not its second-order change. If the solution is curving upward at the start, then \(y''(t_0)>0\) and the leading signed error is positive. If it is curving downward, then \(y''(t_0)<0\) and the leading signed error is negative.
Relating Curvature to the Slope Rule
The curvature can be calculated from the differential equation. For \(y'=f(t,y)\), differentiate both sides with respect to \(t\). The chain rule gives
Here \(f_t\) and \(f_y\) are partial derivatives with respect to the first and second inputs of \(f\). This formula requires those partial derivatives to exist along the solution. It shows that the curvature can come from two sources: the slope rule may change directly with time, and it may change as the solution value changes.
Evaluate \(f(t_0,y_0)\) to calculate the Euler estimate.
Use \(y''=f_t+f_y f\) at \((t_0,y_0)\), or differentiate a known exact solution twice.
Multiply the curvature by \(h^2/2\). This is the leading term, not generally the exact error.
Worked Examples
Worked Example: Exponential Growth from an Exact Starting Value
Consider \(y'=y\), \(y(0)=1\), and take one Euler step with \(h=0.1\). The exact solution is \(y(t)=e^t\): its derivative is \(e^t=y(t)\), and it satisfies \(y(0)=1\).
The starting slope is \(y'(0)=y(0)=1\). Therefore the Euler estimate is
For this equation, \(y''=y\), so \(y''(0)=1\). The leading signed error is
The exact signed error is \(e^{0.1}-1.1\). Using the Taylor expansion \(e^{0.1}=1+0.1+(0.1)^2/2+(0.1)^3/6+\cdots\), this is approximately \(0.005170918\), which is positive and close to the leading estimate \(0.005\).
Check: The exact value is approximately \(1.105170918\). Subtracting the Euler value \(1.1\) gives \(1.105170918-1.1=0.005170918\), in agreement with the signed error and its predicted positive sign.
Worked Example: A Slope Rule That Depends on Time
Consider \(y'=t+y\), \(y(0)=1\), with \(h=0.1\). At the starting point, the slope is \(f(0,1)=0+1=1\), so one Euler step gives
To find the curvature, note that \(f_t=1\) and \(f_y=1\). At \((0,1)\), \(f=1\), so
The leading signed error is therefore
For an exact check, \(y(t)=2e^t-t-1\) solves the equation: \(y'(t)=2e^t-1\), while \(t+y(t)=2e^t-1\), and \(y(0)=2-0-1=1\). At \(t=0.1\), the exact value is \(2e^{0.1}-1.1\), approximately \(1.110341836\). Subtracting the Euler estimate gives an exact signed error of approximately \(1.110341836-1.1=0.010341836\).
Check: The exact error is positive, as predicted by \(y''(0)=2>0\), and is close to the leading estimate \(0.01\).
Worked Example: A Nonlinear Slope Rule
Consider \(y'=y^2\), \(y(0)=1\), with \(h=0.2\). The Euler slope at the start is \(1^2=1\), so the Euler estimate is
Differentiate \(y'=y^2\) with respect to time. By the chain rule, \(y''=2y y'\). Since \(y'=y^2\), this becomes \(y''=2y^3\), giving \(y''(0)=2(1)^3=2\). The leading signed error is
An exact solution, valid for \(t<1\), is \(y(t)=1/(1-t)\). Indeed, \(y'(t)=1/(1-t)^2=y(t)^2\), and \(y(0)=1\). At \(t=0.2\), the exact value is \(1/(1-0.2)=1/0.8=1.25\). Thus the exact signed error is \(1.25-1.2=0.05\).
Check: The exact error is positive, consistent with \(y''(0)=2>0\). It differs from the leading estimate \(0.04\) because the leading term does not include all higher-order terms.
What the Step-Size Dependence Means
For a fixed starting point with nonzero curvature, halving a sufficiently small step changes the leading error by a factor of \(1/4\), because \((h/2)^2=h^2/4\). This compares the leading one-step terms; it does not say that an error at an arbitrary step size is exactly equal to \(\frac12 h^2y''(t_0)\).
If \(y''(t_0)=0\), the displayed leading term vanishes. The actual one-step error may still be nonzero, determined by higher-order terms. If the solution has a continuous third derivative nearby, Taylor’s theorem also gives a remainder of order \(h^3\) after the second-order term. When the second-order coefficient is zero, that third-order term or still higher terms can therefore matter.
The definition here uses the unnormalized difference between the exact endpoint and one Euler step. It isolates the error introduced by that step when its starting value is exact. It does not include inaccuracies already present in an approximate starting value or the effects of repeating many steps.
A Common Chain-Rule Pitfall
A frequent mistake is to calculate \(y''\) as \(f_y\) alone. That omits both the direct time dependence \(f_t\) and the factor \(y'=f\) multiplying \(f_y\). The correct formula is \(y''=f_t+f_y f\).
For example, with \(y'=t+y\) starting at \((0,1)\), using only \(f_y=1\) would give the incorrect curvature \(y''(0)=1\), and hence the incorrect leading error \(\frac{(0.1)^2}{2}(1)=0.005\). The correct calculation includes both terms: \(f_t=1\) and \(f_yf=(1)(1)=1\). Thus \(y''(0)=2\), and the correct leading error is \(\frac{(0.1)^2}{2}(2)=0.01\). The exact error, approximately \(0.010341836\), confirms which estimate is appropriate.
Why This Error Matters
The one-step expansion explains what Euler’s method leaves out: the solution’s curvature contributes a term of size \(h^2\) when the starting value is exact. It also explains why the sign and size of the leading error depend on the differential equation and the location on its solution, not just on the step size.
Keep the interpretation precise: the formula estimates the error from one step begun at the exact solution value. It is a local statement, and its leading term is not automatically the exact error. These distinctions make it possible to use the Taylor calculation accurately without confusing a one-step estimate with the behavior of an entire sequence of steps.
Check Your Understanding
Answer each question using the signed-error convention defined above.
- For a one-step Euler calculation, what two values are subtracted to define the signed local error?
- If \(y''(t_0)=-4\) and \(h=0.05\), what is the leading signed error?
- For \(y'=f(t,y)\), write the formula for \(y''\) in terms of \(f_t\), \(f_y\), and \(f\).
- Why is the leading error estimate not generally the exact one-step error?
- If the step size is halved, by what factor does the leading one-step error change, provided the starting curvature is fixed and nonzero?