MATH 4810 Computational Modelling

Module 02 · Unit 2.1

One-Step Numerical Methods

Turn a continuous initial-value problem into a stepping rule. Develop Euler, modified Euler, and midpoint methods, and learn the error analysis that distinguishes them.

3 lessons ≈ 8 hours Laboratory 3 Feeds Assignment 2
  1. Unit 2.1
  2. Unit 2.2

§ Overview

An initial-value problem specifies a rate of change and a starting condition. In most applied settings, the rate of change cannot be integrated analytically. Numerical methods replace the continuous problem with a discrete one: choose a step size, evaluate the derivative at the current point, and take a step. This unit develops the family of one-step methods and the error analysis that determines which is appropriate for a given problem.

The unit begins with Euler's method, the simplest one-step rule. It then introduces second-order corrections — modified Euler and midpoint — and closes with the analysis of local and global truncation error that determines convergence order.

Lesson 1

Discretization and Euler's method

Lesson 2

Modified Euler and midpoint methods

Lesson 3

Local and global error

Laboratory 3

Euler and modified Euler methods

§ Learning outcomes

By the end of Unit 2.1 you will be able to

  • Discretize an initial-value problem and state the resulting stepping rule.
  • Implement Euler, modified Euler, and midpoint methods in a spreadsheet.
  • Analyze local truncation error and derive the order of a one-step method.
  • Distinguish local from global error and explain the relationship between them.
  • Estimate the order of convergence numerically from a convergence study.
  • Compare one-step methods by their accuracy, cost, and stability properties.

§ Lessons

The three lessons build cumulatively. Lesson 1 establishes the framework and the first method; Lesson 2 introduces second-order corrections; Lesson 3 develops the error analysis that explains why higher-order methods are worth the extra cost.

§ The one-step framework

All one-step methods share the same structure. Given an initial-value problem

dy/dt = f(t, y),    y(t₀) = y₀

a one-step method approximates the solution on a grid t₀ < t₁ < … < tₙ by a rule of the form

y_{n+1} = y_n + h · Φ(t_n, y_n, h)

where h = t_{n+1} − t_n is the step size and Φ is the increment function. The name of the method determines Φ:

Increment functions for the methods in this unit
Method Increment function Φ Order
Forward Euler f(t_n, y_n) 1
Modified Euler (Heun) ½ [ f(t_n, y_n) + f(t_{n+1}, y_n + h f(t_n, y_n)) ] 2
Midpoint f( t_n + h/2, y_n + (h/2) f(t_n, y_n) ) 2
Fourth-order Runge–Kutta (see Unit 2.2) 4
Geometry of Euler's method A curve representing the true solution y(t). At a point (t_n, y_n) on the curve, a straight line is drawn with slope f(t_n, y_n), the derivative of the solution. This line is followed for a horizontal distance h, reaching the point (t_{n+1}, y_{n+1}). The true solution at t_{n+1} lies above the Euler point, illustrating that Euler's method systematically underestimates a convex solution. t y t₀ t₁ t₂ y₀ y₁ (Euler) y(t₁) true solution y(t) Euler approximation
Figure 2.1. Geometry of Euler's method. The method follows the tangent line at each step. For a convex solution, it systematically underestimates the true value at the next grid point.

Reading the framework

The difference between one-step methods lies entirely in the increment function Φ. Euler evaluates f once per step; modified Euler and midpoint each evaluate it twice. The extra evaluation buys an additional order of accuracy. This tradeoff — evaluations per step versus order of accuracy — is the central theme of the module.

§ Error analysis

Two distinct errors arise in one-step methods, and conflating them is one of the most common sources of confusion in numerical work.

Local truncation error
The error introduced in a single step, assuming the method starts from the exact solution. Denoted τ_n, it scales as O(hp+1) for a method of order p.
Global error
The accumulated difference between the numerical and exact solutions at a fixed time t, after many steps. It scales as O(hp) for a method of order p.
Order of a method
The exponent p appearing in the global error scaling. Euler has order 1; modified Euler and midpoint have order 2; classical Runge–Kutta has order 4.
Convergence study
A numerical experiment that estimates the observed order of a method by running it at successively smaller step sizes and measuring how the error decreases.

Observing order numerically

If a method has order p, halving the step size should reduce the global error by a factor of approximately 2p. A method of order 1 halves the error; order 2 quarters it; order 4 reduces it sixteenfold. This is the standard numerical check on the derivation.

§ Key terms

Initial-value problem (IVP)
A differential equation together with the value of the solution at a single starting point. Written as dy/dt = f(t, y), y(t₀) = y₀.
Grid and step size
The set of points t₀, t₁, … at which the solution is approximated, and the spacing h between consecutive points.
Increment function
The function Φ(t, y, h) that defines how the solution advances from one grid point to the next.
Consistency
A property of a method: as h → 0, the increment function reduces to the exact derivative. All methods discussed here are consistent.
Stability
A property of a method applied to a particular problem: small perturbations in the initial data do not grow without bound as the integration proceeds.
Convergence
The property that the global error tends to zero as h tends to zero. For consistent, stable methods, convergence follows.

§ Self-check

Check your understanding

Question 1

The increment function for the forward Euler method is:

Show answer

f(t_n, y_n). Forward Euler uses the derivative at the current point, taken as constant across the step. The other options correspond to implicit Euler, modified Euler, and midpoint respectively.

Question 2

Halving the step size of a method with global order p = 2 typically reduces the global error by a factor of approximately:

Show answer

4. Global error scales as O(hp), so halving h reduces the error by a factor of 2p = 4 for p = 2. The factor 2 would correspond to p = 1, and 16 to p = 4.

Question 3

The local truncation error of a method of order p scales as:

Show answer

O(hp+1). Local error is one order higher than global error. Over O(1/h) steps, the local errors accumulate to give a global error of O(hp).

👤