Mistake Master
Home Unit 7 · Differential Equations 7.1·7.2·7.3·7.4·7.5·7.6·7.7·7.8·7.9 Lesson
Skill Check 0 / 10 complete

Tangent lines, chained BC only

Euler's method solves a differential equation the way you would walk across a dark room: take the direction you have, move a short distance, ask again, repeat. The whole method is one tangent-line step, and the whole difficulty is remembering to ask again.

§1

One step, then the same step again.

From a point $(x_{n}, y_{n})$ on the solution, the differential equation gives the slope there, and the tangent line predicts where the solution goes next:

$$y_{n+1} = y_{n} + h \cdot f(x_{n}, y_{n}), \qquad x_{n+1} = x_{n} + h.$$

That is the entire method. The new point is not on the true solution, but it is close, and the process repeats from there.

Worked all the way through for $\frac{dy}{dx} = x + y$ with $y(0) = 1$, using $h = 0.5$ to reach $x = 1$:

  1. At $(0, 1)$ the slope is $0 + 1 = 1$. Move: $y = 1 + 0.5(1) = 1.5$, so the next point is $(0.5, 1.5)$.
  2. At $(0.5, 1.5)$ the slope is $0.5 + 1.5 = 2$. Move: $y = 1.5 + 0.5(2) = 2.5$, so the next point is $(1, 2.5)$.

The approximation is $y(1) \approx 2.5$. The exact solution of this problem is $y = 2e^{x} - x - 1$, so the true value is about $3.437$: the estimate is low, and the next section but one says why that was predictable.

Keep the work in a table with columns for $x$, $y$, the slope and the change $h \cdot f$. A table makes an omitted step visible; a running string of arithmetic does not.

§2

The step size and the number of steps.

Problems specify the steps in one of two ways, and confusing them is the single most common arithmetic error here.

  1. "Use a step size of $h = 0.2$." Then $h = 0.2$ and you take as many steps as it takes to reach the target.
  2. "Use $n$ steps of equal size." Then $h = \frac{b - a}{n}$, where $a$ is the starting input and $b$ the target. To go from $x = 1$ to $x = 3$ in four steps, $h = \frac{3 - 1}{4} = 0.5$, not $2$ and not $4$.

Counting matters as much as sizing. Reaching $x = 1.2$ from $x = 0$ with $h = 0.3$ takes four steps, and stopping after three lands at $x = 0.9$, which answers a different question. Write the $x$-value beside every row and stop when it equals the target.

Backwards is allowed. If the initial condition is at $x = 1$ and the approximation is wanted at $x = 0.5$, then $h$ is negative. With two steps, $h = \frac{0.5 - 1}{2} = -0.25$, and the recursion is unchanged: multiply the slope by $-0.25$ each time. Using $+0.25$ walks away from the target and produces a value from the wrong side of the initial point.

§3

Ask again at every step.

The slope must be recomputed at each new point, using both updated coordinates. This is the conceptual error of the topic and it hides well, because the arithmetic looks the same.

In the worked example, a student who reuses the first slope of $1$ computes $1 + 1(1) = 2$ for the value at $x = 1$. That is the tangent line at the starting point extended across the whole interval, which is a different and much cruder approximation. The point of the method is that the direction changes.

Two half-versions of the same mistake:

  1. Updating $x$ but not $y$. In the example that gives a second slope of $0.5 + 1 = 1.5$ instead of $2$. Only wrong by a little, and wrong.
  2. Updating $y$ but not $x$. That gives $0 + 1.5 = 1.5$, wrong by the same amount from the other side.

A quick diagnostic: if a solution curve is genuinely bending, an Euler polygon should show it, with segments of visibly different slopes. A straight-line answer from a curving problem means the slope was never re-asked.

§4

Which way the estimate is wrong.

Each Euler step follows a tangent line, and a tangent line to a concave up curve lies below the curve. So on an interval where the solution is concave up, Euler's method underestimates; where it is concave down, it overestimates.

The worked example is concave up, since $\frac{d^{2}y}{dx^{2}} = 1 + \frac{dy}{dx} = 1 + x + y$ is positive there, and the estimate of $2.5$ duly falls short of $3.437$.

To decide concavity without solving, differentiate the differential equation. For $\frac{dy}{dx} = f(x, y)$, the chain rule gives $\frac{d^{2}y}{dx^{2}} = f_{x} + f_{y} \cdot \frac{dy}{dx}$, and in practice it is easier to differentiate the specific right side directly and substitute $\frac{dy}{dx}$ back in wherever it appears.

Two further facts about the error, both examinable:

  1. Smaller $h$ is more accurate. Halving the step roughly halves the error, at the cost of twice the arithmetic.
  2. Error accumulates. Each step starts from a point that is already slightly off, so later steps inherit the earlier drift. The estimate at $x = 1$ is worse than the one at $x = 0.5$, and comparing an Euler value to the exact solution at the first step understates how far off the last one is.
§5

Skill Check.

Ten scenarios. Pick the chips that match your answer, then check. A scenario marks complete the first time every part is right. Progress saves on this device.

0 of 10 scenarios complete