Unit 7

Differential Equations

~3 weeks · February · 5–10%
Why it's here now — and why the tail is wagging the dog

The curriculum places this here because you need integration techniques first. But historically, this is what calculus was invented for.

Newton didn't build the subject to find areas. He built it because F = ma is a differential equation, and he needed to solve it to derive Kepler's elliptical orbits from an inverse-square law of gravitation. Every fundamental law of physics is a differential equation. Maxwell's equations, the heat equation, Schrödinger's equation, the Navier–Stokes equations — all of them.

Worth telling her explicitly: everything for the last six months was scaffolding for this.

What a differential equation is

Differential equation An equation relating an unknown function to its own derivatives. Solving it means finding the function. A general solution contains arbitrary constants and describes a whole family of curves; an initial condition (a known point) selects one member of that family — the particular solution.
The reframe worth carrying

A differential equation is a local rule: wherever you are, here is your slope. Solving it means finding the global trajectory consistent with that rule at every point.

Local law → global behavior. That's the same theme as the Mean Value Theorem in Unit 5, and it's arguably the central move of the entire subject.

Slope fields

Draw the slope dictated by the equation at a grid of points. Solutions are the curves that flow along it.

one solution another y = 0 is an equilibrium: slopes are flat
Each tick shows the slope the equation demands at that point. A solution is any curve that stays tangent to the ticks everywhere. Different starting points pick out different curves — that's the arbitrary constant made visible.
Why slope fields are taught before any solution technique

They show that solutions exist and have structure even when you can't write them down — which is the honest situation for the overwhelming majority of differential equations. The handful she'll learn to solve algebraically are the rare, tame cases.

Reading a slope field is also its own AP skill: identify equilibrium solutions (rows of horizontal ticks, where dy/dx = 0), spot where solutions increase or decrease, and match a field to an equation by testing a couple of points.

Worked — matching a field to an equation

Which equation produced the field above: dy/dx = x, dy/dx = y, or dy/dx = x + y?

slopes are flat along the entire horizontal line y = 0so dy/dx = 0 whenever y = 0, regardless of x
dy/dx = x fails: at (2, 0) it would give slope 2, not 0eliminate
dy/dx = x + y fails: at (2, 0) it gives 2eliminate
dy/dx = y ✓ — and slopes steepen as |y| grows, which matches

Technique: find where the slopes are zero and where they're constant along a line. Those two features identify most fields in seconds without testing a grid of points.

Separation of variables

The one algebraic technique in BC. Works when the equation factors as dy/dx = g(x)·h(y).

Worked — the full procedure, including the initial condition

Solve dy/dx = 2xy with y(0) = 3.

dy/y = 2x dxseparate: all y's with dy on one side, all x's with dx on the other
∫dy/y = ∫2x dxintegrate both sides
ln|y| = x² + Cone constant is enough — combine both sides' constants into one
|y| = ex²+C = eC·eexponentiate
y = Ae, where A = ±eC is a new constantabsorb the messy constant; A can be any nonzero number
3 = Ae0 = Anow apply y(0) = 3
y = 3e
Trap — applying the initial condition too late

Substitute the initial condition right after integrating, while the +C is still sitting there plainly. If you exponentiate, rearrange, and simplify first, the constant gets buried inside the algebra and students routinely lose it or misplace it. Solve for C early.

Why "separating" dy/dx is legitimate — and the 232-year argument behind it

The move treats dy/dx as a fraction and multiplies both sides by dx. In a limit-based framework, dy/dx is not a fraction — it's a single symbol denoting a limit — so this looks like nonsense.

The proper justification is the chain rule: if H′(y) = 1/h(y), then d/dx[H(y)] = H′(y)·dy/dx, and the manipulation is really an application of the chain rule in reverse. Same relationship u-substitution has to the chain rule.

Her instinct is right and her tools are the problem, and that's the interesting part of the story. Bishop Berkeley attacked exactly this in 1734 — he called infinitesimals "the ghosts of departed quantities" and pointed out that dx has to be both zero and not-zero for the arguments to work. He was correct, and nobody could answer him for 130 years. Weierstrass's limits (Unit 1) dodged the problem rather than solving it. Then Abraham Robinson built nonstandard analysis in 1966 and showed infinitesimals were legitimate objects all along — Leibniz had simply been three centuries ahead of the logic needed to justify him.

Check — undo it

Put the solution back into the equation it came from. Separating dy/dx = 2xy gives y = Ce^(x²). Then y′ = 2x·Ce^(x²) = 2xy ✓ — the original equation, recovered.

A solution you cannot substitute back is a solution you got wrong. This is the differential-equations version of differentiating your antiderivative, and it is just as cheap.

Exponential growth and decay

dy/dt = ky  ⟹  y = y0ekt
Why this is the definition of the exponential function, not a result about it

Read the equation in words: the rate of growth is proportional to the current amount. That's what "exponential" means. It's not a statement about a formula — it's a statement about a mechanism, and the formula is what the mechanism forces.

This is also Unit 2's fact that ex is its own derivative, restated. Interest compounds because the interest earns interest; populations grow because organisms produce more organisms; radioactive decay is proportional to how much is left because each atom decays independently.

SituationSetup
Doubling time T2 = ekT → k = (ln 2)/T
Half-life T½ = ekT → k = −(ln 2)/T
Newton's law of coolingdT/dt = k(T − Tambient) → T = Ta + Cekt, k < 0
Worked — Newton's law of cooling

Coffee at 90 °C in a 20 °C room cools to 60 °C in 10 minutes. When does it reach 40 °C?

dT/dt = k(T − 20)rate proportional to the excess over ambient, not to T itself
let u = T − 20, so du/dt = kusubstitution turns it into plain exponential decay
u = u0ekt, u0 = 90 − 20 = 70
at t = 10: 40 = 70e10k → e10k = 4/760 − 20 = 40
k = ln(4/7)/10 ≈ −0.0560
want T = 40, so u = 20:  20 = 70ekt
t = ln(2/7)/k ≈ 22.4 minutes

The substitution u = T − 20 is the key move: cooling is exponential decay of the temperature difference, not of the temperature. The coffee never reaches 20 °C — it approaches it asymptotically, which is why the ambient temperature is a horizontal asymptote of the solution.

Logistic growth

dP/dt = kP(1 − P/M)
Why the second factor is there

Exponential growth is unphysical for a population — nothing grows without bound forever. The logistic model multiplies by an extra factor that measures how much room is left.

M is the carrying capacity. It's also an equilibrium solution: if P = M exactly, dP/dt = 0 and the population sits there forever. P = 0 is the other equilibrium — unstable, since any small population grows away from it.

Verhulst introduced this in 1838, explicitly to answer Malthus's prediction of unbounded population growth.

QuestionAnswer, without solving anything
Long-run populationM (the carrying capacity), for any positive start
When is growth fastest?at P = M/2 — the inflection point of the S-curve
Equilibrium solutionsP = 0 and P = M
Shape of the solutionS-curve: concave up below M/2, concave down above
Derivation — why the fastest growth is at exactly half capacity
dP/dt = kP − kP²/Mexpand; this is a downward parabola in P
maximize over P: d/dP[kP − kP²/M] = k − 2kP/M = 0the growth rate is itself a function of P
P = M/2the vertex of the parabola

The AP almost always asks for this and almost never asks you to solve the logistic equation, because doing so requires partial fractions — which is exactly why Unit 6 came first. Know M, know M/2, know the S-shape, and you can answer nearly every logistic question on the exam.

Check — limiting behaviour

Push t to infinity. A logistic solution P = M/(1 + Ae^(−kt)) must approach the carrying capacity M and never exceed it, and it must be growing fastest at M/2.

If your solution runs past M, or settles somewhere else entirely, the algebra went wrong well before the arithmetic did — and no amount of checking the final line will find it.

Euler's method

yn+1 = yn + f(xn, yn)·h
Why it's Unit 4 again

Stand at a known point. The equation tells you the slope there. Follow the tangent line for a short step h and land somewhere new. Recompute the slope. Repeat.

This is linear approximation applied over and over — the same idea as Newton's method, redeployed. Also the same idea as a Riemann sum: approximate a curved thing by many small straight pieces.

Error is O(h): halving the step size only halves the error, which is poor. Real solvers use Runge–Kutta, where halving the step cuts the error by sixteen.

Worked — two steps by hand

dy/dx = x + y with y(0) = 1. Estimate y(0.4) using two steps of h = 0.2.

start: x₀ = 0, y₀ = 1
slope = 0 + 1 = 1evaluate f at the current point
y₁ = 1 + (1)(0.2) = 1.2, at x₁ = 0.2step along the tangent
slope = 0.2 + 1.2 = 1.4recompute at the new point
y₂ = 1.2 + (1.4)(0.2) = 1.48, at x = 0.4true value ≈ 1.5836 — Euler underestimates here

Why the underestimate: the solution is concave up, so every tangent line lies below the curve — the same over/under logic as linear approximation in Unit 4. Concavity determines the direction of Euler's error, and that's a fair AP question.

One thing to show her — deterministic does not mean predictable

The Lorenz system (1963) is three simple, fully deterministic differential equations modelling atmospheric convection. Their solutions never repeat and depend so violently on the starting values that prediction fails within days.

Lorenz found it by accident: re-running a simulation, he typed 0.506 instead of the stored 0.506127 and got a completely different forecast. Chaos falls out of equations no more complicated-looking than the ones she's solving.

And a hard limit worth knowing: the three-body problem has no closed-form solution. Two bodies orbiting under gravity, Newton solved exactly. Add a third and no formula exists — Poincaré proved it in 1889, in a competition held for a Swedish king's birthday. Some equations simply cannot be "solved," and that discovery founded the modern study of dynamical systems.

Where differential equations go

Next stop — ODEs proper: systems, linear equations with integrating factors, second-order equations, and phase portraits, which show all solutions at once as flows in a plane. This is where linear algebra becomes unavoidable — solving a linear system of DEs is an eigenvalue problem.

Then, two forks. Dynamical systems and chaos — stability, bifurcations, strange attractors, the Lorenz system done properly. Or partial differential equations — the heat equation, wave equation, Laplace's equation, which is most of mathematical physics and requires Fourier series, which is the natural sequel to Unit 10.

Where numerical methods go

Next stop — numerical analysis. Everything she computes by hand, done by machine with rigorous error bounds. Euler → Runge–Kutta. Newton → the whole of nonlinear optimization. Riemann sums → Gaussian quadrature. Also the study of when these fail: stiffness, instability, catastrophic cancellation.

Practical note: this is the fastest route from "calculus is beautiful" to "calculus does things," and it's approachable right now. A hundred lines of Python implementing Euler's method on a system she chooses, and watching it diverge from the true solution as the step size grows, teaches more about differential equations than a chapter of exercises.

Beyond BC · what a college course does here — first-order linear equations

BC solves separable equations only. The other major solvable class is linear, and it's the one that actually appears in engineering — circuits, mixing tanks, drug clearance, anything with an external input.

y′ + P(x)·y = Q(x)

This is generally not separable, because Q(x) sits on the right. The trick is beautiful: multiply by exactly the right function and the left side collapses into a single derivative.

let μ(x) = e∫P(x)dxthe integrating factor
multiply through: μy′ + μPy = μQ
note μ′ = μP by the chain rulethis is why μ was chosen that way
so the left side is exactly (μy)′the product rule, run backwards
(μy)′ = μQ
μy = ∫μQ dx, so y = (1/μ)∫μQ dx

Worked: y′ + 2y = 6, y(0) = 1. Here P = 2, so μ = e2x. Then (e2xy)′ = 6e2x ⟹ e2xy = 3e2x + C ⟹ y = 3 + Ce−2x. With y(0) = 1, C = −2, so y = 3 − 2e−2x.

Read the answer: it approaches 3 — the equilibrium where y′ = 0 — with an exponentially decaying transient. That structure, "steady state plus decaying transient," is the shape of essentially every first-order physical system there is.

Beyond BC · second-order equations, and where e comes from

One step further, and it connects to Unit 10 in a way worth seeing. For

y″ + by′ + cy = 0

guess y = erx. Substituting gives erx(r² + br + c) = 0, so r must satisfy the characteristic equation r² + br + c = 0. A differential equation just became a quadratic.

That last case is the punchline. The equation y″ = −y has characteristic roots ±i, so its solutions are simultaneously exponentials and sinusoids. That is Euler's identity arriving from a completely different direction — not from three Taylor series lined up, but from the observation that oscillation and exponential decay are the same equation with different roots. Springs, pendulums, LC circuits, and AC power all live in the complex-root case.

Beyond BC · the Russian approach — Euler's method as a lab, not a formula

The tradition would not have her execute three steps of Euler's method by hand and stop. It would ask: how wrong is it, and why?

An afternoon's experiment, worth more than a chapter of exercises. Take y′ = y with y(0) = 1, whose exact answer is ex. Estimate y(1) using n steps of size h = 1/n:

nEuler estimate of eError
12.0000.718
102.5940.124
1002.7050.013
10002.7170.0014

Two things fall out. First, the error divides by ten when the step divides by ten — that's what "first-order, O(h)" means, seen rather than asserted. Second, the estimate is exactly (1 + 1/n)nthe compound-interest limit from Unit 1. Euler's method applied to y′ = y is the definition of e, rediscovered.

Fifteen lines of Python. And then the follow-up question that makes it stick: why does Euler always undershoot here? Because ex is concave up, so every tangent line lies below the curve — the same fact as linear approximation in Unit 4.

Formula sheet

Unit 7 — Differential Equations

Slope fields

Separation of variables

Exponential model

Logistic model

Euler's method

Practise Unit 7 → Fresh problems from this unit, with worked solutions.