Tutorials › AP Calculus › Why Euler’s Global Error is First Order

Euler and Logistic Methods · Tutorial 586 of 999

Why Euler's Global Error is First Order

Learn how one-step errors accumulate over a fixed time interval and why Euler’s global error is bounded by a constant times the step size.

Advanced 10 min read

What You'll Learn

  • Distinguish Euler’s local one-step error from its global error at a grid point.
  • State the smoothness and Lipschitz assumptions used to bound accumulated error.
  • Derive the error recurrence, including the error already present at the start of a step.
  • Iterate the recurrence to obtain a global error bound proportional to the step size.
  • Verify an example where local errors accumulate to an exact global error of \(h/2\).
  • Recognize why first-order accuracy is a guarantee, not a claim that every problem has nonzero error.

From One-Step Error to Error Across an Interval

A small step size makes an individual Euler step more accurate. But a numerical solution over a whole interval uses many steps, so its total error depends both on the error made in each step and on how errors already present affect later steps.

For Euler’s method, a single step started from the exact solution has an error of size \(h^2\), where \(h\) is the step size. Over an interval of fixed length, however, the number of steps is proportional to \(1/h\). Under suitable smoothness and stability conditions, these local errors accumulate to a global error of size \(h\). This is what it means for Euler’s method to have first-order global accuracy.

Key distinction: The local one-step error measures the error in one step when that step starts at the exact value. The global error measures the difference between the numerical and exact solutions after repeated steps. Local error of order \(h^2\) leads, in general, to global error of order \(h\), not \(h^2\).

Set Up the Error Carefully

Consider the initial-value problem \(y'=f(t,y)\), \(y(a)=y_0\), on a fixed interval \([a,b]\). Let \(y(t)\) be its exact solution. Divide the interval into \(N\) equal steps, so \(h=(b-a)/N\) and \(t_n=a+nh\). Euler’s method computes

$$ Y_{n+1}=Y_n+h f(t_n,Y_n), \qquad Y_0=y_0. $$

Define the signed global error at the \(n\)th grid point by \(e_n=y(t_n)-Y_n\). To control its growth, suppose the following conditions hold throughout the interval and the region containing the exact and numerical values:

  • The exact solution has a continuous second derivative, with \(|y''(t)|\le M\) for some constant \(M\).
  • The slope function is Lipschitz continuous in \(y\): for the relevant \(t,u,v\), \(|f(t,u)-f(t,v)|\le L|u-v|\), where \(L\ge 0\).

The second condition limits how much a difference in solution values can change the slope. It is the stability control needed to bound the effect of errors already accumulated. The fixed interval and these bounds are essential: the resulting error constant may depend on \(M\), \(L\), and \(b-a\), but not on \(h\).

Why a Single Exact-Start Step Has Error of Size \(h^2\)

Start one Euler step at the exact value \(y(t_n)\). Its prediction is \(y(t_n)+h f(t_n,y(t_n))\). Since \(y'=f(t,y)\), the difference between the exact next value and that prediction is

$$ d_{n+1} = y(t_{n+1})-y(t_n)-h f(t_n,y(t_n)). $$

The bound on \(y''\) gives a precise estimate. Applying the integral form of the Taylor remainder, or integrating the change in \(y'\) over the step, gives

$$ d_{n+1} = \int_0^h \bigl(y'(t_n+s)-y'(t_n)\bigr)\,ds = \int_0^h (h-r)y''(t_n+r)\,dr. $$

Thus

$$ |d_{n+1}| \le \int_0^h (h-r)M\,dr = M\left[hr-\frac{r^2}{2}\right]_0^h = \frac{M}{2}h^2. $$

This is the local one-step error bound when the starting value is exact. In repeated Euler steps, though, a step usually starts from \(Y_n\), not \(y(t_n)\). The difference between those starting values must be included.

Deriving the Global Error Recurrence

Add and subtract the Euler slope evaluated at the exact starting value. Using the definition of \(e_n\), write

$$ \begin{aligned} e_{n+1} &=y(t_{n+1})-Y_{n+1}\\ &=\bigl(y(t_{n+1})-y(t_n)-h f(t_n,y(t_n))\bigr)\\ &\quad+\bigl(y(t_n)-Y_n\bigr) +h\bigl(f(t_n,y(t_n))-f(t_n,Y_n)\bigr). \end{aligned} $$

These three terms have distinct roles: the local defect of the exact-start step, the error already present at time \(t_n\), and the effect of that starting-value error on the slope. Apply the triangle inequality, the local bound, and the Lipschitz condition:

$$ \begin{aligned} |e_{n+1}| &\le |d_{n+1}|+|e_n| +h|f(t_n,y(t_n))-f(t_n,Y_n)|\\ &\le \frac{M}{2}h^2+|e_n|+Lh|e_n|\\ &=(1+Lh)|e_n|+\frac{M}{2}h^2. \end{aligned} $$

This recurrence explains the accumulation. Each step adds a fresh error bounded by \(Mh^2/2\), while the factor \(1+Lh\) accounts for possible growth of the error carried into that step.

From the Recurrence to a First-Order Bound

Because the initial value is exact, \(e_0=0\). Repeatedly applying the recurrence gives, for \(L>0\),

$$ \begin{aligned} |e_n| &\le \frac{M}{2}h^2 \left(1+(1+Lh)+(1+Lh)^2+\cdots+(1+Lh)^{n-1}\right)\\ &=\frac{M}{2}h^2 \frac{(1+Lh)^n-1}{Lh}\\ &=\frac{Mh}{2L}\left((1+Lh)^n-1\right). \end{aligned} $$

Since \(1+Lh\le e^{Lh}\) and \(nh=t_n-a\), this yields the convenient bound

$$ |e_n| \le \frac{Mh}{2L}\left(e^{L(t_n-a)}-1\right), \qquad L>0. $$

For \(L=0\), the recurrence instead gives \(|e_n|\le nMh^2/2\). Since \(nh=t_n-a\), this becomes \(|e_n|\le M(t_n-a)h/2\). In either case, on a fixed interval there is a constant \(C\), independent of \(h\), such that \(|e_n|\le Ch\) at every grid point. With the initial value exact and the stated bounds, this proves first-order global accuracy.

Theorem: If the exact solution has bounded second derivative on a fixed interval, the slope function is Lipschitz continuous in \(y\) on the relevant region, and Euler’s method starts from the exact initial value, then its global error at the grid points is bounded by \(Ch\) for some constant \(C\) independent of the step size. This is a global error bound of order \(h\).

Worked Example: Local Errors Accumulate Exactly to \(h/2\)

Worked Example: Local Errors Accumulate Exactly to \(h/2\)

Apply Euler’s method to \(y'=t\), \(y(0)=0\), on \([0,1]\), using \(N\) equal steps. Here \(h=1/N\). The exact solution is \(y(t)=t^2/2\), since its derivative is \(t\) and it satisfies the initial condition.

At step \(n\), Euler’s update is \(Y_{n+1}=Y_n+h t_n\), with \(t_n=nh\). Therefore

$$ Y_N = \sum_{n=0}^{N-1} h(nh) = h^2\sum_{n=0}^{N-1}n = h^2\frac{N(N-1)}{2} = \frac{1-h}{2}. $$

The exact value at \(t=1\) is \(y(1)=1/2\). The final error is consequently

$$ e_N=y(1)-Y_N = \frac12-\frac{1-h}{2} = \frac h2. $$

We can also check the error step by step. On a step starting at \(t_n\), the exact change is \(\bigl((t_n+h)^2-t_n^2\bigr)/2=t_nh+h^2/2\). Euler’s change is \(t_nh\), so the exact-start local defect is \(h^2/2\) on every step. There are \(N=1/h\) steps, giving total error \(N(h^2/2)=h/2\), as found directly.

Finally, \(y''(t)=1\), so \(M=1\), and \(f(t,y)=t\) is independent of \(y\), so \(L=0\). The bound for \(L=0\) gives \(|e_N|\le M(1-0)h/2=h/2\). The computed error equals that bound. This example makes clear how \(N\) local errors of size \(h^2\) can produce a global error of size \(h\).

Worked Example: A Bound for Euler’s Approximation to \(y'=y\)

Worked Example: A Bound for Euler’s Approximation to \(y'=y\)

Consider \(y'=y\), \(y(0)=1\), on \([0,1]\), with \(h=1/4\). The exact solution is \(y(t)=e^t\). Euler’s values are computed by \(Y_{n+1}=Y_n+(1/4)Y_n=(5/4)Y_n\):

$$ Y_0=1,\qquad Y_1=\frac54,\qquad Y_2=\frac{25}{16},\qquad Y_3=\frac{125}{64},\qquad Y_4=\frac{625}{256}=2.44140625. $$

The exact endpoint value is \(e\approx2.718281828\), so the endpoint error is

$$ e_4=e-\frac{625}{256} \approx 2.718281828-2.44140625 =0.276875578. $$

For the bound, \(f(t,y)=y\) has Lipschitz constant \(L=1\). Also \(y''(t)=e^t\le e\) on \([0,1]\), so we may take \(M=e\). The finite geometric-sum bound gives

$$ \begin{aligned} |e_4| &\le \frac{Mh}{2L}\left((1+Lh)^4-1\right)\\ &=\frac{e}{8}\left(\left(\frac54\right)^4-1\right)\\ &=\frac{e}{8}\left(\frac{625}{256}-\frac{256}{256}\right)\\ &=\frac{369e}{2048} \approx 0.4898. \end{aligned} $$

The actual error, approximately \(0.2769\), is less than the bound, approximately \(0.4898\). The bound guarantees control, not an exact prediction of the error. In particular, a valid upper bound can be substantially larger than the error it controls.

A Common Mistake: Dropping the Existing Error

A tempting but incorrect argument compares the next exact value only with the Euler step starting from the exact value, then adds a slope-difference term. That omits the difference between the exact and numerical starting values at the current step. The missing term is \(e_n\).

Worked Example: Correcting an Incomplete Recurrence

For the problem \(y'=t\), \(y(0)=0\), take \(h=1/4\). The exact solution is \(y(t)=t^2/2\), and Euler’s method gives \(Y_0=0\), \(Y_1=0\), \(Y_2=1/16\). At \(t_2=1/2\), the exact value is \(y(t_2)=1/8\), so \(e_2=1/8-1/16=1/16\).

An incomplete estimate would say that the next error is at most the new local defect \(h^2/2=1/32\), because \(L=0\). But the actual next error is \(e_3=1/2-y(3/4)\text{’s Euler approximation}\). Euler gives \(Y_3=Y_2+(1/4)(1/2)=1/16+1/8=3/16\); the exact value is \(y(3/4)=9/32\). Hence

$$ e_3=\frac{9}{32}-\frac{3}{16} =\frac{9}{32}-\frac{6}{32} =\frac{3}{32}, $$

which is greater than \(1/32\). The corrected recurrence includes the error already present:

$$ |e_{n+1}| \le |e_n|+\frac{M}{2}h^2+Lh|e_n|. $$

Here \(M=1\), \(L=0\), and \(|e_2|=1/16\), so it gives \(|e_3|\le1/16+1/32=3/32\), exactly matching the computed error. This check shows why the starting-value difference cannot be left out.

What “First Order” Does and Does Not Claim

A bound of the form \(|e_n|\le Ch\) says that reducing \(h\) reduces the guaranteed global error proportionally, with the constant \(C\) fixed for the problem and interval. For example, halving \(h\) halves this upper bound. The result does not say the error is exactly \(Ch\), nor that it must be nonzero. Some problems have cancellations or special structure that make Euler’s error smaller; if the slope is constant, Euler’s method follows the exact solution with no error.

The essential reasoning is the balance between two quantities: each exact-start step contributes an error proportional to \(h^2\), while a fixed interval contains approximately \(1/h\) steps. The Lipschitz condition ensures that previously accumulated error does not grow without control as those steps are repeated. Together, these facts give the first-order global bound.

Check Your Understanding

Answer these questions using the definitions and error recurrence from this tutorial.

  1. How does the local one-step error differ from the global error at a grid point?
  2. Why does the local bound \(Mh^2/2\) alone not bound the global error after several steps?
  3. For \(L>0\), what recurrence bounds \(|e_{n+1}|\) in terms of \(|e_n|\), \(M\), \(L\), and \(h\)?
  4. For \(y'=t\), \(y(0)=0\) on \([0,1]\), what is the global error after \(N\) equal Euler steps?
  5. Does first-order global accuracy mean that every problem has a nonzero error proportional to \(h\)? Explain briefly.

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon