Differential Equations

AP Calculus AB/BC · Advanced Placement

Differential Equations: the big picture

A differential equation relates an unknown function to its derivatives, and it is the natural language of change: Newton's laws, population growth, chemical kinetics, epidemics and circuits are all differential equations. Modeling means turning a verbal law ('the rate of growth is proportional to the population') into an equation such as dP/dt = kP. A solution is a function that satisfies the equation; an initial condition picks one solution from the family. Direction (slope) fields draw short segments of slope f(x, y) at grid points, so solution curves can be sketched without solving anything, and Euler's method follows those slopes in small steps, yₙ₊₁ = yₙ + h·f(xₙ, yₙ), with error proportional to h. Separable equations dy/dx = g(x)h(y) are solved by separating variables and integrating both sides; they include exponential growth, Newton's law of cooling, mixing problems and the logistic equation dP/dt = kP(1 − P/M), whose solutions approach the carrying capacity M and grow fastest at M/2. First-order linear equations y′ + P(x)y = Q(x) are solved with the integrating factor e^(∫P dx). Systems such as the Lotka–Volterra predator–prey equations couple two populations; their phase-plane trajectories are closed loops around an equilibrium, and the same ideas underlie the SIR model of epidemics.

Modeling, Direction Fields & Euler's Method

A differential equation tells you the slope of an unknown function at every point. You can see its solutions without solving it: draw a direction field — tiny line segments with slope f(x, y) at many points — and solution curves follow the segments like iron filings follow a magnet. Euler's method turns this into numbers: start at a known point, step forward by h along the current slope, recompute the slope, and repeat: yₙ₊₁ = yₙ + h·f(xₙ, yₙ). Smaller steps give better answers; the error shrinks roughly in proportion to h. Better schemes such as Runge–Kutta average several slopes per step.

{{illustration:calc-l09-f1}}

{{illustration:calc-l09-f2}}

Key relations

- Euler's method. yₙ₊₁ = yₙ + h f(xₙ, yₙ) ; xₙ₊₁ = xₙ + h

Separable Equations & Population Growth

A separable equation can be written dy/dx = g(x)·h(y). Move everything with y to one side and everything with x to the other — dy/h(y) = g(x) dx — then integrate both sides and solve for y. This handles exponential growth (dy/dt = ky), Newton's law of cooling (dT/dt = −k(T − Tₛ)) and the logistic model dP/dt = kP(1 − P/M). The logistic solution P(t) = M/(1 + Ae^(−kt)) rises like an exponential at first and then levels off at the carrying capacity M, growing fastest when P = M/2.

{{illustration:calc-l09-f3}}

{{illustration:calc-l09-f4}}

Key relations

- Separation of variables and the logistic solution. ∫dy/(h(y)) = ∫ g(x) dx ; P(t) = M/(1 + Ae^(−kt)), A = (M − P₀)/(P₀)

Linear Equations & Predator–Prey Systems

A first-order linear equation has the form y′ + P(x)y = Q(x). Multiply through by the integrating factor I(x) = e^(∫P dx): the left side becomes the derivative of I·y, so you can integrate directly. This solves mixing tanks and RC circuits. Many systems involve two interacting quantities. In the Lotka–Volterra model, prey grow when predators are scarce and predators grow when prey are plentiful: dx/dt = ax − bxy and dy/dt = −cy + dxy. Plotting predators against prey traces closed loops around an equilibrium, and the populations rise and fall in a repeating cycle, with the predator peak lagging the prey peak.

{{illustration:calc-l09-f5}}

{{illustration:calc-l09-f6}}

Key relations

- Integrating factor and Lotka–Volterra. (e^(∫ P dx)y)′ = Q e^(∫ P dx) ; dx/dt = ax − bxy, dy/dt = −cy + dxy