Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Recipe

Read a method's order of accuracy off two points on an error plot

Use when: you have (or can read off a log-log error-versus-step-size plot) two pairs (h_1,E_1) and (h_2,E_2) for the same method on the same problem

Goal: the numerical order of accuracy p, with a check that the two points actually sit on the straight, trustworthy part of the plot

Taught in Reading order of accuracy off an error plot

  1. 1

    Before computing anything, check that neither point sits where the curve visibly bends — too-large h, before the asymptotic E\approx Ch^p law kicks in, or too-small h, where floating-point rounding has started to dominate.

    Example

    An RK4 error plot might run as a clean straight line for h between 0.5 and 0.05, then flatten out below h=0.01. Picking two points from inside the straight range — say h=0.2 and h=0.1 — is what makes the slope meaningful; a point below 0.01 would not be.

    Why: the slope-equals-order relationship \log E\approx p\log h+\log C only holds on the straight part of the plot — a point off it gives a meaningless "order."

  2. 2

    Take \log_{10} of both errors and both step sizes, then subtract — equivalently, take \log_{10} of each ratio.

    Example

    With E_1=0.01 at h_1=0.2 and E_2=0.000625 at h_2=0.1: \Delta\log_{10}E=\log_{10}\!\left(\frac{0.01}{0.000625}\right)=\log_{10}16\approx1.204 \Delta\log_{10}h=\log_{10}\!\left(\frac{0.2}{0.1}\right)=\log_{10}2\approx0.301

    Why: this is just the rise and run of the line connecting the two plotted points on log-log axes.

  3. 3

    Order p=\dfrac{\Delta\log_{10}E}{\Delta\log_{10}h}; a method's true order is always one specific known number (1 for Euler, 2 for Heun/RK2, 4 for RK4 in this course), so round the computed slope to the nearest one of those.

    Example

    p=\dfrac{1.204}{0.301}=4 exactly. \boxed{\text{Order}=4 \text{ — this is RK4-shaped data}}

    Why: two real, imperfect plotted points won't in general give an exactly-integer slope, so rounding to the nearest of the method's known possible orders is the honest last step, not a fudge.

  4. 4

    Compare the rounded slope from Step 3 to the known order of the method that produced the data (Euler's method is order 1, improved Euler/RK2 is order 2, RK4 is order 4).

    • the slope matches a known method's order — the identification is confirmed.
    • the slope doesn't match any known order, or is close to 0 — the two points are probably sitting in the flattened, rounding-dominated region Step 1 warns about — go back and pick two points further from it.

    Why: a computed slope with no plausible method behind it is almost always a sign the input points were chosen badly, not a new discovery.

Common mistakes

  • Picking a point in the flattened tail of the plot, silently pulling the computed slope toward zero.
  • Dividing \Delta\log h/\Delta\log E instead of \Delta\log E/\Delta\log h, flipping the order upside down (reporting \tfrac12 instead of 2, say).
  • Comparing errors from two different methods (or two different problems) — the ratio is only meaningful for the same method on the same problem at two step sizes.
  • Treating a computed slope of, say, 1.87 as "not quite order 2," instead of recognizing ordinary floating-point and finite-precision noise around the true value.