Differential Equations
~3 weeks · February · 5–10%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
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.
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.
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 = 0 | so dy/dx = 0 whenever y = 0, regardless of x |
| dy/dx = x fails: at (2, 0) it would give slope 2, not 0 | eliminate |
| dy/dx = x + y fails: at (2, 0) it gives 2 | eliminate |
| 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).
Solve dy/dx = 2xy with y(0) = 3.
| dy/y = 2x dx | separate: all y's with dy on one side, all x's with dx on the other |
| ∫dy/y = ∫2x dx | integrate both sides |
| ln|y| = x² + C | one constant is enough — combine both sides' constants into one |
| |y| = ex²+C = eC·ex² | exponentiate |
| y = Aex², where A = ±eC is a new constant | absorb the messy constant; A can be any nonzero number |
| 3 = Ae0 = A | now apply y(0) = 3 |
| y = 3ex² |
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.
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.
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
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.
| Situation | Setup |
|---|---|
| Doubling time T | 2 = ekT → k = (ln 2)/T |
| Half-life T | ½ = ekT → k = −(ln 2)/T |
| Newton's law of cooling | dT/dt = k(T − Tambient) → T = Ta + Cekt, k < 0 |
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 = ku | substitution turns it into plain exponential decay |
| u = u0ekt, u0 = 90 − 20 = 70 | |
| at t = 10: 40 = 70e10k → e10k = 4/7 | 60 − 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
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.
- When P is small, (1 − P/M) ≈ 1 and growth is essentially exponential.
- As P approaches M, the factor approaches 0 and growth stalls.
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.
| Question | Answer, without solving anything |
|---|---|
| Long-run population | M (the carrying capacity), for any positive start |
| When is growth fastest? | at P = M/2 — the inflection point of the S-curve |
| Equilibrium solutions | P = 0 and P = M |
| Shape of the solution | S-curve: concave up below M/2, concave down above |
| dP/dt = kP − kP²/M | expand; this is a downward parabola in P |
| maximize over P: d/dP[kP − kP²/M] = k − 2kP/M = 0 | the growth rate is itself a function of P |
| P = M/2 | the 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.
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
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.
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 = 1 | evaluate f at the current point |
| y₁ = 1 + (1)(0.2) = 1.2, at x₁ = 0.2 | step along the tangent |
| slope = 0.2 + 1.2 = 1.4 | recompute at the new point |
| y₂ = 1.2 + (1.4)(0.2) = 1.48, at x = 0.4 | true 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.
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.
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.
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.
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.
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)dx | the integrating factor |
| multiply through: μy′ + μPy = μQ | |
| note μ′ = μP by the chain rule | this 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.
One step further, and it connects to Unit 10 in a way worth seeing. For
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.
- Two real roots → y = C₁er₁x + C₂er₂x. Overdamped: sags back to rest.
- Repeated root → y = (C₁ + C₂x)erx. Critically damped — the fastest return without overshoot, which is what a good door closer is tuned to.
- Complex roots α ± βi → y = eαx(C₁cos βx + C₂sin βx). Oscillation.
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.
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:
| n | Euler estimate of e | Error |
|---|---|---|
| 1 | 2.000 | 0.718 |
| 10 | 2.594 | 0.124 |
| 100 | 2.705 | 0.013 |
| 1000 | 2.717 | 0.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)n — the 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.
Unit 7 — Differential Equations
Slope fields
- A DE is a local rule: "here is your slope." Solutions flow along the ticks.
- Equilibrium solutions: horizontal rows of ticks, where dy/dx = 0
- To match a field to an equation, find where slopes are zero or constant along a line
Separation of variables
- Separate → integrate both sides → one +C → apply the initial condition immediately → then simplify
Exponential model
- dy/dt = ky ⟹ y = y₀ekt — rate proportional to amount
- doubling time T: k = ln2/T · half-life T: k = −ln2/T
- Cooling: dT/dt = k(T − Ta) ⟹ T = Ta + Cekt. Decay of the difference.
Logistic model
- dP/dt = kP(1 − P/M)
- Carrying capacity M · equilibria at 0 and M · fastest growth at P = M/2 · S-shaped solution
- limt→∞P = M for any positive start
Euler's method
- yn+1 = yn + f(xn,yn)·h — recompute the slope at each new point
- Concave up ⟹ tangent below curve ⟹ Euler underestimates; concave down ⟹ overestimates
- Error is O(h) — halving the step halves the error
Practise Unit 7 → Fresh problems from this unit, with worked solutions.