Home / IB DP Maths 2026, 2027 & 2028 / Application and Interpretation HL / IB Mathematics AI AHL First order differential equations MAI Study Notes

IB Mathematics AI AHL First order differential equations MAI Study Notes - New Syllabus

IB Mathematics AI AHL First order differential equations MAI Study Notes

LEARNING OBJECTIVE

  • Euler’s method for finding the approximate solution to first order differential equations.

Key Concepts: 

  • Euler’s method for first order differential equations.
  • Numerical solution of the coupled system  

MAI HL and SL Notes – All topics

EULER METHOD

Euler Method

Concept:

Euler’s method is a numerical approach to approximate solutions of first order differential equations of the form:

$\frac{dy}{dx} = f(x, y), \quad y(x_0) = y_0$

Idea: Starting from the initial point \((x_0, y_0)\), we compute successive values using:

$ y_{n+1} = y_n + h f(x_n, y_n) $

where \( h \) is the step size and \( x_{n+1} = x_n + h \).

Euler’s method The dashed line shows the solution computed by successive iterations of Euler’s method. It diverges from the actual solution as errors accumulate over time.

GDC Tip: Use the Recursion feature: 

Define \( X_0 = x_0 \), \( Y_0 = y_0 \) – \( X_{n+1} = X_n + h \) – \( Y_{n+1} = Y_n + h \cdot f(X_n, Y_n) \)

Example

Use Euler’s method with \( h = 0.1 \) to approximate \( y(0.1) \) for \( \frac{dy}{dx} = x + y \), with \( y(0) = 1 \)

▶️Answer/Explanation

Step: $ y_1 = y_0 + h(x_0 + y_0) = 1 + 0.1(0 + 1) = 1.1$

 Using Spreadsheets for Euler’s Method

Euler’s Method provides a numerical technique to approximate solutions to first-order differential equations of the form:

\(\frac{dy}{dx} = f(x, y), \quad y(x_0) = y_0\)

A spreadsheet (e.g. Excel or Google Sheets) allows for iterative computation through columns for:

  • x values (e.g., \(x_0, x_1, x_2, \dots\))
  • y values using \(y_{n+1} = y_n + h \cdot f(x_n, y_n)\)
  • f(x, y) values using the formula entered into a separate column

Steps in a spreadsheet:

  1. Enter initial conditions in the first row.
  2. In next row, compute: \(x_{n+1} = x_n + h\)
  3. Compute \(f(x_n, y_n)\)
  4. Compute \(y_{n+1} = y_n + h \cdot f(x_n, y_n)\)
  5. Drag the formula down to generate more steps.

This is useful for modeling where analytical solutions are difficult or impossible to obtain.

Example

Use a spreadsheet to approximate \( y(0.4) \) using Euler’s Method for \( \frac{dy}{dt} = y – t^2 + 1 \) with \( y(0) = 0.5 \), step size \( h = 0.2 \).

▶️Answer/Explanation

Step-by-step in spreadsheet:

  • Cell A2: \( t_0 = 0 \), B2: \( y_0 = 0.5 \)
  • Use: \( y_{n+1} = y_n + h \cdot (y_n – t_n^2 + 1) \)
  • Next row: \( t_1 = 0.2 \), calculate \( y_1 \)
  • Continue for \( t = 0.4 \)

Final approximation: \( y(0.4) \approx 1.076 \)

Example

Given \( \frac{dy}{dx} = x^2 + y^2 \), and initial point \( (0, 1) \), use a step size of 0.2 to estimate \( y \) when \( x = 1 \) using Euler’s Method.

▶️Answer/Explanation

Manual Calculation (Euler’s Method):

  • \( x_1 = 0 + 0.2 = 0.2 \), \( y_1 = 1 + 0.2(0^2 + 1^2) = 1.2 \)
  • \( x_2 = 0.4 \),      \( y_2 = 1.2 + 0.2(0.2^2 + 1.2^2) = 1.496 \)
  • \( x_3 = 0.6 \),      \( y_3 = 1.496 + 0.2(0.4^2 + 1.496^2) = 1.9756 \)
  • \( x_4 = 0.8 \),      \( y_4 = 1.9756 + 0.2(0.6^2 + 1.9756^2) = 2.8282 \)
  • \( x_5 = 1.0 \),      \( y_5 = 2.8282 + 0.2(0.8^2 + 2.8282^2) = 4.556 \)

Using GDC (TI-nspire Lists & Spreadsheets):

  • Column A: \( x \rightarrow a_1 = 0 \), then use formula \( a_{n+1} = a_n + 0.2 \)
  • Column B: \( y \rightarrow b_1 = 1 \), then use \( b_{n+1} = b_n + 0.2 \cdot c_n \)
  • Column C: \( \frac{dy}{dx} = a_n^2 + b_n^2 \)

Drag down the formulas and at row 6 (i.e. \( x = 1 \)), the solution is: 4.556

COUPLED SYSTEMS OF DIFFERENTIAL EQUATIONS

Coupled Systems of Differential Equations

A system of differential equations involves more than one dependent variable. A coupled system is where the equations depend on each other.

For example, a system might look like:

$ \begin{cases} \frac{dx}{dt} = f(x, y) \\ \frac{dy}{dt} = g(x, y) \end{cases} $

Such systems arise in real-world scenarios like physics, chemistry, economics, and biology.

Numerical methods like Euler’s Method can be extended to systems:

  • Compute \(x_{n+1} = x_n + h \cdot f(x_n, y_n)\)
  • Compute \(y_{n+1} = y_n + h \cdot g(x_n, y_n)\)

Spreadsheets can also be used to simulate coupled systems by maintaining separate columns for each variable and its update formula.

Example

Consider the system: $ \frac{dx}{dt} = 3x + 4y, \quad \frac{dy}{dt} = -4x + 3y $

▶️Answer/Explanation

Find eigenvalues of the matrix:

$ \begin{bmatrix} 3 & 4 \\ -4 & 3 \end{bmatrix} \Rightarrow \lambda = 3 \pm 4i $]

This is a spiral center — solutions rotate and grow.

Example

The population of moose \( m \) and wolves \( w \) on an island, after \( t \) years, is modeled by the coupled system:

$ \frac{dm}{dt} = \frac{1}{200} m (150 – 20 – 3w), \quad \frac{dw}{dt} = \frac{1}{200} w (3m – 300 – 5w) $

Initially, there are 150 moose and 40 wolves. Using a step length of \( h = 0.1 \), estimate the population of moose and wolves after 1 year.

▶️Answer/Explanation

Manual Step (Euler’s Method):

Let \( m_0 = 150 \), \( w_0 = 40 \)

$ \frac{dm}{dt} = \frac{150}{200}(150 – 20 – 3(40)) = \frac{3}{4}(40) = 30 \Rightarrow m_1 = 150 + 0.1 \cdot 7.5 = 150.75$

$\frac{dw}{dt} = \frac{40}{200}(3(150) – 300 – 5(40)) = \frac{1}{5}(-50) = -10 \Rightarrow w_1 = 40 + 0.1(-10) = 39 $

So after \( \frac{1}{10} \) of a year, the populations are approximately \( m = 150.75 \), \( w = 39 \).
Repeat this 9 more times or use GDC:

Using GDC (TI-nspire Lists & Spreadsheets):

  • Column A: \( t \rightarrow a_1 = 0 \), then \( a_{n+1} = a_n + 0.1 \)
  • Column B: \( m \rightarrow b_1 = 150 \), then \( b_{n+1} = b_n + 0.1 \cdot \frac{1}{200} b_n (150 – 20 – 3c_n) \)
  • Column C: \( w \rightarrow c_1 = 40 \), then \( c_{n+1} = c_n + 0.1 \cdot \frac{1}{200} c_n (3b_n – 300 – 5c_n) \)

Drag down formulas to row 11 (i.e. \( t = 1 \)):

  • Moose: 169.492 → 169
  • Wolves: 36.741 → 37

Error in Euler’s Method: Local and Global Truncation Errors

Euler’s method is a fundamental numerical approach for approximating solutions to differential equations. However, its simplicity comes at the cost of truncation errors, which arise from approximating the actual curve using straight-line segments.

 Local Truncation Error

This refers to the error made during a single step of Euler’s method. It occurs because the method assumes the slope of the solution remains constant over the step interval \( h \), whereas in reality, the slope is changing.

Key property:

Local truncation error is proportional to the square of the step size:

$ \text{Local error} \propto h^2 $

This means reducing the step size significantly lowers the error per step.

Global Truncation Error

Global error is the accumulated error over all steps in the interval. It represents the total deviation from the true solution after many iterations.

Key property:

Global truncation error is proportional to the step size:

$ \text{Global error} \propto h $

If you halve the step size \( h \), the total accumulated error is also approximately halved.

 Minimizing Error

  • Use a smaller step size \( h \) to reduce both local and global errors.
  • Alternatively, use more accurate numerical methods like the Runge–Kutta methods, which provide better accuracy with similar step sizes.

Conclusion: A good understanding of local and global errors allows for an optimal balance between computational cost and desired accuracy when applying Euler’s method.

Example

Approximate \( y(1) \) using Euler’s method for \( \frac{dy}{dt} = y \) with \( y(0) = 1 \), step size \( h = 0.5 \).

▶️Answer/Explanation

Steps:

$ y_1 = 1 + 0.5(1) = 1.5, \quad y_2 = 1.5 + 0.5(1.5) = 2.25 $

True value: \( e^1 \approx 2.718 \)

Global error: \( 2.718 – 2.25 = 0.468 \)

Local error occurs at each step and is proportional to \( h^2 \), while global error ∝ \( h \).

 PREDATOR–PREY MODELS

 Predator–Prey Models (Lotka–Volterra Equations)

Predator–Prey models describe the interaction between two species: a predator and its prey. A classic model is the Lotka–Volterra system:

$ \begin{cases} \frac{dx}{dt} = ax – bxy \\ \frac{dy}{dt} = -cy + dxy \end{cases} $

Where:

  • \(x(t)\): Population of prey (e.g., rabbits)
  • \(y(t)\): Population of predators (e.g., foxes)
  • \(a\): Natural growth rate of prey in absence of predators
  • \(b\): Rate at which predators destroy prey
  • \(c\): Natural death rate of predators in absence of prey
  • \(d\): Growth rate of predators per prey eaten

Behavior:

  • Prey population grows rapidly without predators.
  • Predators rise when prey are abundant.
  • Too many predators reduce prey population, leading to predator starvation.
  • The cycle repeats in a periodic manner.

Applications:

  • Ecology – to predict population dynamics.
  • Economics – to model competing firms or resources.

This system is nonlinear and often requires numerical methods like Euler or Runge-Kutta to solve and visualize.

Example

Consider the system: $ \frac{dx}{dt} = x(1 – 0.01y), \quad \frac{dy}{dt} = -y(1 – 0.01x) $

▶️Answer/Explanation

\( x \): rabbits, \( y \): foxes.

  • When foxes increase, rabbit growth slows.
  • When rabbits are scarce, fox population declines.

Oscillatory solution around an equilibrium point.

Scroll to Top