Euler's method

    Euler's Method: Approximating Solutions to Differential Equations

    Euler's Method is a numerical procedure for approximating the solution to a first-order initial value problem (IVP). It provides a way to estimate values of a function when an explicit formula is difficult or impossible to find, given only its derivative and an initial point. It's based on the idea of local linearity – that is, if we zoom in enough on a curve, it looks like a straight line.

    The Underlying Principle

    Given an initial value problem of the form dy/dx = f(x, y) with an initial condition y(x_0) = y_0, Euler's method uses tangent lines to step forward and approximate the function's values. The core idea is that over a small interval, the function behaves approximately linearly. The formula for the next y-value, y_{n+1}, is derived from the point-slope form of a line: y - y_n = m(x - x_n), where m = dy/dx = f(x_n, y_n).

    The Iterative Formula

    The iterative formulas for Euler's method are:

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

    Where:

    • (x_n, y_n) is the current known point.
    • h is the step size (also denoted as \Delta x), a small positive number that determines the size of each step. A smaller step size generally leads to a more accurate approximation but requires more calculations.
    • f(x_n, y_n) is the value of the derivative dy/dx at the point (x_n, y_n), representing the slope of the tangent line at that point.

    Steps for Applying Euler's Method

    1. Identify the differential equation dy/dx = f(x, y) and the initial condition (x_0, y_0).
    2. Determine the desired x-value for the approximation and the step size h.
    3. Calculate the next x-value: x_1 = x_0 + h.
    4. Calculate the next y-value using the formula: y_1 = y_0 + h \cdot f(x_0, y_0).
    5. Repeat steps 3 and 4, using (x_1, y_1) as the new current point to find (x_2, y_2), and so on, until the desired x-value is reached.

    Accuracy and Error

    Euler's method is a first-order method, meaning its local truncation error (error per step) is proportional to h^2, and its global truncation error (total error over an interval) is proportional to h. This implies that reducing the step size h will generally improve the accuracy of the approximation. However, extremely small step sizes can introduce significant round-off error due to the finite precision of computer arithmetic. The approximation will typically underestimate the true value if the solution curve is concave up and overestimate if it is concave down, assuming the step size is consistent across the interval.

    Example Application

    Consider the IVP dy/dx = x + y with y(0) = 1. Use Euler's method with a step size h = 0.1 to approximate y(0.2).

    • Step 1: (x_0, y_0) = (0, 1). f(x, y) = x + y.
    • Step 2 (for y(0.1)):
      • x_1 = 0 + 0.1 = 0.1
      • y_1 = y_0 + h \cdot f(x_0, y_0) = 1 + 0.1 \cdot (0 + 1) = 1 + 0.1(1) = 1.1
    • Step 3 (for y(0.2)):
      • x_2 = 0.1 + 0.1 = 0.2
      • y_2 = y_1 + h \cdot f(x_1, y_1) = 1.1 + 0.1 \cdot (0.1 + 1.1) = 1.1 + 0.1(1.2) = 1.1 + 0.12 = 1.22

    So, y(0.2) \approx 1.22.

    Practice questions

    1

    What is the primary purpose of Euler's Method?

    2

    Given dy/dx = 2x - y and y(0) = 1, use Euler's Method with a step size of h = 0.5 to approximate y(0.5).

    3

    How does the choice of step size 'h' affect the accuracy of Euler's Method approximations?

    4

    Under what conditions might Euler's Method typically underestimate the true value of a solution?

    Practice more free →

    Free AP4U account — unlimited practice, AI grader, and progress tracking.

    Canonical: https://apforu.com/ap/calculus-bc/unit-7-differential-equations/euler-s-method