5.1 What is an ODE?

Before any trick or formula, let’s put a clear picture in your head.

An ordinary differential equation (ODE) is an equation that relates an unknown function x(t)x(t) to its derivatives. The classic example is the equation of motion for a mass on a spring,

mx¨  =  kx,m\, \ddot x \;=\; -k\, x,

which says: the acceleration of xx is proportional to the current displacement, with a minus sign. The unknown is not a number — it is a curve. Solving the ODE means finding which curves x(t)x(t) satisfy the equation.

ODEs are the language we reach for whenever a quantity changes in time, and the rate of change depends on the current state. Concretely:

All of those obey the same family of ODEs we are about to learn. The point of this chapter is that once you can solve a small handful of them — exponential decay, simple harmonic motion, damped oscillation, forced oscillation — you can read off the behaviour of nearly any linear physical system on the bookshelf.

An ODE is a slope field

Here is the picture worth keeping in mind, before any solving happens. A first-order ODE in the form

x˙  =  f(t,x)\dot x \;=\; f(t, x)

is just a slope field. At every point (t,x)(t, x) in the plane, the right-hand side f(t,x)f(t, x) gives you a number — the slope of xx at that point. The equation, viewed this way, is a map: here is how steeply xx would be changing if it passed through this point.

Solutions are curves that thread through the field tangentially — wherever they go, they follow the local slope.

ẋ = −0.5 xt →x
field:

Slopes are proportional to x with a minus sign. All trajectories curve toward x = 0 — the single stable equilibrium.

Click anywhere in the plot to launch a trajectory from that initial condition.

Pick a field. Click anywhere in the plot to drop an initial condition and watch the solution thread out from it. (The trajectories are computed numerically by RK4 — Foundations 10.2 covers the algorithm.) The three presets are:

Two things to take away. First, the equation and the picture are the same thing. Knowing f(t,x)f(t, x) everywhere is knowing what every solution must locally do. We do not need a formula to draw the field. Second, the picture is general — it works for nonlinear ODEs (the logistic preset) and time-varying ones (the forced preset), not only for the constant-coefficient linear ones we are about to focus on. The rest of the chapter gives us explicit formulas for the threading curves, but the picture itself exists first, no algebra required.

Order: what the number means

When we say a “first-order” or “second-order” ODE, we are counting derivatives. The order of an ODE is the highest derivative that appears in it. First-order equations contain x˙\dot x but no higher derivatives; second-order equations also contain x¨\ddot x; nn-th order goes up to x(n)x^{(n)}.

Order is the single most important descriptor of an ODE because it controls three connected things — the physics, the mathematics, and the bookkeeping of initial data.

Physics. A first-order system has no inertia. Its full state is captured by one number (its current value), and how fast that number changes depends only on its current value. A capacitor discharging, a radioactive sample, a drug clearing — these all fit. A first-order system cannot oscillate. Once it reaches equilibrium it stops; there is no “momentum” to overshoot with.

A second-order system has inertia — two pieces of state (position and velocity), and momentum carries it through equilibrium. Anything that can oscillate is at least second-order: a mass on a spring, a pendulum, an LC circuit, every acoustic resonance, the cochlear filter at each place on the basilar membrane.

Mathematics. For a linear ODE with constant coefficients, the order is the degree of the characteristic polynomial — the key idea we’ll meet in 5.2 — First-order linear ODEs. An nn-th order linear ODE produces an nn-th-degree polynomial in λ\lambda, hence nn roots, hence nn linearly-independent solutions, hence nn free constants in the general solution.

Bookkeeping. To pin down a unique solution out of that family you need nn pieces of initial data — one per free constant.

OrderWhat’s in the equationFree constantsInitial data neededTypical examples
1stx˙\dot x only1x(0)x(0)RC discharge, simple decay or growth
2ndx¨\ddot x also2x(0)x(0) and x˙(0)\dot x(0)mass-spring, LC circuit, pendulum, every acoustic mode
nn-thup to x(n)x^{(n)}nnnn values at t=0t = 0rarely needed; same machinery

We focus on first- and second-order because that is where every interesting acoustic and biological system on the bookshelf lives. The next lesson — 5.2 — First-order linear ODEs — begins with the simplest non-trivial case.