---
title: "Existence and uniqueness for ODEs (Picard–Lindelöf)"
heading: Why a circuit's differential equation has exactly one solution
eyebrow: "A14 · Lesson 34 · Existence and uniqueness for ODEs"
xp: 40
---

::: hook
Every simulation of a circuit assumes its differential equations have a solution, and only one, for each starting state. That's not automatic: $\dot y = \sqrt{\lvert y\rvert}$ with y(0) = 0 has two different solutions, and $\dot y = y^2$ runs off to infinity in finite time. The **Picard–Lindelöf theorem** says when it's safe: if the right-hand side doesn't change faster than linearly in the state (it's Lipschitz), a unique solution exists. The proof turns the ODE into an integral equation and applies the contraction mapping theorem on a space of functions, and its iteration, Picard's method, actually builds the solution.
:::

::: play
- For $\dot y = y$, y(0) = 1, Picard's iteration $y_{n+1}(t) = 1 + \int_0^ty_n(s)\,ds$ starting from $y_0 = 1$ produces $1 + t$, then $1 + t + \frac{t^2}{2}$, and so on: the Taylor polynomials of $e^t$.
- Raise n: the iterates close in on $e^t$ uniformly on [0, 2]. The readout compares the error at t = 2 with the bound $\frac{e^2\,2^{n+1}}{(n + 1)!}$.
- Each iterate is computed from the previous one by integration alone: no derivatives, no guessing.
:::
:::

```sim plot
view: graph
x: t = 0..2
y: y = 0..8
slider: n = 1..8 step 1 = 2
plot: exp(t) | label: the solution eᵗ
plot: 1 + t + step(n - 1.5)*t^2/2 + step(n - 2.5)*t^3/6 + step(n - 3.5)*t^4/24 + step(n - 4.5)*t^5/120 + step(n - 5.5)*t^6/720 + step(n - 6.5)*t^7/5040 + step(n - 7.5)*t^8/40320 | dashed | label: Picard iterate yₙ
readout: error at t of 2 = exp(2) - (1 + 2 + step(n - 1.5)*2^2/2 + step(n - 2.5)*2^3/6 + step(n - 3.5)*2^4/24 + step(n - 4.5)*2^5/120 + step(n - 5.5)*2^6/720 + step(n - 6.5)*2^7/5040 + step(n - 7.5)*2^8/40320)
readout: bound e²·2ⁿ⁺¹/(n + 1)! = exp(2)*2^(n + 1)/(n + 1)!
```

::: predict
## $\dot y = \sqrt{y}$, y(0) = 0. Besides y = 0, which function is also a solution?

- [ ] $y = t^2$
- [x] $y = t^2/4$
- [ ] $y = e^t - 1$
- [ ] None: y = 0 is the only one

::: reveal
$y = \frac{t^2}{4}$: its derivative $\frac t2$ equals $\sqrt{t^2/4}$. Two solutions from one starting point, because $\sqrt y$ isn't Lipschitz at 0: its slope is infinite there. Picard–Lindelöf doesn't apply, and uniqueness genuinely fails.
:::
:::

::: nameit
## The setting

The initial value problem $\dot y = f(t, y)$, $y(t_0) = y_0$ is equivalent to the integral equation

$$y(t) = y_0 + \int_{t_0}^tf(s, y(s))\,ds$$

A solution is a fixed point of the **Picard operator** $(Ty)(t) = y_0 + \int_{t_0}^tf(s, y(s))\,ds$.

## The theorem

If f is continuous and **Lipschitz in y** with constant L, $\lvert f(t, y) - f(t, z)\rvert \le L\lvert y - z\rvert$, then the problem has exactly one solution on an interval around $t_0$.

On $[t_0, t_0 + h]$ with the sup norm,

$$\lVert Ty - Tz\rVert_\infty \le hL\lVert y - z\rVert_\infty$$

so T is a contraction when $hL < 1$, and the space of continuous functions with the sup norm is complete (lesson 33). Repeating the argument from the endpoint extends the solution; if f is Lipschitz for all y, it exists for all t.

## When it fails

- **Not Lipschitz:** $\dot y = \sqrt{\lvert y\rvert}$, y(0) = 0 has solutions 0 and $\frac{t^2}{4}$ (and many more).
- **Lipschitz only locally:** $\dot y = y^2$, $y(0) = y_0 > 0$, has the unique solution $\frac{y_0}{1 - y_0t}$, which blows up at $t = \frac{1}{y_0}$.

## For circuits

Linear circuits and smooth device models (diode exponentials, MOSFET square laws) are locally Lipschitz, so solutions exist and are unique as long as they stay bounded. Idealized models (a perfect switch, a perfect diode) break the hypotheses, which is one reason simulators use smooth models.
:::

::: example
## Compute the first three Picard iterates for $\dot y = y$, y(0) = 1.

::: solution
1. **Start.**
   $$y_0 = 1$$
2. **First iterate.**
   $$\begin{aligned} y_1 &= 1 + \int_0^t1\,ds \\ &= 1 + t \end{aligned}$$
3. **Second iterate.**
   $$\begin{aligned} y_2 &= 1 + \int_0^t(1 + s)\,ds \\ &= 1 + t + \frac{t^2}{2} \end{aligned}$$
4. **Third iterate.**
   $$y_3 = 1 + t + \frac{t^2}{2} + \frac{t^3}{6}$$
5. **Check at t = 1.** $y_3 = 2.6667$, against e = 2.7183.

**Answer:** $y_1 = 1 + t$, $y_2 = 1 + t + \frac{t^2}{2}$ and $y_3 = 1 + t + \frac{t^2}{2} + \frac{t^3}{6}$, which is 2.6667 at t = 1 against e = 2.7183.
:::
:::

::: example
## For $\dot y = 3\sin y + t$, on what length of interval does the Picard operator contract?

::: solution
1. **Lipschitz constant.**
   $$\lvert\partial f/\partial y\rvert = \lvert 3\cos y\rvert \le 3$$
   so L = 3.
2. **Contraction interval.** T contracts for $h < \frac13$.
3. **What that does and doesn't say.** That's only a statement about one step of the proof; since f is Lipschitz for all y, the solution exists for all t.

**Answer:** the Picard operator contracts on intervals shorter than $\frac13$.
:::
:::

::: example
## Compute three Picard iterates for $\dot y = t + y$, y(0) = 0, and compare with the solution at t = 1.

::: solution
1. **The iteration.**
   $$y_{n+1}(t) = \int_0^t(s + y_n(s))\,ds$$
2. **First iterate.** From $y_0 = 0$:
   $$y_1 = \frac{t^2}{2}$$
3. **Second iterate.**
   $$y_2 = \frac{t^2}{2} + \frac{t^3}{6}$$
4. **Third iterate.**
   $$y_3 = \frac{t^2}{2} + \frac{t^3}{6} + \frac{t^4}{24}$$
5. **Compare with the solution.** The exact solution is $e^t - 1 - t$, whose Taylor series these iterates build term by term. At t = 1, $y_3 = 0.70833$ against $e - 2 = 0.71828$.
6. **How the error shrinks.** Each iterate adds the next power, and the error shrinks like the tail of the exponential series.

**Answer:** $y_3 = \frac{t^2}{2} + \frac{t^3}{6} + \frac{t^4}{24}$, which is 0.70833 at t = 1 against the exact $e - 2 = 0.71828$.
:::
:::

::: check
given: t = 0.5 | 1 | 2; n = 2 | 3
answer: 1 + t + t^2/2 + step(n - 2.5)*t^3/6
tolerance: 0.01%

## Picard's iteration for $\dot y = y$, y(0) = 1, from $y_0 = 1$: what's $y_{\given{n}}$ at t = {t}?

::: right
Right. The degree-{n} Taylor polynomial of $e^t$: {answer}.
:::

::: misses
- [exp(t)] That's the limit; the n-th iterate stops at $t^n/n!$.
- [any] Not yet. Each iterate adds the next term $t^k/k!$.
:::
:::

::: check
given: a = 2 | 5 | 0.4
answer: 1/a
tolerance: 0.1%

## $\dot y = \given{a}\sin y + t^2$. Below what interval length h is the Picard operator a contraction?

::: right
Right. L = {a}, so hL < 1 needs $h < \frac{1}{\given{a}}$ = {answer}.
:::

::: misses
- [a] h must be below 1/L.
- [any] Not yet. Find the Lipschitz constant in y, then require hL < 1.
:::
:::

::: check
given: y0 = 0.5 | 2 | 4
answer: 1/y0
tolerance: 0.1%

## $\dot y = y^2$ with y(0) = {y0}. When does the solution blow up?

::: right
Right. $y = \frac{y_0}{1 - y_0t}$ blows up at $t = \frac{1}{y_0}$ = {answer}.
:::

::: misses
- [y0] The time is $1/y_0$: a larger start blows up sooner.
- [any] Not yet. Separate variables: $-\frac1y = t - \frac{1}{y_0}$.
:::
:::

::: check
given: t = 1 | 3 | 6
answer: t^2/4
tolerance: 0.01%

## $\dot y = \sqrt y$, y(0) = 0, has a nonzero solution. What's its value at t = {t}?

::: right
Right. $y = \frac{t^2}{4}$ = {answer}, while y = 0 is also a solution.
:::

::: misses
- [t^2] Check: the derivative of $t^2$ is 2t, but $\sqrt{t^2} = t$.
- [any] Not yet. Try $y = ct^2$ and match $2ct = \sqrt c\,t$.
:::
:::

::: check
given: h = 0.5 | 1 | 2; n = 3 | 5
answer: exp(h)*h^(n + 1)/(n + 1)!
tolerance: 0.1%

## Bound the error of Picard iterate $y_{\given{n}}$ for $\dot y = y$, y(0) = 1, at t = {h}.

::: right
Right. It's a Taylor remainder: $\frac{e^h h^{n+1}}{(n + 1)!}$ = {answer}.
:::

::: misses
- [h^(n + 1)/(n + 1)!] For t > 0 the remainder bound needs $e^t$.
- [any] Not yet. The iterate is the degree-n Taylor polynomial of $e^t$.
:::
:::

::: check
kind: choice

## Which right-hand side guarantees a unique solution through every starting point, for all time?

- [ ] $\sqrt{\lvert y\rvert}$
- [ ] $y^2$
- [x] $5\cos y - 2y + \sin t$
- [ ] $y^{1/3}$

::: misses
- [1] Not Lipschitz at y = 0: solutions branch there.
- [2] Only locally Lipschitz: solutions can blow up in finite time.
- [4] Not Lipschitz at 0, like $\sqrt y$.
:::
:::

::: check
kind: parts
given: a = 1 | 2; t = 0.5 | 1

## Picard's iteration for $\dot y = \given{a}y$, y(0) = 1, from $y_0 = 1$.

::: part
answer: 1 + a*t + (a*t)^2/2
tolerance: 0.5%

### What is $y_2$ at t = {t}?

::: misses
- [1 + a*t] That's $y_1$.
- [any] $y_2 = 1 + at + \frac{(at)^2}{2}$.
:::
:::

::: part
answer: exp(a*t) - (1 + a*t + (a*t)^2/2)
tolerance: 0.5%

### How far is it below the solution there?

::: misses
- [any] Compare with $e^{at}$.
:::
:::
:::

::: check
kind: derivation
vars: y = 0.5..3, t = 0..0.3

## $\dot y = y^2$ with $y(0) = y_0$ (write $y_0$ as y).

::: step
answer: y/(1 - y*t)

### What is the solution?
:::

::: step
answer: 1/y

### When does it blow up?
:::

::: right
Right. Picard–Lindelöf guarantees a solution only locally; this one exists until $t = 1/y_0$.
:::
:::

::: explain
## How does the contraction mapping theorem prove that an ODE has a unique solution?

::: model
Rewrite the ODE with its initial condition as the integral equation $y(t) = y_0 + \int_{t_0}^tf(s, y(s))\,ds$, and think of the right side as a map T that takes a whole function y and returns a new function. A solution is exactly a function that T leaves unchanged. If f is Lipschitz in y with constant L, then over a short interval of length h, T moves any two functions closer together by at least the factor hL; with hL < 1 it's a contraction. The continuous functions on the interval, measured by the sup norm, form a complete space, so the theorem gives exactly one fixed point, the unique solution, and the iterates of T converge to it.
:::
:::

::: practice

::: check
given: a = 0.5 | 1.5 | 2 | 4 | 8 | 10
answer: 1/a
tolerance: 0.1%

## Contraction interval for $\dot y = \given{a}\sin y + t$?

::: misses
- [any] $h < 1/L$.
:::
:::

::: check
given: y0 = 0.1 | 0.25 | 0.5 | 2 | 5 | 10
answer: 1/y0
tolerance: 0.1%

## Blow-up time of $\dot y = y^2$, y(0) = {y0}?

::: misses
- [any] $1/y_0$.
:::
:::

::: check
given: h = 1.5 | 0.25; n = 4 | 6
answer: exp(h)*h^(n + 1)/(n + 1)!
tolerance: 0.1%

## Picard error bound for $\dot y = y$, iterate {n}, at {h}?

::: misses
- [any] $\frac{e^hh^{n+1}}{(n + 1)!}$.
:::
:::
:::
