Euler's numerical solution of differential equations

Euler's numerical solution of differential equations

IB Year 6 | Grade 12

To find approximations to the solutions of differential equations, especially when the equation cannot be solved explicitly, we can make use of Euler’s Method, or Maclaurin’s series.

Euler’s Method of Approximation

This method is an iterative method that is used to approximate the coordinates of another point on the curve. It assumes that the curve is approximately linear for small increments of \(x\). We will begin at an initial value \((x_0, y_0)\) and progressively “move closer” to our intended value \((x_n, y_n)\), by adding increments of \(h\) to \(x_0\) and evaluating what the corresponding values of \(y\) are. This is a numerical approximation to the solution for \(y\).

Euler’s Method of Approximation:

Given a differential equation \(\frac{\mathrm{d}y}{\mathrm{d}x} = \mathrm{f}(x, y)\) with initial condition \((x_0, y_0)\), and a constant step length \(h\):

  1. Find the gradient \(m_0 = \mathrm{f}(x_0, y_0)\).
  2. Calculate \(x_1 = x_0 + h\). To calculate \(y_1\), we find the corresponding increment of \(y\), \(k_0\) using the formula \(k_0 = m_0 h\).
  3. Repeat Step \(1\) to find \(m_1 = \mathrm{f}(x_1, y_1)\) and Step \(2\) to find \((x_2, y_2) = (x_1 + h, y_1 + k_1)\), where \(k_1 = m_1 h\).
  4. Repeat Step \(3\) as many times as necessary to reach the target point \((x_n, y_n)\).

For clarity, we normally present the above in the form of a table consisting the columns for \(x_n\), \(y_n\) and \(m_n\).

Need help? Join our JC Math tuition classes.

Learn more