Tutorials › Calculus I › Global Error Bounds Under a Lipschitz Condition

Euler's Method and Numerical Solutions · Tutorial 1438 of 1495

Global Error Bounds Under a Lipschitz Condition

Learn to turn a bound on each Euler step’s local error into a rigorous bound on the global error over a fixed time interval.

Advanced 10 min read

What You'll Learn

  • State the uniform Lipschitz and local-defect assumptions needed for the bound.
  • Derive the recurrence connecting consecutive global errors.
  • Sum the amplified local errors over a finite grid.
  • Handle zero Lipschitz constant and nonzero initial error.
  • Obtain a local-defect bound from a bound on the exact solution’s second derivative.
  • Identify why simply adding local-error bounds can underestimate global error.

From Local Error to a Finite-Time Guarantee

Forward Euler makes a small error at each step. Those errors do not necessarily remain the same size: a later step can carry forward and amplify the error already present. A global error bound must account for both effects.

We consider a scalar initial-value problem on a finite interval \([0,T]\), with \(T>0\), and divide that interval into \(N\) equal steps of size \(h=T/N\). The exact solution is \(y(t)\), and the Euler values are defined by

$$ Y_0=y(0), \qquad Y_{n+1}=Y_n+h f(t_n,Y_n), \qquad t_n=nh, \quad 0\le n<N. $$

The global error at grid point \(t_n\) is \(e_n=|y(t_n)-Y_n|\). The aim is to bound \(e_n\) for every grid point up to the chosen final time.

Assumptions and Local Defect

The slope function must not change too rapidly when its solution input changes. We assume that, for some constant \(L\ge 0\), it satisfies the Lipschitz condition

$$ |f(t,u)-f(t,v)|\le L|u-v| $$

for every \(t\in[0,T]\) and every pair \(u,v\) in the region containing the exact and Euler solution values. The same \(L\) must work at all these times and values.

For one step starting from the exact solution, define the local defect by

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

This is the difference between the exact solution after one step and the result of taking one Euler step from the exact value at the start of that step. It is not the global error: the global error also includes the effect of earlier steps. Assume that each local defect has the bound

$$ |\delta_{n+1}|\le \tau \qquad (0\le n<N), $$

where \(\tau\ge 0\) is a uniform bound for the chosen step size.

Theorem: Suppose the exact solution and Euler values lie in a region where \(f\) has Lipschitz constant \(L\) in its solution variable, and suppose \(|\delta_{n+1}|\le\tau\) on every step. If \(e_0=|y(0)-Y_0|\), then for \(L>0\), $$ e_n\le (1+Lh)^n e_0+ \tau\,\frac{(1+Lh)^n-1}{Lh}, \qquad 0\le n\le N. $$ If \(L=0\), then $$ e_n\le e_0+n\tau. $$

Why the Bound Holds

Write the difference between the exact and numerical values at the next grid point by inserting one Euler step started from the exact value. The triangle inequality, the Lipschitz condition, and the local-defect bound then give the error recurrence.

$$ \begin{aligned} e_{n+1} &=|y(t_{n+1})-Y_{n+1}|\\ &=\big|y(t_n)+h f(t_n,y(t_n))+\delta_{n+1} -Y_n-h f(t_n,Y_n)\big|\\ &\le |y(t_n)-Y_n| +h|f(t_n,y(t_n))-f(t_n,Y_n)| +|\delta_{n+1}|\\ &\le (1+Lh)e_n+\tau. \end{aligned} $$

This recurrence shows the two contributions at each step. The existing error is multiplied by at most \(1+Lh\), while the new local defect adds at most \(\tau\).

For \(L>0\), repeated substitution gives

$$ \begin{aligned} e_n &\le (1+Lh)^n e_0 +\tau\big(1+(1+Lh)+\cdots +(1+Lh)^{n-1}\big)\\ &=(1+Lh)^n e_0+ \tau\,\frac{(1+Lh)^n-1}{(1+Lh)-1}\\ &=(1+Lh)^n e_0+ \tau\,\frac{(1+Lh)^n-1}{Lh}. \end{aligned} $$

The middle expression is a finite geometric sum. Its common ratio is \(1+Lh\), and its denominator is \(Lh\), which is positive when \(L>0\). This proves the stated bound. When \(L=0\), the recurrence becomes \(e_{n+1}\le e_n+\tau\); applying it \(n\) times yields \(e_n\le e_0+n\tau\).

Why this is a global bound: The sum includes every local defect added up to step \(n\), with earlier defects multiplied by factors that account for possible amplification on later steps.

A Bound in Terms of Step Size

A common way to bound the local defect is to control the second derivative of the exact solution. If \(y\) is twice continuously differentiable and \(|y''(t)|\le M\) on \([0,T]\), Taylor’s theorem on each step gives

$$ y(t_{n+1}) = y(t_n)+h y'(t_n)+\frac{h^2}{2}y''(\xi_n) $$

for some \(\xi_n\in[t_n,t_{n+1}]\). Since the exact solution satisfies \(y'(t_n)=f(t_n,y(t_n))\), it follows that

$$ |\delta_{n+1}| = \left|\frac{h^2}{2}y''(\xi_n)\right| \le \frac{M}{2}h^2. $$

Thus the theorem applies with \(\tau=(M/2)h^2\). At a grid point \(t_n=nh\), the resulting bound for \(L>0\) is

$$ e_n \le (1+Lh)^n e_0 +\frac{Mh}{2L}\big((1+Lh)^n-1\big). $$

In particular, if the initial value is exact, then \(e_0=0\). For a fixed time interval, the factor \((1+Lh)^n\) is at most \(e^{Lnh}\), because \(1+x\le e^x\) for \(x\ge0\). Therefore, when \(L>0\), a convenient, slightly looser bound is

$$ e_n\le \frac{Mh}{2L}(e^{Lt_n}-1) \le \frac{Mh}{2L}(e^{LT}-1). $$

This makes the finite-time dependence explicit: with \(M\), \(L\), and \(T\) fixed, the bound is proportional to \(h\). If \(L=0\), the second-derivative bound instead gives \(e_n\le (M/2)t_nh\le (M/2)Th\) for an exact initial value.

Worked Examples

Worked Example: Bounding Error for Exponential Decay

Consider \(y'=-2y\), \(y(0)=1\), on \([0,0.5]\), using \(h=0.1\). The exact solution is \(y(t)=e^{-2t}\), since its derivative is \(-2e^{-2t}=-2y(t)\), and \(y(0)=1\). Here \(f(t,y)=-2y\), so

$$ |f(t,u)-f(t,v)|=|-2u+2v|=2|u-v|, \qquad L=2. $$

The exact solution has \(y''(t)=4e^{-2t}\), so \(0<y''(t)\le4\) on the interval. We can use \(M=4\), giving the local-defect bound \(\tau=(4/2)(0.1)^2=0.02\). The initial value is exact, so \(e_0=0\). There are \(n=0.5/0.1=5\) steps. The theorem gives

$$ \begin{aligned} e_5 &\le 0.02\,\frac{(1+2(0.1))^5-1}{2(0.1)}\\ &=0.02\,\frac{1.2^5-1}{0.2}\\ &=0.02\,\frac{2.48832-1}{0.2}\\ &=0.02(7.4416)=0.148832. \end{aligned} $$

To check against the computed Euler value, the recurrence is \(Y_{n+1}=Y_n-0.2Y_n=0.8Y_n\). Thus \(Y_5=0.8^5=0.32768\). The exact value is \(y(0.5)=e^{-1}\approx0.36787944\), so the actual error is approximately \(|0.36787944-0.32768|=0.04019944\), which is below \(0.148832\). The bound is a guarantee, not an assertion that the error equals the bound.

Worked Example: A Zero Lipschitz Constant

Consider \(y'=t\), \(y(0)=0\), on \([0,1]\), with \(h=0.25\). Since \(f(t,y)=t\) does not depend on \(y\), it is Lipschitz in \(y\) with \(L=0\). The exact solution \(y(t)=t^2/2\) satisfies \(y'(t)=t\) and \(y(0)=0\).

On a step starting at \(t_n\), the exact increment is \(t_nh+h^2/2\), while Euler’s increment is \(t_nh\). Thus every local defect is \(h^2/2=0.25^2/2=0.03125\), so we may take \(\tau=0.03125\). The Euler values are

$$ \begin{aligned} Y_0&=0,\\ Y_1&=0+0.25(0)=0,\\ Y_2&=0+0.25(0.25)=0.0625,\\ Y_3&=0.0625+0.25(0.5)=0.1875,\\ Y_4&=0.1875+0.25(0.75)=0.375. \end{aligned} $$

There are four steps. The \(L=0\) bound gives \(e_4\le e_0+4\tau=4(0.03125)=0.125\). Checking the endpoint, the exact value is \(y(1)=1^2/2=0.5\), and \(|0.5-0.375|=0.125\). Here the bound is attained.

Worked Example: Including an Initial Error

Consider \(y'=y\), with exact initial value \(y(0)=1\), on \([0,0.4]\), and use \(h=0.2\). Suppose the Euler computation instead starts from \(Y_0=1.1\). The exact solution \(y(t)=e^t\) is checked by \(y'=e^t=y\) and \(y(0)=1\). The function \(f(t,y)=y\) has Lipschitz constant \(L=1\).

On \([0,0.4]\), \(y''(t)=e^t\le e^{0.4}\). Taylor’s theorem therefore gives \(\tau\le (e^{0.4}/2)(0.2)^2\), so take \(C=e^{0.4}/2\) in \(\tau=Ch^2\). The starting error is \(e_0=|1-1.1|=0.1\), and there are two steps. The bound is

$$ \begin{aligned} e_2 &\le 1.2^2(0.1) +\left(\frac{e^{0.4}}{2}\right)(0.2)^2 \frac{1.2^2-1}{0.2}\\ &=0.144+\left(\frac{e^{0.4}}{2}\right)(0.04)(2.2)\\ &\approx 0.144+0.06564\\ &\approx 0.20964. \end{aligned} $$

For a check, Euler gives \(Y_1=1.1+0.2(1.1)=1.32\) and \(Y_2=1.32+0.2(1.32)=1.584\). The exact endpoint value is \(e^{0.4}\approx1.49182470\), so the error is approximately \(|1.49182470-1.584|=0.09217530\), below the bound. The term \(1.2^2(0.1)\) accounts for amplification of the initial error; the other term accounts for local defects.

A Common Error in Applying the Recurrence

A tempting shortcut is to say that \(n\) local defects, each no larger than \(\tau\), contribute at most \(n\tau\) to the final error. That ignores amplification. For example, consider the recurrence \(e_{k+1}\le1.5e_k+0.1\), with \(e_0=0\). The first step gives \(e_1\le0.1\). The second gives \(e_2\le1.5(0.1)+0.1=0.25\), not \(0.2\). The local defect from the first step has been carried forward and enlarged.

The correction is to retain the factor \(1+Lh\) at every step, then sum the resulting geometric series. When \(L=0\), there is no amplification factor beyond \(1\), and the simple sum \(e_0+n\tau\) is justified. For \(L>0\), the theorem’s geometric factor is the appropriate bound.

Check Your Understanding

Use the assumptions and error recurrence from this tutorial to answer the following questions.

  1. State the Lipschitz condition in the solution variable and explain why its constant must apply throughout the region of interest.
  2. If the local defects satisfy \(|\delta_{n+1}|\le\tau\), what recurrence bounds \(e_{n+1}\) in terms of \(e_n\)?
  3. Why does the finite-time bound involve a geometric sum when \(L>0\)?
  4. If \(|y''(t)|\le M\), what bound does Taylor’s theorem give for a single local defect?
  5. When \(L=0\), what bound follows after \(n\) steps, including a possible nonzero initial error?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): 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