A1435 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A14 · Lesson 35 · Gronwall's inequality

How fast solutions can separate, and why that proves uniqueness and bounds numerical error

Picard–Lindelöf (lesson 34) says a solution exists and is unique. Engineers also need to know how much the solution changes when the starting value is a little off, when the model has a small error, or when a numerical method commits a small error at every step. Gronwall's inequality answers all three with one estimate: errors can grow no faster than eLt, where L is the Lipschitz constant of the right-hand side. For stable systems a sharper version shows errors shrinking instead.

  • The curves start a distance d apart and both obey a linear ODE y˙=ky. Their gap is exactly dekt.
  • With k > 0 the gap grows exponentially, and Gronwall's bound with L = k is sharp. With k < 0 the gap shrinks.
  • The readout gives the time for the gap to grow a thousandfold, ln⁡1000k, when k > 0: in chaotic systems this "predictability horizon" is why forecasts fail beyond a few multiples of 1/L.

Predict

Two solutions of y˙=sin⁡y+t start 0.01 apart. What's the most they can differ at t = 3?

Name it

The inequality

If u is continuous and nonnegative with u(t)≤a+∫0tbu(s)ds for constants a, b ≥ 0, then u(t)≤aebt. In differential form: u˙≤bu implies u(t)≤u(0)ebt, since ddt(ue−bt)≤0.

Continuous dependence and uniqueness

If |f(t,y)−f(t,z)|≤L|y−z|, two solutions satisfy

|y(t)−z(t)|≤|y(0)−z(0)|eLt.

With equal starts the gap stays 0: that's uniqueness. With different starts, the solution depends continuously on its initial value, though the constant eLt can be enormous on long intervals.

Model errors

If z instead solves z˙=f(t,z)+δ(t) with |δ|≤δ0, then

|y(t)−z(t)|≤|y(0)−z(0)|eLt+δ0L(eLt−1).

Numerical error

Euler's method commits a local error of about h22max⁡|y¨| per step, which acts like a model error δ0=h2M. So its global error over [0, T] is at most hM2L(eLT−1): first order in h, with a constant set by Gronwall.

Stable systems

If instead (f(t,y)−f(t,z))(y−z)≤−μ(y−z)2 with μ > 0 (a contracting, one-sided condition), gaps shrink: |y−z|≤|y(0)−z(0)|e−μt, and bounded model errors give bounded deviations, at most δ0μ. That's why stable circuits forgive small errors.

Worked example

Bound the gap at t = 3 between two solutions of y˙=sin⁡y+t that start 0.01 apart.

Show the solution
  1. Lipschitz constant. |∂∂y(sin⁡y+t)|=|cos⁡y|≤1 so L = 1.
  2. Apply Gronwall. |y(3)−z(3)|≤0.01e3=0.201
  3. How sharp it is. The bound holds for every pair of solutions and every t, but it can be pessimistic: where cos⁡y<0 along the solutions, the gap actually shrinks. Gronwall uses only the worst case of the Lipschitz constant, which is what makes it universal.

Answer the gap at t = 3 is at most 0.201.

Worked example

Bound the global error of Euler's method with h = 0.01 on y˙=−y+sin⁡t over [0, 1], given |y¨|≤3 there.

Show the solution
  1. The constants. L = 1 and M = 3.
  2. The plain bound. 0.01×32×1(e1−1)=0.015×1.718=0.026
  3. Why it's pessimistic. The actual error is far smaller, because the system contracts (the −y term pulls solutions together), and the plain Gronwall bound can't see that.
  4. The one-sided bound. With the one-sided version (μ = 1), each local error is damped instead of amplified, and the bound becomes hM2μ(1−e−T)=0.0095

Answer the plain Gronwall bound is 0.026, and the one-sided version tightens it to 0.0095.

Worked example

A circuit obeys v˙=−2v+u(t), and the input has an unmodeled error of at most 0.1. How far can the response stray from the model's?

Show the solution
  1. The deviation's equation. The system contracts with μ = 2. Starting from the same state, the deviation e satisfies e˙=−2e+δ
  2. Bound it. |e(t)|≤0.12(1−e−2t) which is 0.0499 at t = 3 and never exceeds 0.05.
  3. Compare plain Gronwall. With L = 2 it would allow 0.12(e2t−1), about 20 at t = 3.
  4. Which to use. For stable systems, use the contracting version: it gives bounds that stay bounded.

Answer the response never strays more than 0.05 from the model's (0.0499 at t = 3).

Check

Two solutions of an ODE with Lipschitz constant 0.5 start 0.001 apart. What's the largest possible gap at t = 5?

Check

A model's right-hand side is off by at most 0.01, and its Lipschitz constant is 1. Starting from the exact state, how far can its solution drift by t = 2?

Check

Bound Euler's global error with h = 0.01 over [0, 3], with Lipschitz constant 2 and |y¨|≤ 2.

Check

A system contracts with rate μ = 1. Two solutions start 0.1 apart. What bound holds on their gap at t = 3?

Check

An error grows like eLt with L = 1. How long until it's 1000 times larger?

Check

A stable circuit obeys v˙=−2v+u, and u is off by at most 0.1.

(a)

Starting from the right state, how far can v stray by t = 5?

(b)

What's the most it can ever stray?

Check

What does Gronwall's inequality give when two solutions of a Lipschitz ODE start at the same point?

Check

Solve the comparison equations behind Gronwall's inequality.

Step 1

If w˙=bw with w(0)=u, what is w(t)?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Check

Solve y˙=−y+sin⁡t, y(0) = 0, to t = 1 by Euler's method with h = 0.01. Set err to its error against the exact y=12e−t+sin⁡t−cos⁡t2, and bound to Gronwall's hM2L(eL−1) with L = 1, M = 3.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Explain why

Why does a Lipschitz condition make solutions separate at most exponentially?

Practice

Keep practicing

8 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.