Euler's method

    Understanding Euler's Method

    Euler's Method is a numerical procedure for approximating the solution to an initial value problem (IVP) of the form dy/dx = f(x, y) with an initial condition y(x₀) = y₀. It's particularly useful when an analytical solution (a precise function for y) is difficult or impossible to find. The method relies on the idea of local linearity: over a small interval, the tangent line to the solution curve provides a good approximation of the curve itself.

    The Fundamental Idea

    Given a starting point (x₀, y₀) and a differential equation dy/dx = f(x, y), Euler's method iteratively constructs a sequence of points (x_n, y_n) that approximate the actual solution curve. The core principle is to use the slope at the current point to predict the value at the next point.

    The Iterative Formula

    The method proceeds in steps of size h (also denoted as Δx). For each step, we calculate the next x-value and y-value as follows:

    • x-step: xn+1 = xn + h
    • y-step: yn+1 = yn + h ⋅ f(xn, yn)

    Here, f(xn, yn) represents the slope of the tangent line to the solution curve at the point (xn, yn), as given by the differential equation dy/dx. This slope is used to project the y-value forward over the interval h.

    Steps for Applying Euler's Method

    1. Identify the Initial Value Problem: You'll be given dy/dx = f(x, y) and y(x₀) = y₀.
    2. Determine the Step Size (h): This will usually be provided or implied by the number of steps over a given interval. A smaller h generally leads to a more accurate approximation but requires more calculations.
    3. Start with the Initial Condition: (x₀, y₀) is your first point.
    4. Iterate: Use the formulas above to find (x₁, y₁), then (x₂, y₂), and so on, until you reach the desired x-value.

    Accuracy and Error

    The accuracy of Euler's method depends heavily on the step size h. As h decreases, the approximation generally improves because the assumption of local linearity holds better over smaller intervals. However, a smaller step size means more calculations, which can lead to increased computational error (round-off error). The error in Euler's method is typically proportional to h (it's a first-order method). The true solution curve generally curves away from the tangent line, leading to an accumulation of error over multiple steps. The approximation will typically underestimate the true value if the solution curve is concave up, and overestimate if it's concave down, though this is not a strict rule and depends on the behavior of f(x,y).

    Example Walkthrough

    Consider the IVP dy/dx = x + y with y(0) = 1. Approximate y(0.2) using two steps (h = 0.1).

    • Step 0: (x₀, y₀) = (0, 1)
    • Step 1 (h = 0.1):
      • x₁ = x₀ + h = 0 + 0.1 = 0.1
      • Slope at (0, 1): f(0, 1) = 0 + 1 = 1
      • y₁ = y₀ + h ⋅ f(x₀, y₀) = 1 + 0.1 ⋅ 1 = 1.1
    • Step 2 (h = 0.1):
      • x₂ = x₁ + h = 0.1 + 0.1 = 0.2
      • Slope at (0.1, 1.1): f(0.1, 1.1) = 0.1 + 1.1 = 1.2
      • y₂ = y₁ + h ⋅ f(x₁, y₁) = 1.1 + 0.1 ⋅ 1.2 = 1.1 + 0.12 = 1.22

    So, y(0.2) ≈ 1.22 using Euler's Method with h = 0.1.

    Practice questions

    1

    Which of the following describes the fundamental principle behind Euler's Method for approximating solutions to differential equations?

    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

    What is the general effect of decreasing the step size 'h' on the accuracy of an Euler's Method approximation?

    4

    If the actual solution curve to a differential equation is concave up, how might an Euler's Method approximation typically relate to the true value over an interval?

    Practice more free →

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

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