First-Order ODEs: Existence, Stability and Explicit Solutions
Pages 3 and 4 of the class notes, in their order: initial value problems and Picard's theorem, autonomous equations and the stability of their stationary points, and three methods that give explicit solutions (separation of variables, the integrating factor and exact equations), with every example of the notes solved step by step. Robinson formalises each step; material beyond the notes is labelled as a complement.
A differential equation alone has many solutions: $\dot x = \lambda x$ is solved by $Ae^{\lambda t}$ for every constant $A$. One extra piece of information, the state at one instant, selects one of them.
An IVP for a first-order ODE is
$$\begin{cases} y'(x) = f\big(x, y(x)\big),\\[2pt] y(x_0) = y_0. \end{cases}$$We are looking for the existence of a solution as well as the uniqueness of the solution.
Reading note: the first line of p. 3 writes the initial condition as $y(a_0) = x_0$; the statement of Picard's theorem a few lines below writes $y(x_0) = y_0$, which is the form used here.
The notes use $x$ as the independent variable and $y$ as the unknown. Robinson writes the same problem with time $t$ and unknown $x(t)$; both forms appear below and mean the same thing.
An initial value problem is a differential equation together with an initial condition:
$$\frac{dx}{dt} = f(x, t), \qquad x(t_0) = x_0. \tag{6.2}$$Given an open interval $I$ that contains $t_0$, a solution of (6.2) on $I$ is a differentiable function $x(t)$ defined on $I$ with $x(t_0) = x_0$ and $\dot x(t) = f(x(t), t)$ for all $t \in I$.
The definition deliberately allows a solution to live on a limited interval $I$ rather than on all of $\mathbb R$. Section 3 shows that this is unavoidable even for very simple equations.
1.1 Complement (Robinson): the philosophy of a well-posed problem
A mathematical model is called well posed if
- a solution exists (otherwise the model predicts nothing);
- the solution is unique (otherwise the model cannot decide between futures);
- the solution depends continuously on the data (a small error in the measured $x_0$ produces a small error in $x(t)$, at least over finite times).
The words "well-posed" and "Picard's theorem" are lecture terminology; Robinson never uses them. He discusses existence and uniqueness in Sec. 6.1 and states the result as Theorem 6.2 (lecture map, notes on differences).
Robinson gives the physical reading of uniqueness: if $t$ is time and the initial condition is specified "now", a unique solution means the equation can be used to predict the future; uniqueness is equivalent to the model being deterministic [p. 39]. It also legitimises guessing: if a guessed function satisfies the IVP, it is the solution.
1.2 Complement (Robinson): existence is not automatic
Evaluate the equation at $t = 0$: the second term vanishes and $x(0)^2 = 0$, i.e. $x(0) = 0$. This contradicts $x(0) = c \neq 0$, so no differentiable solution exists. The culprit is visible in the explicit form $\dot x = -x^2/t^2$: the right-hand side is not even defined at $t = 0$.
2. Picard's existence and uniqueness theorem
Let $f$ and $\dfrac{\partial f}{\partial y}$ be continuous functions of $x$ and $y$ near the initial value $(x_0, y_0)$, with $y_0 = y(x_0)$. Then there exists $h > 0$ such that the IVP
$$\begin{cases} y'(x) = f\big(x, y(x)\big),\\[2pt] y(x_0) = y_0 \end{cases}$$has a unique solution for $|x - x_0| < h$.
Robinson states the same theorem with $t$ as the independent variable and $x$ as the unknown, so the derivative that must be continuous is $\partial f/\partial x$, and the interval $|x - x_0| < h$ of the notes becomes "some open interval $I$ containing $t_0$".
If $f(x, t)$ and $\dfrac{\partial f}{\partial x}(x, t)$ are continuous for $a < x < b$ and $c < t < d$, then for any $x_0 \in (a, b)$ and $t_0 \in (c, d)$ the initial value problem
$$\frac{dx}{dt} = f(x, t), \qquad x(t_0) = x_0$$has a unique solution on some open interval $I$ containing $t_0$.
Three features deserve attention:
- The hypothesis is easy to check: continuity of $f$ and of one partial derivative, in a rectangle around $(x_0, t_0)$.
- The derivative is with respect to the unknown $x$, not $t$. Nothing is required of $\partial f/\partial t$.
- The conclusion is local: it says nothing about how large $I$ is (Robinson Fig. 6.2). Section 3 shows that $I$ can indeed be short.
2.1 Complement (Robinson): the Lipschitz condition
$f$ is Lipschitz continuous in $x$ if there is a constant $L$ such that
$$|f(x, t) - f(y, t)| \leq L\,|x - y| \tag{6.5}$$for all $x, y$ in the region considered. Robinson notes that this weaker hypothesis already suffices for Theorem 6.2.
If $f$ is differentiable in $x$ with $\left|\dfrac{\partial f}{\partial x}\right| \leq L$ for $a \le x \le b$, then $|f(x,t) - f(y,t)| \le L|x - y|$ there.
Fix $t$ and $a \le y < x \le b$. By the Mean Value Theorem there is $\xi \in (y, x)$ with $f(x,t) - f(y,t) = (x - y)\,\dfrac{\partial f}{\partial x}(\xi, t)$. Taking absolute values and using the bound, $|f(x,t) - f(y,t)| = |x - y|\,\left|\dfrac{\partial f}{\partial x}(\xi,t)\right| \le L\,|x - y|$. The case $x = y$ is trivial, and $x < y$ follows by symmetry.
A continuous function on a closed bounded rectangle is bounded, so the hypothesis of Theorem 6.2 gives $|\partial f/\partial x| \le L$ on any closed sub-rectangle, and hence a Lipschitz bound. The converse is false: $f(x) = |x|$ is Lipschitz with $L = 1$ (because $\big||x| - |y|\big| \le |x - y|$) but not differentiable at $0$.
2.2 Complement (Robinson): proof of uniqueness and of continuous dependence
Robinson leaves the proofs as guided exercises. The uniqueness argument (Exercise 6.3) is short, and the same estimate also delivers the third Hadamard condition.
Suppose $|f(x,t) - f(y,t)| \le L|x - y|$ and let $x(t)$, $y(t)$ solve $\dot x = f(x, t)$ with $x(t_0) = x_0$, $y(t_0) = y_0$. Then for $t \ge t_0$
$$|x(t) - y(t)| \le |x_0 - y_0|\,e^{L(t - t_0)}.$$In particular, if $x_0 = y_0$ then $x(t) = y(t)$: the solution is unique.
- Let $z(t) = x(t) - y(t)$. Subtracting the two equations: $\dot z = f(x(t),t) - f(y(t),t)$.
- Let $Z(t) = z(t)^2 = |z|^2$. By the chain rule with outer function $u \mapsto u^2$: $$\frac{dZ}{dt} = 2z\,\frac{dz}{dt} = 2z\,\big[f(x,t) - f(y,t)\big].$$
- Bound it with the Lipschitz condition: $\ \dfrac{dZ}{dt} \le 2|z|\,|f(x,t) - f(y,t)| \le 2|z|\cdot L|z| = 2L\,Z$.
- Multiply by the positive factor $e^{-2Lt}$ and use the product rule: $$\frac{d}{dt}\Big(e^{-2Lt}Z\Big) = e^{-2Lt}\dot Z - 2Le^{-2Lt}Z = e^{-2Lt}\big(\dot Z - 2LZ\big) \le 0.$$
- A function with non-positive derivative is non-increasing, so for $t \ge t_0$: $e^{-2Lt}Z(t) \le e^{-2Lt_0}Z(t_0)$, i.e. $Z(t) \le Z(t_0)\,e^{2L(t - t_0)}$. Taking square roots: $|z(t)| \le |z(t_0)|\,e^{L(t - t_0)}$.
- If $x_0 = y_0$ then $z(t_0) = 0$, so $|z(t)| \le 0$ and $x(t) = y(t)$ for all $t \ge t_0$.
Interpretation. Two solutions that start $\varepsilon$ apart remain within $\varepsilon e^{L(t-t_0)}$ of each other: the error can grow, but at most exponentially, and it tends to zero with $\varepsilon$ on any finite time interval. This is exactly continuous dependence on the initial data. For $\dot x = \lambda x$ with $\lambda \ge 0$ (so $L = \lambda$) the bound is attained: $|x(t) - y(t)| = |x_0 - y_0|e^{\lambda(t-t_0)}$; for $\lambda < 0$ the solutions actually approach each other.
2.3 Complement (Robinson): idea of the existence proof, Picard iteration
Existence is harder than uniqueness. Robinson's Exercise 6.4 sketches it for $\dot x = f(x)$, $x(0) = x_0$ [pp. 44–45].
- Integral form. Integrating the ODE from $0$ to $t$ (Barrow: $\int_0^t \dot x\,d\tilde t = x(t) - x(0)$) gives the equivalent integral equation $$x(t) = x_0 + \int_0^t f\big(x(\tilde t)\big)\,d\tilde t. \tag{E6.5}$$ Conversely, differentiating (E6.5) with the Fundamental Theorem of Calculus returns $\dot x = f(x)$, and $t = 0$ returns $x(0) = x_0$.
- Iteration. Start from the constant guess $x_0(t) = x_0$ and improve it repeatedly: $$x_{n+1}(t) = x_0 + \int_0^t f\big(x_n(\tilde t)\big)\,d\tilde t. \tag{E6.6}$$
- Contraction. Using (E6.4) $|f(x) - f(y)| \le L|x - y|$, for $0 \le t \le 1/(2L)$: $$|x_{n+1}(t) - x_n(t)| \le \int_0^t L\,|x_n - x_{n-1}|\,d\tilde t \le L\,t\,\max|x_n - x_{n-1}| \le \tfrac12\max|x_n - x_{n-1}|. \tag{E6.7}$$ Each step halves the maximum difference, so the differences shrink like $2^{-n}$ and $x_n(t)$ converges to some $x_\infty(t)$.
- Limit. Letting $n \to \infty$ in (E6.6) shows that $x_\infty$ satisfies (E6.5), so it solves the IVP; the previous proposition shows it is the only one.
Here $f(x) = x$ and $L = 1$. Each iterate integrates the previous one:
$$x_1 = 1 + \int_0^t 1\,d\tilde t = 1 + t, \qquad x_2 = 1 + \int_0^t (1 + \tilde t)\,d\tilde t = 1 + \Big[\tilde t + \tfrac{\tilde t^2}{2}\Big]_0^t = 1 + t + \frac{t^2}{2},$$ $$x_3 = 1 + \Big[\tilde t + \tfrac{\tilde t^2}{2} + \tfrac{\tilde t^3}{6}\Big]_0^t = 1 + t + \frac{t^2}{2} + \frac{t^3}{6}, \qquad\dots,\qquad x_n = \sum_{j=0}^{n}\frac{t^j}{j!} \;\longrightarrow\; e^t.$$3. Complement: when the theorem fails or stops short
The class notes state Picard's theorem without counterexamples. Robinson's examples show why each hypothesis is there and why the conclusion is only local.
3.1 Loss of uniqueness: $\dot x = \sqrt{x}$
Robinson's example [Eq. (6.3), p. 39]:
$$\frac{dx}{dt} = \sqrt{x}, \qquad x(0) = 0. \tag{6.3}$$The obvious solution is $x(t) \equiv 0$. But for any $c > 0$ the function $$x_c(t) = \begin{cases} 0, & t \le c,\\[2pt] \dfrac{(t - c)^2}{4}, & t > c\end{cases}$$ is also a solution. Check for $t > c$ (chain rule with inner function $t - c$): $\dot x_c = \dfrac{2(t - c)}{4}\cdot 1 = \dfrac{t - c}{2}$, while $\sqrt{x_c} = \sqrt{(t-c)^2/4} = \dfrac{|t - c|}{2} = \dfrac{t - c}{2}$ ✓. At $t = c$ both one-sided derivatives are $0$, so $x_c$ is differentiable there. The solution "waits" at $0$ and then "decides" at the arbitrary time $c$ to leave [p. 39]: the model is not deterministic.
Why Theorem 6.2 does not apply. $f(x) = x^{1/2}$ is continuous, but $f'(x) = \tfrac12 x^{-1/2} \to \infty$ as $x \downarrow 0$, so $\partial f/\partial x$ is not continuous at the initial point $x_0 = 0$ [p. 40; Fig. 6.3, p. 41]. Nor is $f$ Lipschitz near $0$: $\dfrac{|f(x) - f(0)|}{|x - 0|} = \dfrac{\sqrt x}{x} = \dfrac{1}{\sqrt x} \to \infty$ as $x \downarrow 0$, so no constant $L$ works. Note the logic: the theorem gives a sufficient condition; its failure here is consistent with the non-uniqueness, not a proof of it — the explicit family $x_c$ is the proof.
With $x(0) = 0$, $x \equiv 0$ is a solution. Separating the variables for $x > 0$: $x^{-1/3}dx = dt$. An antiderivative of $x^{-1/3}$ is $\tfrac32 x^{2/3}$, so integrating from the time $c$ at which $x$ leaves $0$:
$$\Big[\tfrac32 x^{2/3}\Big]_{0}^{x(t)} = \big[\tilde t\,\big]_c^t \;\Longrightarrow\; \tfrac32 x(t)^{2/3} = t - c \;\Longrightarrow\; x(t) = \left(\frac{2(t - c)}{3}\right)^{3/2},\quad t \ge c.$$Check: $\dot x = \tfrac32\left(\tfrac{2(t-c)}{3}\right)^{1/2}\cdot\tfrac23 = \left(\tfrac{2(t-c)}{3}\right)^{1/2} = x^{1/3}$ ✓. Again infinitely many solutions (and their mirror images $-x$), because $f'(x) = \tfrac13 x^{-2/3}$ blows up at $x = 0$.
3.2 Finite-time blow-up: $\dot x = x^2$
Robinson's second cautionary example [Sec. 6.3, Eq. (6.6), p. 41]:
$$\frac{dx}{dt} = x^2, \qquad x(0) = x_0. \tag{6.6}$$Here $f(x) = x^2$ and $f'(x) = 2x$ are continuous everywhere, so Theorem 6.2 guarantees a unique solution near $t = 0$ for every $x_0$. For $x_0 \neq 0$ the solution is [Eq. (6.7), p. 42]
$$x(t) = \frac{1}{x_0^{-1} - t}. \tag{6.7}$$Verification. At $t = 0$, $x = 1/x_0^{-1} = x_0$ ✓. Write $x = u^{-1}$ with $u(t) = x_0^{-1} - t$, $du/dt = -1$. Chain rule: $$\frac{dx}{dt} = \frac{d}{du}\big(u^{-1}\big)\cdot\frac{du}{dt} = \big(-u^{-2}\big)\cdot(-1) = \frac{1}{(x_0^{-1} - t)^2} = x(t)^2\ ✓.$$ By uniqueness this is the solution. (Section 6.2 derives it by separation of variables, Robinson Example 8.1.)
- $x_0 > 0$: the denominator $x_0^{-1} - t$ decreases to $0$ at $t^* = 1/x_0$, so $x(t) \to +\infty$ as $t \uparrow 1/x_0$: the solution blows up in finite time. Backwards in time it decays to $0$. Maximal interval of existence: $(-\infty, 1/x_0)$.
- $x_0 < 0$: the blow-up happens in the past, $x \to -\infty$ as $t \downarrow 1/x_0 < 0$. Maximal interval: $(1/x_0, +\infty)$.
- $x_0 = 0$: $x \equiv 0$, defined for all $t \in \mathbb R$.
$f(x) = x^2$ is as smooth as a function can be, yet solutions do not exist for all time. The reason is that $f$ is Lipschitz on every bounded interval but not on all of $\mathbb R$: $|x^2 - y^2| = |x + y|\,|x - y|$ and $|x + y|$ is unbounded. Fast growth ($\dot x \sim x^2$) feeds on itself. Compare $\dot x = |x|$, whose solutions $x_0e^{t}$ (for $x_0 > 0$) exist forever although its phase line looks identical (Robinson Sec. 7.5.3).
3.3 Summary of the failure modes
| Equation | Hypotheses of Thm 6.2 | What happens | Lesson |
|---|---|---|---|
| $x^2 + t^2\dot x = 0,\ x(0) = c \ne 0$ | $f = -x^2/t^2$ undefined at $t = 0$ | No solution | Existence can fail |
| $\dot x = \sqrt x,\ x(0) = 0$ | $\partial f/\partial x$ infinite at $x = 0$ | Infinitely many solutions | Uniqueness needs Lipschitz |
| $\dot x = x^{1/3},\ x(0) = 0$ | $\partial f/\partial x$ infinite at $x = 0$ | Infinitely many solutions | Same as above |
| $\dot x = x^2,\ x(0) = x_0 > 0$ | Satisfied everywhere | Unique, but blows up at $t = 1/x_0$ | The theorem is only local |
It is still not known whether the three-dimensional Navier–Stokes equations have unique solutions that exist for all positive times. Every CFD computation of a wing or an engine assumes they do, yet one cannot prove that a numerical approximation is close to the "true solution" without knowing that such a solution exists. The question is one of the Clay Mathematics Institute's seven Millennium Prize Problems: prove global existence and uniqueness, or find one initial condition for which the solution breaks down.
4. Autonomous first-order ODEs and stationary points
4.1 Autonomous equations
A first-order ODE $x'(t) = f$ is autonomous when $f$ only depends on the dependent variable $x$:
- $x'(t) = \big(x(t)\big)^3$ is autonomous, because $f(x) = x^3$ does not depend directly on $t$;
- $x'(t) = t^2\,x(t)$ is not autonomous, because $f(x, t) = t^2x$.
For a general first-order equation we will look for explicit formulas. For the special class of autonomous equations
$$\frac{dx}{dt} = f(x) \tag{7.1}$$there is a faster and completely rigorous alternative: describe how the solutions behave ("every solution starting between 0 and 1 tends to 1") without writing them down. The method only needs the sign of $f$ [Robinson, Ch. 7 intro, p. 46].
4.2 Stationary points and their stability
Stationary points are the points $x$ where $f(x) = 0$.
- If $f(x) = 0$ and $f'(x) > 0$, then $x$ is unstable.
- If $f(x) = 0$ and $f'(x) < 0$, then $x$ is a stable stationary point.
A stationary point $x^*$ gives a constant solution: if $x(0) = x^*$, then $x'(0) = f(x^*) = 0$ and, by uniqueness (Section 2), $x(t) \equiv x^*$ for all $t$. Robinson's treatment makes each part of the criterion precise.
By Theorem 6.2 (Section 2), if $f$ and $f'$ are continuous, a solution of (7.1) is completely determined by its value at any one time. Think of $x(t)$ as the position of a particle moving on a line, with velocity $\dot x = f(x)$ that depends only on where the particle is [Sec. 7.1, p. 46].
A stationary point of (7.1) is a value $x^*$ with $f(x^*) = 0$. The constant function $x(t) \equiv x^*$ is then a solution, since $\dot x = 0 = f(x^*)$. (Other names: equilibrium point, critical point, fixed point; Robinson reserves the last two for other meanings.)
- Where $f(x) > 0$, $\dot x > 0$: $x(t)$ increases and the particle moves right.
- Where $f(x) < 0$, $\dot x < 0$: $x(t)$ decreases and the particle moves left.
If $f$ and $f'$ are continuous, a non-constant solution of $\dot x = f(x)$ cannot change direction and cannot cross or reach a stationary point.
Suppose the solution reversed direction at some time $t^*$. Then it is instantaneously at rest, $\dot x(t^*) = f(x(t^*)) = 0$, so $x^* = x(t^*)$ is a stationary point. But $x(t) \equiv x^*$ is also a solution through the same point at the same time, and by uniqueness the two solutions coincide: the particle never moved, a contradiction. The same argument rules out reaching a stationary point at any finite time. So $\dot x = f(x(t))$ never vanishes, and by continuity it keeps one sign: $x(t)$ is strictly monotone.
- $x^*$ is stable if for every $\varepsilon > 0$ there is a $\delta > 0$ such that $$|x_0 - x^*| < \delta \;\Longrightarrow\; |x(t) - x^*| < \varepsilon \quad\text{for all } t \ge 0. \tag{7.2}$$ "Start close enough and you stay close."
- $x^*$ is attracting if there is a $\delta > 0$ such that $$|x_0 - x^*| < \delta \;\Longrightarrow\; x(t) \to x^* \ \text{ as } t \to +\infty. \tag{7.3}$$
- $x^*$ is unstable if it is not stable: there is an $\varepsilon > 0$ such that for every $\delta > 0$ some $x_0$ with $|x_0 - x^*| < \delta$ gives $|x(t) - x^*| > \varepsilon$ for some $t > 0$.
In one dimension attracting implies stable (Exercise 7.9), but stable does not imply attracting. Robinson's counterexample is $\dot x = -x$ for $x < 0$, $\dot x = 0$ for $0 \le x \le 1$, $\dot x = 1 - x$ for $x > 1$: every point of $[0,1]$ is stationary and stable, but none is attracting, because nearby points in $[0,1]$ do not move at all [p. 48; Fig. 7.3, p. 49].
Let $f(x^*) = 0$ with $f$ continuously differentiable.
- If $f'(x^*) < 0$, then $x^*$ is stable (in fact attracting).
- If $f'(x^*) > 0$, then $x^*$ is unstable.
- If $f'(x^*) = 0$, the test is inconclusive: the point may be stable, unstable, or semi-stable (stable on one side, unstable on the other) [Fig. 7.6, p. 50].
Why it works (graphical argument, as in the book). If $f'(x^*) < 0$, the graph of $f$ crosses zero going downwards: $f > 0$ just to the left of $x^*$ and $f < 0$ just to the right. Both arrows point towards $x^*$. If $f'(x^*) > 0$ the signs are reversed and both arrows point away.
Why it works (linearisation — complementary derivation). Write $x(t) = x^* + \xi(t)$ with a small perturbation $\xi$. Since $x^*$ is constant, $\dot x = \dot\xi$. Taylor's theorem gives $f(x^* + \xi) = f(x^*) + f'(x^*)\,\xi + O(\xi^2) = f'(x^*)\,\xi + O(\xi^2)$. Dropping the quadratic term,
$$\dot\xi \approx f'(x^*)\,\xi \quad\Longrightarrow\quad \xi(t) \approx \xi(0)\,e^{f'(x^*)\,t}.$$The perturbation decays if $f'(x^*) < 0$ and grows if $f'(x^*) > 0$. The quantity $1/|f'(x^*)|$ is the time scale of the approach or departure. When $f'(x^*) = 0$ the linear term vanishes and the neglected $O(\xi^2)$ terms decide, which is why the test is then silent.
4.3 Reading the phase line: the sketch of the notes
The notes draw a function $f$ whose graph is an arch (a downward parabola) with two zeros $\underline x < \overline x$: $f > 0$ between them and $f < 0$ outside [Notes, p. 3]. For $x'(t) = f\big(x(t)\big)$:
- If $x_0 = \underline x$, then $x'(0) = f(\underline x) = 0$; if $x_0 = \overline x$, then $x'(0) = f(\overline x) = 0$. The solution stays where it started.
- If $\underline x < x_0 < \overline x$, then $f(x_0) > 0$, so $x' > 0$: the solution moves right.
- If $x_0 < \underline x$ or $x_0 > \overline x$, then $f(x_0) < 0$, so $x' < 0$: the solution moves left.
Both arrows next to $\underline x$ point away from it: point 1 is unstable, since $f'(\underline x) > 0$ (the arch goes up through its left zero). Both arrows next to $\overline x$ point towards it: point 2 is stable, since $f'(\overline x) < 0$. For a concrete arch $f(x) = (x - \underline x)(\overline x - x)$, the product rule gives $f'(x) = (\overline x - x) - (x - \underline x)$, so $f'(\underline x) = \overline x - \underline x > 0$ and $f'(\overline x) = -(\overline x - \underline x) < 0$, as the picture says.
The same procedure works for any $f$ (Robinson's recipe):
- Sketch the graph of $f(x)$ against $x$ (only its sign matters).
- Mark the zeros $x^*$ of $f$ on a horizontal line: these are the stationary points.
- On each interval between stationary points draw an arrow to the right if $f > 0$ there and to the left if $f < 0$.
- Read off the behaviour: a solution moves in the direction of the arrow and, being monotone, either tends to the next stationary point or to $\pm\infty$ (Robinson Exercise 7.10).
The resulting picture is the phase diagram (or phase portrait) [p. 47, Figs. 7.1–7.2].
$f(x) = -x(1-x)(2-x) = -(x^3 - 3x^2 + 2x)$, so $f'(x) = -(3x^2 - 6x + 2)$. Then $f'(0) = -2 < 0$ (stable), $f'(1) = -(3 - 6 + 2) = 1 > 0$ (unstable), $f'(2) = -(12 - 12 + 2) = -2 < 0$ (stable), in agreement with the arrows.
4.4 Concrete example: the logistic equation
With constants $k, M > 0$:
$$\begin{cases} x'(t) = kx\left(1 - \dfrac{x}{M}\right) = kx - \dfrac{k}{M}x^2 \quad\text{(non-linear)},\\[6pt] x(0) = x_0 \ge 0. \end{cases}$$This is the logistic correction of the population model of Topic 1, Section 5.4: for $x \ll M$ the term $\tfrac{k}{M}x^2$ is negligible and $x' \approx kx$; as $x$ approaches $M$ the growth rate falls to zero [Robinson, Sec. 8.5, Eq. (8.12), p. 66].
- Critical points. $f(x) = kx(1 - x/M) = 0$ gives $x = 0$ and $x = M$.
- Derivative. From $f(x) = kx - \frac{k}{M}x^2$: $\ f'(x) = k - \dfrac{2k}{M}x$.
- At $x = 0$: $f'(0) = k - 0 = k > 0$, so $x = 0$ is unstable.
- At $x = M$: $f'(M) = k - 2k = -k < 0$, so $x = M$ is stable.
The notes sketch the solution curves $x(t)$ against $t$: each curve is a solution of the ODE. Point $0$ is unstable because a slight variation goes to $M$; if $x_0 = 0$, $x$ stays at $0$; if $x_0 \neq 0$, $x$ ends up at $M$ [Notes, p. 3]. Near $M$ the linearisation of Section 4.2 gives $\xi(t) \approx \xi(0)e^{-kt}$: the population relaxes to $M$ on the time scale $1/k$. The phase line alone cannot give $k$ or $M$ from data; that needs the explicit solution of Section 6.3.
For downward speed $v > 0$: $\dot v = f(v) = g - (k/m)v^2$. The unique positive stationary point is $v^* = \sqrt{mg/k}$, and $f'(v) = -2kv/m$, so $f'(v^*) = -2\sqrt{gk/m} < 0$: terminal velocity is stable and attracts every initial speed. The explicit $\tanh$ solution is derived in Topic 1, Section 6.5.
$\dot x = |x|$ and $\dot x = x^2$ have the same phase diagram (one semi-stable point at $0$, arrows pointing right everywhere). But for $x_0 > 0$ the first gives $x = x_0e^t$, defined for all time, while the second gives $x = 1/(x_0^{-1} - t)$, which blows up at $t = 1/x_0$. The phase line captures the direction of motion, not its speed.
5. Complement: structural stability and bifurcations
Models contain parameters (a growth rate, a load, a drag coefficient) that are never known exactly. It matters whether a small change in a parameter changes the picture qualitatively.
If a small change to $f$ changes the phase diagram drastically, the equation has undergone a bifurcation. If no small change to $f$ can change the qualitative phase diagram, $\dot x = f(x)$ is structurally stable.
If $f'(x^*) \neq 0$, a small change to $f$ (for instance adding a small constant, which shifts the graph up or down) still leaves a nearby zero with the same sign of slope, hence a nearby stationary point of the same type (Exercise 7.11). So a bifurcation near $x^*$ requires $f'(x^*) = 0$ — exactly the degenerate case of the derivative test.
5.1 The pitchfork bifurcation
Robinson's worked example [Sec. 7.6, Eq. (7.6), pp. 54–56]:
$$\dot x = x\,(k - x^2), \qquad f(x) = kx - x^3, \qquad f'(x) = k - 3x^2.$$- $k < 0$: $k - x^2 < 0$ for every $x$, so the only stationary point is $x^* = 0$, with $f'(0) = k < 0$: stable.
- $k = 0$: $f(x) = -x^3$ and $f'(0) = 0$ — the test fails. The sign of $f$ ($> 0$ for $x < 0$, $< 0$ for $x > 0$) shows $0$ is still stable. The vanishing derivative signals a possible bifurcation.
- $k > 0$: three stationary points $x^* = 0, \pm\sqrt k$. $f'(0) = k > 0$: unstable. $f'(\pm\sqrt k) = k - 3k = -2k < 0$: both stable.
The pitchfork is the generic picture of symmetric buckling: a slender strut under axial load stays straight ($x^* = 0$) below the critical load and, above it, the straight state becomes unstable and the strut deflects to one of two mirror-image positions $\pm\sqrt k$. Which one is chosen depends on imperfections — the same sensitivity that makes $k = 0$ structurally unstable.
5.2 Saddle-node and transcritical bifurcations (Exercises 7.5 and 7.6)
- Saddle-node: $\dot x = x^2 - k$. For $k < 0$ there are no stationary points; for $k > 0$ there are two, $x^* = \pm\sqrt k$, with $f'(x) = 2x$: $-\sqrt k$ stable ($f' = -2\sqrt k$), $+\sqrt k$ unstable. They are born together at $k = 0$.
- Transcritical: $\dot x = kx - x^2 = x(k - x)$, stationary points $0$ and $k$, $f'(x) = k - 2x$. Then $f'(0) = k$ and $f'(k) = -k$: for $k < 0$, $0$ is stable and $k$ unstable; for $k > 0$ the roles swap. The two points exchange stability as they cross.
6. Explicit solutions (1): separable equations
The second half of p. 3 of the class notes is headed "Explicit solutions to some first-order ODEs": three methods that produce formulas, each for a particular class of equations. The first is separation of variables (the notes refer to Sheet 2, Exercises 4–6).
If $f \neq 0$ (never zero), divide both sides by $f$, separating $x$ and $t$, and integrate from $t_0$ to $t$:
$$\int_{t_0}^{t}\frac{x'(\tau)}{f\big(x(\tau)\big)}\,d\tau = \int_{t_0}^{t} g(\tau)\,d\tau.$$On the left substitute $u = x(\tau)$, $du = x'(\tau)\,d\tau$; the limits $\tau = t_0$ and $\tau = t$ become $u = x_0$ and $u = x(t)$:
$$\int_{x_0}^{x(t)}\frac{du}{f(u)} = \int_{t_0}^{t} g(\tau)\,d\tau.$$This is Robinson's formula (8.3); his definition and recipe follow.
The right-hand side is a product of a function of $x$ only and a function of $t$ only. Autonomous equations ($g \equiv 1$) and "trivial" equations $\dot x = g(t)$ ($f \equiv 1$) are special cases.
6.1 Why dividing by $f$ is legitimate
"If $f \neq 0$ (never)": by Picard's theorem a solution that touches a zero $x^*$ of $f$ at one time is the constant $x \equiv x^*$ for all time. So either $f\big(x(t)\big) = 0$ for every $t$ (a constant solution, to be listed separately) or $f\big(x(t)\big) \neq 0$ for every $t$, and the division is allowed. Robinson's proof that the recipe is correct:
- Constant solutions first. If $f(x(s)) = 0$ at some time $s$, then $x(t) \equiv x(s)$ solves the equation ($\dot x = 0 = f(x(s))g(t)$), and by uniqueness it is the solution. So either $f(x(t)) = 0$ for every $t$, or $f(x(t)) \neq 0$ for every $t$. These constant solutions are lost when dividing by $f$ and must be listed separately.
- In the second case divide: $\ \dfrac{1}{f(x)}\dfrac{dx}{dt} = g(t)$ (8.8).
- Let $H$ be an antiderivative of $1/f$, $H'(x) = 1/f(x)$. By the chain rule $$\frac{d}{dt}H\big(x(t)\big) = H'\big(x(t)\big)\,\frac{dx}{dt} = \frac{1}{f(x)}\frac{dx}{dt} = g(t).$$
- Let $G$ be an antiderivative of $g$. Two functions with the same derivative differ by a constant: $H(x(t)) = G(t) + c$ (8.9). At $t = t_0$: $c = H(x_0) - G(t_0)$, so $H(x(t)) - H(x_0) = G(t) - G(t_0)$, which by Barrow's rule is exactly (8.3) = (8.11).
No infinitesimals were manipulated: the "recipe" is the chain rule read backwards. To obtain $x(t)$ explicitly one must invert $H$; sometimes the implicit relation $H(x) = G(t) + c$ is the best available.
6.2 First examples
Here $f(x) = x$, $g(t) = k$. Besides the constant solution $x \equiv 0$, for $x \neq 0$: $\int\frac{dx}{x} = \int k\,dt$, so $\ln|x| = kt + c$ and $|x| = e^c e^{kt}$. Since $x$ keeps its sign, $x(t) = Ce^{kt}$ with $C = \pm e^c$ (and $C = 0$ for the constant solution): $x(t) = Ce^{kt}$, as found in Topic 1, Section 5.2.
If $x_0 = 0$, $x \equiv 0$. Otherwise separate, $x^{-2}dx = dt$, and integrate between corresponding limits. An antiderivative of $x^{-2}$ is $-x^{-1}$:
$$\int_{x_0}^{x(t)}\frac{dx}{x^2} = \int_0^t d\tilde t \;\Longrightarrow\; \Big[-\frac1x\Big]_{x_0}^{x(t)} = t \;\Longrightarrow\; -\frac{1}{x(t)} + \frac{1}{x_0} = t \;\Longrightarrow\; x(t) = \frac{1}{x_0^{-1} - t}.$$This is the blow-up solution (6.7) of Section 3.2, now derived rather than guessed.
6.3 The logistic equation solved
Solve $x'(t) = kx\left(1 - \dfrac{x(t)}{M}\right)$, $x(t_0) = x_0$, with $k, M > 0$ [Notes, p. 3]. (The notes write the initial condition as $x(t_0) = t_0$; $x(t_0) = x_0$ is meant, as the rest of the computation shows.)
- Constant solutions first. "We know from Picard's theorem that $x$ is either $0$ or $M$, or never": if $x_0 = 0$ or $x_0 = M$ the solution is constant, and otherwise $x(t)$ never takes the values $0$ or $M$. Take $0 < x_0 < M$ or $x_0 > M$; then $x(t)$ stays positive and $M - x(t)$ keeps the sign of $M - x_0$.
- Separate. $f(x) = x\left(1 - \frac xM\right)$, $g(t) = k$: $$\int_{x_0}^{x}\frac{dx}{x\left(1 - \frac{x}{M}\right)} = \int_{t_0}^{t} k\,dt = k(t - t_0).$$
- Partial fractions. Look for $\dfrac{1}{x\left(1 - \frac xM\right)} = \dfrac{A}{x} + \dfrac{B}{1 - \frac xM}$, i.e. $1 = A\left(1 - \frac xM\right) + Bx$ for all $x$. At $x = 0$: $1 = A$. At $x = M$: $1 = 0 + BM$, so $B = 1/M$. Hence $$\frac{1}{x\left(1 - \frac xM\right)} = \frac{1}{x} + \frac{1/M}{1 - x/M} = \frac1x + \frac{1}{M - x},$$ multiplying top and bottom of the second fraction by $M$.
- Integrate each term. An antiderivative of $1/x$ ($x > 0$) is $\ln x$. For the second, substitute $u = M - x$, $du = -dx$: $\int\frac{dx}{M - x} = -\int\frac{du}{u} = -\ln|M - x|$. By Barrow's rule, $$\int_{x_0}^{x}\frac{dx}{x} + \int_{x_0}^{x}\frac{dx}{M - x} = \ln\frac{x}{x_0} + \ln\frac{|M - x_0|}{|M - x|} = \ln\left(\frac{x\,(M - x_0)}{x_0\,(M - x)}\right),$$ where the moduli cancel because $M - x$ and $M - x_0$ have the same sign (step 1).
- Exponentiate. $\ln\left(\dfrac{x(M - x_0)}{x_0(M - x)}\right) = k(t - t_0)$ gives $$\frac{x}{M - x} = \frac{x_0\,e^{k(t - t_0)}}{M - x_0} =: E(t).$$
- Solve for $x$. $x = (M - x)E = ME - xE$, so $x\,(1 + E) = ME$ and $$x = \frac{ME}{1 + E} = \left(\frac{Mx_0e^{k(t - t_0)}}{M - x_0}\right)\Bigg/\left(1 + \frac{x_0e^{k(t - t_0)}}{M - x_0}\right) = \frac{Mx_0\,e^{k(t - t_0)}}{M - x_0 + x_0\,e^{k(t - t_0)}}.$$
- Divide top and bottom by $e^{k(t - t_0)}$. $$x(t) = \frac{Mx_0}{x_0 + (M - x_0)\,e^{-k(t - t_0)}}.$$
- Check at $t = t_0$: $x = Mx_0/(x_0 + M - x_0) = x_0$ ✓.
- Check the constant solutions: $x_0 = M$ gives $x \equiv M^2/M = M$ ✓; $x_0 = 0$ gives $x \equiv 0$ ✓.
- Small population: while $x_0e^{k(t - t_0)} \ll M$, the denominator of the step-6 form is $\approx M$ and $x \approx x_0e^{k(t - t_0)}$: exponential growth ✓.
- Inflection: $x'' = \frac{d}{dt}\big[kx - \tfrac kMx^2\big] = \big(k - \tfrac{2k}{M}x\big)x'$ by the chain rule, so the growth is fastest at $x = M/2$.
- Dimensions: $[k(t - t_0)] = \text{s}^{-1}\cdot\text{s} = 1$, and $x$ has the units of $M$ ✓.
- Robinson's form: with $p$ for the population, Robinson separates $\frac{M\,dp}{p(M - p)} = k\,dt$ and uses $\frac{M}{p(M - p)} = \frac1p + \frac{1}{M - p}$ (Eq. 8.13): the same identity as step 3, multiplied by $M$. He obtains the same formula [Robinson, pp. 66–67].
With $\alpha = e^{50k}$, $p_0 = p(1801)$, $p_1 = p(1851)$, $p_2 = p(1901)$, the solution requires $p_1 = \dfrac{Mp_0\alpha}{M - p_0 + p_0\alpha}$ and $p_2 = \dfrac{Mp_0\alpha^2}{M - p_0 + p_0\alpha^2}$. Eliminating $M$ gives
$$\alpha = \frac{p_2(p_1 - p_0)}{p_0(p_2 - p_1)} = 2.0234, \qquad M = \frac{p_1(2p_0p_2 - p_1p_2 - p_0p_1)}{p_0p_2 - p_1^2} = 83.1\ \text{million}, \tag{8.14}$$so $k = \ln(2.0234)/50 = 0.0141\ \text{yr}^{-1}$. The model then predicts $66.8$ million for 2001, against about $63$ million observed — far better than the exponential model's $131.6$ million (values recomputed from the census data; they agree with Robinson's).
Integrals of $1/x$ produce $\ln|x|$. Robinson's advice is to remove the modulus with the phase diagram: a solution cannot cross a stationary point, so $x(t)$ keeps the sign of $x_0$ (for $\dot x = kx$) or of $M - x_0$ (for the logistic equation), as in step 1 above.
6.4 Complement (Robinson): partial fractions for the pitchfork equation
Solve $\dot x = x(\kappa^2 - x^2)$, $x(0) = x_0$ (the pitchfork with $k = \kappa^2 > 0$). Separating,
$$\frac{dx}{x(\kappa^2 - x^2)} = dt, \qquad \frac{1}{x(\kappa - x)(\kappa + x)} = \frac{1}{\kappa^2}\left[\frac1x + \frac{1}{2(\kappa - x)} - \frac{1}{2(\kappa + x)}\right].$$(Check by putting the bracket over the common denominator $2x(\kappa - x)(\kappa + x)$: the numerator is $2(\kappa^2 - x^2) + x(\kappa + x) - x(\kappa - x) = 2\kappa^2 - 2x^2 + 2x^2 = 2\kappa^2$ ✓.) Integrate from $0$ to $t$; with $\int\frac{dx}{\kappa - x} = -\ln|\kappa - x|$ (substitution $u = \kappa - x$):
$$\Big[\ln|x| - \tfrac12\ln|\kappa - x| - \tfrac12\ln|\kappa + x|\Big]_{x_0}^{x(t)} = \kappa^2 t \;\Longrightarrow\; \ln\frac{|x(t)|\sqrt{|\kappa^2 - x_0^2|}}{|x_0|\sqrt{|\kappa^2 - x(t)^2|}} = \kappa^2 t.$$Exponentiate and square: $x(t)^2|\kappa^2 - x_0^2| = x_0^2|\kappa^2 - x(t)^2|e^{2\kappa^2t}$ (8.15). The phase diagram shows that $x^2 - \kappa^2$ keeps its sign, so the moduli go, and solving the linear equation for $x(t)^2$:
$$x(t) = \pm\sqrt{\frac{\kappa^2}{1 + e^{-2\kappa^2 t}\left(\kappa^2x_0^{-2} - 1\right)}}, \tag{8.16}$$with the sign of $x_0$. As $t \to \infty$, $e^{-2\kappa^2t} \to 0$ and $x \to \pm\kappa$: the two stable branches of the pitchfork.
7. Explicit solutions (2): the integrating factor
7.1 Deriving the integrating factor
In general this is not separable. Multiply the equation by an unknown factor $I(t)$ and choose $I$ so that the left-hand side becomes the derivative $\big(I(t)\,x(t)\big)'$.
- Multiply. $\ I(t)\,x'(t) + I(t)\,p(t)\,x(t) = I(t)\,q(t)$.
- Product rule. $\ \big(I(t)\,x(t)\big)' = I'(t)\,x(t) + I(t)\,x'(t)$. For this to equal the left-hand side of step 1, the terms $I\,x'$ cancel and we are left with $$I'(t)\,x(t) = I(t)\,p(t)\,x(t) \quad\Longrightarrow\quad I'(t) = I(t)\,p(t).$$
- Solve for $I$. With $I > 0$, divide: $\dfrac{I'(t)}{I(t)} = p(t)$. The left side is $\big(\ln I(t)\big)'$ by the chain rule, so $$\ln I(t) = \int p(t)\,dt = P(t), \qquad I(t) = e^{P(t)},$$ where $P$ is a primitive of $p$ (for example, $p(t) = t$ gives $P(t) = t^2/2$). This $I$ is the integrating factor.
- Integrate. Step 1 now reads $\big(I(t)\,x(t)\big)' = I(t)\,q(t)$. Integrating both sides, $I(t)\,x(t) = \int I(t)\,q(t)\,dt$ (the arbitrary constant is inside the indefinite integral), and dividing by $I(t)$:
7.2 The initial value problem in three steps
Now consider the IVP [Notes, p. 3]
$$\begin{cases} x'(t) + p(t)\,x(t) = q(t), \quad t > t_0,\\[2pt] x(t_0) = x_0. \end{cases}$$- Step 1: find $I(t)$. Define $P(t) = \displaystyle\int_{t_0}^{t} p(\tau)\,d\tau$. Notice $P(t_0) = \displaystyle\int_{t_0}^{t_0} p(\tau)\,d\tau = 0$, therefore $I(t) = e^{P(t)}$ satisfies $I(t_0) = e^0 = 1$.
- Step 2: integrate from $t_0$ to $t$. With the knowledge of $I(t)$, $$\int_{t_0}^{t}\big(I(\tau)\,x(\tau)\big)'\,d\tau = \int_{t_0}^{t} I(\tau)\,q(\tau)\,d\tau.$$
- Step 3: simplify. By Barrow's rule the left side is $I(t)\,x(t) - I(t_0)\,x(t_0) = I(t)\,x(t) - 1\cdot x_0$, so $I(t)\,x(t) = x_0 + \int_{t_0}^{t} I(\tau)\,q(\tau)\,d\tau$. Divide by $I(t)$.
The first term is the free response (the initial value carried by the homogeneous equation, $q = 0$); the second is the forced response to the input $q$. The same "homogeneous + particular" structure reappears in Topic 3. Robinson writes the formula with any primitive $P$, which adds the factor $e^{P(t_0)}$ to $x_0$; choosing $P(t_0) = 0$, as the notes do, removes it.
This uses the primitive mentioned in the notes, $p(t) = t$. Here $q(t) = t$ and $t_0 = 0$.
- Step 1. $P(t) = \int_0^t \tau\,d\tau = \big[\tfrac{\tau^2}{2}\big]_0^t = \tfrac{t^2}{2}$, so $I(t) = e^{t^2/2}$ and $I(0) = 1$.
- Step 2. $\displaystyle\int_0^t I(\tau)\,q(\tau)\,d\tau = \int_0^t \tau\,e^{\tau^2/2}\,d\tau$. Substitute $u = \tau^2/2$, $du = \tau\,d\tau$; the limits become $u = 0$ and $u = t^2/2$: $$\int_0^{t^2/2} e^{u}\,du = \big[e^{u}\big]_0^{t^2/2} = e^{t^2/2} - 1.$$
- Step 3. $x(t) = x_0e^{-t^2/2} + e^{-t^2/2}\big(e^{t^2/2} - 1\big) = 1 + (x_0 - 1)\,e^{-t^2/2}$.
Check: $x' = (x_0 - 1)\,e^{-t^2/2}\cdot(-t)$ by the chain rule, so $x' + tx = -t(x_0 - 1)e^{-t^2/2} + t + t(x_0 - 1)e^{-t^2/2} = t$ ✓, and $x(0) = 1 + x_0 - 1 = x_0$ ✓. As $t \to \infty$, $x \to 1$ for every $x_0$. (The equation is also separable, $x' = t(1 - x)$, which gives the same answer.)
7.3 Complement (Robinson): the idea with constant coefficients
The general linear first-order equation is $a_1(t)\dot x + a_0(t)x = f(t)$. Where $a_1 \neq 0$ we divide by it and obtain the standard form [Robinson, Eq. (9.1), p. 75]
$$\frac{dx}{dt} + p(t)\,x = q(t). \tag{9.1}$$It is separable when $p$ and $q$ are constants (and in a few special cases such as $q \equiv 0$); the integrating factor works for all $p$, $q$.
For $\dot x + px = q$ with constants $p$, $q$, notice that by the product rule
$$\frac{d}{dt}\big(x\,e^{pt}\big) = \dot x\,e^{pt} + x\,p\,e^{pt} = e^{pt}\big(\dot x + px\big). \tag{9.3}$$So multiplying the equation by $e^{pt}$ turns its left side into an exact derivative:
$$\frac{d}{dt}\big(xe^{pt}\big) = qe^{pt} \;\Longrightarrow\; xe^{pt} = \frac{q}{p}e^{pt} + C \;\Longrightarrow\; x(t) = \frac qp + Ce^{-pt}. \tag{9.5}$$If $p > 0$, every solution tends to $q/p$ as $t \to \infty$, whatever the initial condition. With $x(a) = x_a$: $C = (x_a - q/p)e^{pa}$ and $x(t) = q/p + (x_a - q/p)e^{-p(t - a)}$ (9.6).
Robinson's worked examples follow.
- $p = 3$, so $I = e^{\int 3\,dt} = e^{3t}$ and $\dfrac{d}{dt}\big(xe^{3t}\big) = te^{3t}$.
- Antiderivative of $se^{3s}$ by parts, with $u = s$, $dv = e^{3s}ds$, $du = ds$, $v = e^{3s}/3$: $\displaystyle\int se^{3s}ds = \frac{se^{3s}}{3} - \int\frac{e^{3s}}{3}ds = \frac{se^{3s}}{3} - \frac{e^{3s}}{9}$.
- Integrate from $0$ to $t$ (Barrow): $$x(t)e^{3t} - x(0) = \Big[\frac{se^{3s}}{3} - \frac{e^{3s}}{9}\Big]_0^t = \frac{te^{3t}}{3} - \frac{e^{3t}}{9} - \Big(0 - \frac19\Big).$$
- With $x(0) = 8/9$: $\ xe^{3t} = \dfrac{te^{3t}}{3} - \dfrac{e^{3t}}{9} + 1$, so $\ x(t) = e^{-3t} + \dfrac t3 - \dfrac19$.
Check: $\dot x + 3x = (-3e^{-3t} + \tfrac13) + (3e^{-3t} + t - \tfrac13) = t$ ✓; $x(0) = 1 - \tfrac19 = \tfrac89$ ✓.
- Standard form (divide by $x^2 + 1 > 0$): $\ y' + \dfrac{4x}{x^2 + 1}y = \dfrac{12x}{x^2 + 1}$.
- Integrating factor: substitute $u = x^2 + 1$, $du = 2x\,dx$: $\displaystyle\int\frac{4x}{x^2 + 1}dx = \int\frac{2\,du}{u} = 2\ln u$, so $I = e^{2\ln(x^2 + 1)} = (x^2 + 1)^2$.
- $\dfrac{d}{dx}\big[y(x^2 + 1)^2\big] = 12x(x^2 + 1)$. With the same substitution, $\int 12x(x^2 + 1)\,dx = \int 6u\,du = 3u^2 = 3(x^2 + 1)^2$.
- $y(x^2 + 1)^2 = 3(x^2 + 1)^2 + c$, so $\ y(x) = 3 + \dfrac{c}{(x^2 + 1)^2}$.
7.4 Complement (Robinson): Newton's law of cooling
An object at temperature $T(t)$ in surroundings at temperature $A(t)$ exchanges heat at a rate proportional to the temperature difference:
$$\frac{dT}{dt} = -k\big(T - A(t)\big), \qquad k > 0\ [\text{s}^{-1}]. \tag{9.9}$$In standard form, $\dot T + kT = kA(t)$, with integrating factor $e^{kt}$.
With $A$ constant, integrating $\frac{d}{dt}[Te^{kt}] = kAe^{kt}$ between $t_1$ and $t_2$ gives $T(t_2)e^{kt_2} - T(t_1)e^{kt_1} = A\big(e^{kt_2} - e^{kt_1}\big)$, i.e.
$$T(t_2) = A + \big[T(t_1) - A\big]e^{-k(t_2 - t_1)}.$$Data (time in hours): room at $A = 24\,{}^\circ\text{C}$, body at $28\,{}^\circ\text{C}$ at 8 a.m. and $26\,{}^\circ\text{C}$ at 9 a.m. Then $26 = 24 + 4e^{-k}$, so $e^{-k} = 1/2$ and $k = \ln 2\ \text{h}^{-1}$. The time of death $t_0$ satisfies $T(t_0) = 37$: $28 = 24 + 13e^{-k(8 - t_0)}$, so $4 = 13e^{-k(8 - t_0)}$ and
$$8 - t_0 = \frac{\ln 4 - \ln 13}{-\ln 2} = \frac{\ln(13/4)}{\ln 2} = \frac{1.1787}{0.6931} = 1.70\ \text{h}.$$The book's equation for $8 - t_0$ is correct, but it then states "$t_0 \approx 1.7$, putting the time of death at approximately 1:42 a.m.". The value $1.7$ is $8 - t_0$, not $t_0$. The correct result is $t_0 = 8 - 1.70 = 6.30$, i.e. about 6:18 a.m.
Check by substitution. With $t_0 = 6.30$: $T(8) = 24 + 13\cdot 2^{-1.70} = 24 + 13 \times 0.308 = 28.0\,{}^\circ\text{C}$ ✓. With the book's $t_0 = 1.7$: $T(8) = 24 + 13\cdot 2^{-6.3} = 24 + 13\times 0.0127 = 24.2\,{}^\circ\text{C} \neq 28$ ✗. Physically, a body that cools by $2\,{}^\circ\text{C}$ per hour near $28\,{}^\circ\text{C}$ cannot have been at $37\,{}^\circ\text{C}$ more than six hours earlier.
Periodic surroundings: amplitude attenuation and lag (Sec. 9.4.2–9.4.4)
Take $A(t) = \mu + a\cos\omega t$ (mean $\mu$, amplitude $a$, period $2\pi/\omega$). Integrating (9.9) from $0$ to $t$ gives $T(t)e^{kt} - T(0) = k\int_0^t A(\tilde t)e^{k\tilde t}d\tilde t$ (9.10). Using the antiderivative (9.11) $\int e^{kt}\cos\omega t\,dt = \dfrac{e^{kt}(k\cos\omega t + \omega\sin\omega t)}{k^2 + \omega^2}$ (verify by differentiating) and combining $A\cos\omega t + B\sin\omega t = \sqrt{A^2 + B^2}\cos(\omega t - \phi)$, $\tan\phi = B/A$ (9.12)–(9.15), Robinson obtains
$$T(t) = \mu + \left(T(0) - \mu - \frac{ak^2}{k^2 + \omega^2}\right)e^{-kt} + \frac{ak}{\sqrt{k^2 + \omega^2}}\cos(\omega t - \phi), \qquad \phi = \tan^{-1}\frac{\omega}{k}. \tag{9.17}$$- Transient: the middle term decays on the time scale $1/k$ and the memory of $T(0)$ is lost.
- Attenuation: the inside oscillation has amplitude $a\,k/\sqrt{k^2 + \omega^2} < a$ (9.18).
- Lag: it peaks a time $\phi/\omega = \omega^{-1}\tan^{-1}(\omega/k)$ after the outside (9.19).
- Limits: $k \gg \omega$ (good thermal contact): amplitude $\to a$, lag $\to 0$, the object follows its surroundings. $k \ll \omega$ (heavy insulation): amplitude $\approx ak/\omega \to 0$, lag $\to \pi/(2\omega)$, a quarter period.
A well-mixed volume $V$ [m³] (an aircraft cabin, a combustor, a continuously stirred tank) receives a volumetric flow $Q$ [m³/s] of air with contaminant concentration $c_{\text{in}}$, and the same flow leaves with the cabin concentration $c(t)$ (perfect mixing). Occupants add a source $S$ [kg/s]. The mass balance "rate of change = in − out + source" reads
$$\frac{d}{dt}\big(Vc\big) = Qc_{\text{in}} - Qc + S \quad\Longrightarrow\quad \frac{dc}{dt} + \frac{Q}{V}\,c = \frac{Qc_{\text{in}} + S}{V}.$$This is (9.1) with constant $p = Q/V$ and $q = (Qc_{\text{in}} + S)/V$, so by (9.6) $c(t) = c_\infty + (c_0 - c_\infty)e^{-t/\tau}$, with steady state $c_\infty = c_{\text{in}} + S/Q$ and residence time $\tau = V/Q$. For a cabin of $V = 150\ \text{m}^3$ supplied with $Q = 0.5\ \text{m}^3/\text{s}$, $\tau = 300\ \text{s}$: after a disturbance the air is 95% refreshed in $3\tau = 15$ minutes ($e^{-3} \approx 0.05$). Dimensions: $[Q/V] = \text{s}^{-1}$ ✓, $[S/Q] = \text{kg/m}^3$ ✓. Newton's law of cooling is the same equation with $k = Q/V$.
8. Explicit solutions (3): exact equations
8.1 From a family of curves to an ODE
Let $y$ be a function of $x$, and consider the function $F(x, y) = C$, where $C$ is a constant. Take the derivative with respect to $x$:
$$\frac{\partial F}{\partial x} + \frac{\partial F}{\partial y}\,\frac{dy}{dx} = 0,$$which is a first-order ODE. Therefore, if we have an ODE of the form
$$f(x, y) + g(x, y)\,\frac{dy}{dx} = 0$$and we find $F(x, y)$ such that $\dfrac{\partial F}{\partial x} = f$ and $\dfrac{\partial F}{\partial y} = g$, then the solution to the ODE is $F(x, y) = C$.
The derivative in the box is the multivariable chain rule applied to $x \mapsto F\big(x, y(x)\big)$: the first argument changes at rate $1$ and the second at rate $dy/dx$, so $\frac{d}{dx}F\big(x, y(x)\big) = F_x\cdot 1 + F_y\cdot\frac{dy}{dx}$. A constant has zero derivative.
An observation. If such an $F$ exists, then $$\frac{\partial f}{\partial y} = \frac{\partial^2 F}{\partial y\,\partial x} = \frac{\partial^2 F}{\partial x\,\partial y} = \frac{\partial g}{\partial x},$$ because the mixed second partial derivatives of a function with continuous second derivatives are equal (Schwarz's theorem). So the condition "there is an $F$" can be replaced by a condition on $f$ and $g$ alone [Notes, p. 4].
Let $f$, $g$, $\dfrac{\partial f}{\partial y}$ and $\dfrac{\partial g}{\partial x}$ be continuous functions. Then $f(x, y) + g(x, y)\dfrac{dy}{dx} = 0$ is an exact ODE if
$$\frac{\partial f}{\partial y} = \frac{\partial g}{\partial x},$$and its solution is $F(x, y) = C$, with $\dfrac{\partial F}{\partial x} = f$ and $\dfrac{\partial F}{\partial y} = g$.
Complement (Robinson, Sec. 10.1). The condition is necessary and, on a rectangle (more generally a simply connected domain), also sufficient: the equation is exact if and only if $f_y = g_x$ there. The observation proves the "only if" part. Robinson's proof of the "if" part constructs $F$, and is the method used in the examples:
Necessity. If $f = F_x$ and $g = F_y$, then $f_y = F_{xy}$ and $g_x = F_{yx}$, and mixed second partial derivatives of a smooth function are equal.
Sufficiency (constructive). Define $F$ by integrating $f$ in $x$, holding $y$ fixed, with a "constant" that may depend on $y$:
$$F(x, y) = \int f(x, y)\,dx + C(y). \tag{10.6}$$Then $F_x = f$ automatically. We need $F_y = g$:
$$\frac{\partial}{\partial y}\int f\,dx + C'(y) = g \quad\Longrightarrow\quad C'(y) = g(x, y) - \frac{\partial}{\partial y}\int f(x, y)\,dx. \tag{10.7}$$This defines $C(y)$ only if the right side does not depend on $x$. Differentiate it in $x$:
$$\frac{\partial}{\partial x}\left[g - \frac{\partial}{\partial y}\int f\,dx\right] = \frac{\partial g}{\partial x} - \frac{\partial}{\partial y}\frac{\partial}{\partial x}\int f\,dx = \frac{\partial g}{\partial x} - \frac{\partial f}{\partial y} = 0$$by the condition $\partial f/\partial y = \partial g/\partial x$. So the right side of (10.7) is a function of $y$ alone, and integrating it gives $C(y)$.
8.2 Example 1 of the notes
- $f = x^3 + \dfrac yx$, $g = y^2 + \ln x$. The ODE is not linear, because of the term $y^2\dfrac{dy}{dx}$.
- Test: $\dfrac{\partial f}{\partial y} = \dfrac1x$ and $\dfrac{\partial g}{\partial x} = \dfrac1x$. Equal: the equation is exact.
- Integrate $f$ in $x$ ($y$ held fixed), with a "constant" $\varphi(y)$: $$F(x, y) = \int\left(x^3 + \frac{y}{x}\right)dx = \frac{x^4}{4} + y\ln x + \varphi(y).$$
- Impose $\dfrac{\partial F}{\partial y} = g$: $\ \ln x + \varphi'(y) = y^2 + \ln x$, so $\varphi'(y) = y^2$ (indeed free of $x$) and $\varphi(y) = \dfrac{y^3}{3} + c$.
- Solution: $$F(x, y) = \frac{x^4}{4} + \frac{y^3}{3} + y\ln x = C.$$ It is an implicit solution, "since $x$ and $y$ are together" in the words of the notes: it is left in implicit form (isolating $y$ would need Cardano's formula for the cubic $\tfrac{y^3}{3} + y\ln x = C - \tfrac{x^4}{4}$).
Check: $F_x + F_y\,y' = \big(x^3 + y/x\big) + \big(y^2 + \ln x\big)y' = f + g\,y'$ ✓.
8.3 Example 2 of the notes
- $f = 1 + e^xy + xe^xy$, $g = xe^x + 2$.
- Test. $\dfrac{\partial f}{\partial y} = e^x + xe^x$. For $g$, the product rule on $xe^x$ gives $\dfrac{\partial g}{\partial x} = 1\cdot e^x + x\cdot e^x = e^x + xe^x$. Equal: the equation is exact.
- Integrate $f$ in $x$. The term $xe^xy$ needs integration by parts, with $u = x$, $dv = e^x\,dx$, $du = dx$, $v = e^x$: $$\int xe^x\,dx = xe^x - \int e^x\,dx = xe^x - e^x.$$ Hence $$F = \int\big(1 + e^xy + xe^xy\big)\,dx = x + ye^x + y\big(xe^x - e^x\big) + \varphi(y) = x + yxe^x + \varphi(y),$$ since $ye^x - ye^x = 0$.
- Impose $\dfrac{\partial F}{\partial y} = g$: $\ xe^x + \varphi'(y) = xe^x + 2$, so $\varphi'(y) = 2$ and $\varphi(y) = 2y + c$.
- Solution: $F(x, y) = x + yxe^x + 2y = C$. Here $y$ appears only to the first power, so it can be isolated: $y\,(xe^x + 2) = C - x$, and $$y(x) = \frac{C - x}{xe^x + 2}.$$ The denominator never vanishes: $\frac{d}{dx}(xe^x) = (1 + x)e^x$ is zero only at $x = -1$, where $xe^x$ has its minimum $-1/e$, so $xe^x + 2 \ge 2 - 1/e > 0$. The solution is defined for every $x$.
Check: differentiate $y\,(xe^x + 2) = C - x$ with the product rule: $y'(xe^x + 2) + y(e^x + xe^x) = -1$, i.e. $\big(1 + e^xy + xe^xy\big) + \big(xe^x + 2\big)y' = 0$ ✓. (This equation is also linear in $y$. In the normal form $y' + p\,y = q$ of Section 7, $p = \dfrac{(1 + x)e^x}{xe^x + 2}$ and $q = \dfrac{-1}{xe^x + 2}$; since $(xe^x + 2)' = (1 + x)e^x$, $P = \ln(xe^x + 2)$ and $I = e^{P} = xe^x + 2$. Multiplying by $I$ gives back $\frac{d}{dx}\big[(xe^x + 2)\,y\big] = -1$, and the same answer follows.)
8.4 Complement (Robinson): integrating factors for non-exact equations
Multiplying by a well-chosen $I(x, y)$ can make an equation exact. The linear equation $y' + p(x)y = 0$, written $p\,y + 1\cdot y' = 0$, is not exact ($\partial_y(py) = p \neq 0 = \partial_x 1$) but $e^{P(x)}$ makes it exact: $\partial_y\big(pe^{P}y\big) = pe^{P} = \partial_x e^{P}$. So the integrating factor of Section 7 is a special case.
In general, $If + Ig\,y' = 0$ is exact when $\partial_y(If) = \partial_x(Ig)$. By the product rule this is
$$I_y f + If_y = I_x g + Ig_x \quad\Longleftrightarrow\quad \left(\frac{\partial f}{\partial y} - \frac{\partial g}{\partial x}\right)I = g\frac{\partial I}{\partial x} - f\frac{\partial I}{\partial y}, \tag{10.9}$$a PDE for $I$ that is in general no easier than the original problem. It becomes an ODE if $I$ depends on one variable only.
$I = I(x)$ (Robinson (10.10)–(10.11)): then $I_y = 0$ and (10.9) becomes
$$\frac{dI}{dx} = \frac{1}{g}\left(\frac{\partial f}{\partial y} - \frac{\partial g}{\partial x}\right)I,$$which has a solution $I(x)$ provided $\dfrac{1}{g}\left(f_y - g_x\right)$ depends on $x$ only. Then $I(x) = \exp\displaystyle\int\frac{f_y - g_x}{g}\,dx$.
$I = I(y)$ (the symmetric case, not treated in the book): then $I_x = 0$ and (10.9) becomes
$$\frac{dI}{dy} = \frac{1}{f}\left(\frac{\partial g}{\partial x} - \frac{\partial f}{\partial y}\right)I,$$which has a solution $I(y)$ provided $\dfrac{1}{f}\left(g_x - f_y\right)$ depends on $y$ only. Then $I(y) = \exp\displaystyle\int\frac{g_x - f_y}{f}\,dy$.
- $f_y = 3\cos y + 5e^{5x} + \dfrac{2e^{5x}}{x}$ and $g_x = \cos y + 5e^{5x}$ (chain rule on $e^{5x}$). Not exact.
- $\dfrac{f_y - g_x}{g} = \dfrac{2\cos y + 2e^{5x}/x}{x\cos y + e^{5x}} = \dfrac{(2/x)\,(x\cos y + e^{5x})}{x\cos y + e^{5x}} = \dfrac{2}{x}$ — a function of $x$ only.
- $\dfrac{dI}{dx} = \dfrac{2}{x}I$, so $\ln I = 2\ln x$ and $I = x^2$.
- New equation: $\big(3x^2\sin y + 5x^2ye^{5x} + 2xye^{5x}\big) + \big(x^3\cos y + x^2e^{5x}\big)y' = 0$. Test: both partials equal $3x^2\cos y + 5x^2e^{5x} + 2xe^{5x}$ ✓.
- $F = \int \tilde g\,dy = x^3\sin y + x^2ye^{5x} + C(x)$; then $F_x = 3x^2\sin y + 2xye^{5x} + 5x^2ye^{5x} + C'(x) = \tilde f$ gives $C' = 0$.
- Solution: $\ x^3\sin y + x^2ye^{5x} = c$.
Solve $\ y + \big(2x + y^2\big)\dfrac{dy}{dx} = 0$, $y > 0$.
- $f = y$, $g = 2x + y^2$: $f_y = 1$, $g_x = 2$. Not exact.
- $\dfrac{f_y - g_x}{g} = \dfrac{-1}{2x + y^2}$ depends on both variables, so no $I(x)$. But $\dfrac{g_x - f_y}{f} = \dfrac{1}{y}$ depends on $y$ only.
- $\dfrac{dI}{dy} = \dfrac{I}{y}$, so $I(y) = y$.
- New equation: $y^2 + (2xy + y^3)y' = 0$. Test: $\partial_y(y^2) = 2y = \partial_x(2xy + y^3)$ ✓.
- $F = \int y^2\,dx = xy^2 + C(y)$; $F_y = 2xy + C'(y) = 2xy + y^3$, so $C(y) = y^4/4$.
- Solution: $\ xy^2 + \dfrac{y^4}{4} = c$. Check: $\frac{d}{dx}$ gives $y^2 + 2xyy' + y^3y' = y\,[\,y + (2x + y^2)y'\,] = 0$ ✓.
9. Complement: homogeneous and Bernoulli substitutions
Robinson's Chapter 10 closes with two substitutions that turn special nonlinear equations into ones already solved. They are not in the lecture map but appear in the problem sheets' style of questions.
- Homogeneous equations $\dfrac{dy}{dx} = F\!\left(\dfrac yx\right)$ (a different meaning of "homogeneous" from the linear one). Put $y = ux$; by the product rule $y' = u + xu'$, so $x\dfrac{du}{dx} = F(u) - u$, which is separable. Example 10.3: $xyy' = 2x^2 + 3y^2$ gives $y = \pm x\sqrt{\alpha x^4 - 1}$.
- Bernoulli equations $\dfrac{dy}{dx} + p(x)y = q(x)y^n$ (10.13), $n \neq 0, 1$. Put $u = y^{1-n}$; by the chain rule $u' = (1 - n)y^{-n}y' = (1 - n)y^{-n}\big(-py + qy^n\big) = (1 - n)(-pu + q)$, so $$\frac{du}{dx} + (1 - n)p(x)\,u = (1 - n)q(x),$$ which is linear and solved by an integrating factor.
$n = 2$, $u = y^{-1}$, $u' = -y^{-2}y' = -y^{-2}(6xy + 2xy^2) = -6xu - 2x$, so $u' + 6xu = -2x$. Integrating factor $e^{\int 6x\,dx} = e^{3x^2}$: $\frac{d}{dx}\big(ue^{3x^2}\big) = -2xe^{3x^2}$; with $w = 3x^2$, $dw = 6x\,dx$, $\int -2xe^{3x^2}dx = -\tfrac13e^{3x^2}$. Hence $u = -\tfrac13 + ce^{-3x^2}$ and $y = 1/u = \dfrac{3}{Ce^{-3x^2} - 1}$ with $C = 3c$.
10. Choosing a method
| If the equation is… | Recognise it by | Do this | Notes | Robinson |
|---|---|---|---|---|
| An IVP $y' = f(x, y)$, $y(x_0) = y_0$ | $f$, $\partial f/\partial y$ continuous near $(x_0, y_0)$ | Picard: a unique solution exists for $|x - x_0| < h$. | p. 3 | Sec. 6.2 |
| Autonomous $x' = f(x)$ | No explicit $t$ | Stationary points $f(x^*) = 0$; stable if $f'(x^*) < 0$, unstable if $f'(x^*) > 0$; phase line. | p. 3 | Ch. 7 |
| Separable $x' = f(x)g(t)$ | Right side factorises | List constant solutions $f(x^*) = 0$; then $\int_{x_0}^{x}du/f(u) = \int_{t_0}^{t}g\,d\tau$; remove moduli with the phase line. | p. 3 | Ch. 8 |
| Linear $x' + p(t)x = q(t)$ | $x$ and $x'$ appear to the first power | $P = \int_{t_0}^{t}p$, $I = e^{P}$; $x = \frac{x_0}{I} + \frac1I\int_{t_0}^{t}Iq$. | p. 3 | Ch. 9 |
| Exact $f + g\,y' = 0$ | $f_y = g_x$ | Build $F$ with $F_x = f$, $F_y = g$ (integrate $f$ in $x$, fix $\varphi(y)$); answer $F = C$. | p. 4 | Sec. 10.1 |
| Not exact | $(f_y - g_x)/g$ depends on $x$ only, or $(g_x - f_y)/f$ on $y$ only | Multiply by $I(x)$ or $I(y)$, then as above. | — | Sec. 10.1.1 |
| Homogeneous / Bernoulli | $y' = F(y/x)$ / $y' + py = qy^n$ | $y = ux$ / $u = y^{1-n}$. | — | Sec. 10.2 |
Substitute the answer back into the equation and the initial condition. Look for lost constant solutions after dividing. Test the limits $t \to 0$ and $t \to \infty$ against the phase line. Check the dimensions of every constant that appears.