5.2 First-order linear ODEs

We begin with the simplest non-trivial differential equation in physics. It has one derivative, one unknown function, and one parameter — and yet it is the model for an astonishing range of phenomena. By the end of this lesson you’ll know how to solve it, why the solution is an exponential, and how the single trick that handles it actually generalises to every linear ODE we’ll meet in this chapter.

The general form

A first-order linear ODE with constant coefficients looks like

x˙  +  αx  =  f(t),\dot x \;+\; \alpha\, x \;=\; f(t),

where α\alpha is a constant and f(t)f(t) is a given forcing function — some external signal or driving that pumps into the system. If f(t)=0f(t) = 0 we call the equation homogeneous, and that is where we begin. Setting f=0f = 0 and α>0\alpha > 0 gives

x˙  =  αx.\dot x \;=\; -\alpha\, x.

In words: the rate of change of xx is proportional to xx itself, with a negative sign. If xx is positive, it shrinks; if negative, it grows back toward zero. Either way, the larger x|x| is, the faster it heads home.

x₀/eτ = 1/α = 2.00t →x(t)x(t) = 1.00, current = 1.000
t = 0.00 · x = x₀·e−αt = 1.000

Slide α\alpha and watch the steepness change. The solution — which we’ll derive in a moment, but might as well show now — is

x(t)  =  x0eαt,x(t) \;=\; x_0\, e^{-\alpha t},

with x0=x(0)x_0 = x(0) the initial value. The constant

τ    1/α\tau \;\equiv\; 1/\alpha

is the time constant: the time it takes the curve to fall by a factor of 1/e0.371/e \approx 0.37. The dashed lines in the plot mark τ\tau and x0/ex_0/e.

Where this equation shows up

Exponential decay is everywhere because it describes the most generic possible loss process — a rate proportional to what is left. A short, incomplete tour:

Each of those systems has a different physical meaning for α\alpha — a leak rate, a cooling rate, a half-life — but the mathematics is identical. Recognising “this is exponential decay” instantly tells you the time constant, the asymptotic value, and the qualitative behaviour. That recognition pays off again and again across the rest of the bookshelf.

The trick that solves every linear ODE

How did we know to try eαte^{-\alpha t} as the solution? We didn’t, exactly — we guessed. Substitute the ansatz x(t)=eλtx(t) = e^{\lambda t} for some unknown number λ\lambda into the equation:

λeλtx˙  =  αeλtαx.\underbrace{\lambda\, e^{\lambda t}}_{\dot x} \;=\; \underbrace{-\alpha\, e^{\lambda t}}_{-\alpha x}.

For this to hold at all tt, the exponential factors on both sides cancel, leaving

λ  =  α.\lambda \;=\; -\alpha.

So x=eαtx = e^{-\alpha t} works. By linearity, any constant multiple of it works too — and x0eαtx_0 e^{-\alpha t} is the unique solution that matches the initial condition x(0)=x0x(0) = x_0.

That guess-an-exponential move is the characteristic-equation method, and it works for every linear ODE with constant coefficients. The recipe is the same four steps every time:

  1. Write the ODE.
  2. Substitute x=eλtx = e^{\lambda t}.
  3. The exponentials cancel and you are left with an algebraic equation in λ\lambda — the characteristic equation.
  4. Solve for λ\lambda. Each root λk\lambda_k gives one solution eλkte^{\lambda_k t}, and the general solution is the linear combination.

That is it. We’ve just demoted “solving an ODE” to “solving a polynomial,” which is to say to high-school algebra.

If you’ve never seen the recipe spelled out at full granularity, the collapsible block below walks it through on a concrete numerical example, one elementary step at a time, with the why attached to every move.

Worked example: every step, no shortcuts

The problem. Solve

x˙  +  3x  =  0,x(0)  =  5.\dot x \;+\; 3\, x \;=\; 0, \qquad x(0) \;=\; 5.

Find the function x(t)x(t) that satisfies the equation for all t0t \geq 0 and also matches the initial value x(0)=5x(0) = 5.

Step 1 — Write down the ansatz. “Ansatz” is German for educated guess. Based on the recipe, we propose that the answer has the form

x(t)  =  eλt,x(t) \;=\; e^{\lambda t},

where λ\lambda is an unknown constant we are about to solve for. The whole point of the trick is to defer committing to a specific value of λ\lambda and see what the equation forces it to be.

Step 2 — Differentiate the ansatz. The chain rule gives

x˙(t)  =  ddteλt  =  λeλt.\dot x(t) \;=\; \frac{d}{dt}\, e^{\lambda t} \;=\; \lambda\, e^{\lambda t}.

The factor of λ\lambda comes down out of the exponent because λt\lambda t has derivative λ\lambda with respect to tt. This is the reason exponentials are the magic ansatz for linear constant-coefficient ODEs: differentiating an exponential gives you back the same exponential, multiplied by a constant. The structure of the equation is preserved under differentiation.

Step 3 — Substitute into the ODE. Plug both xx and x˙\dot x into the equation x˙+3x=0\dot x + 3 x = 0:

λeλtx˙  +  3eλt3x  =  0.\underbrace{\lambda\, e^{\lambda t}}_{\dot x} \;+\; \underbrace{3 \cdot e^{\lambda t}}_{3 x} \;=\; 0.

Step 4 — Factor out the exponential. Both terms on the left share the factor eλte^{\lambda t}. Pull it out:

eλt(λ+3)  =  0.e^{\lambda t}\, (\lambda + 3) \;=\; 0.

Step 5 — Cancel the exponential. For the product on the left to be zero, either eλt=0e^{\lambda t} = 0 or λ+3=0\lambda + 3 = 0. But eλte^{\lambda t} is never zero — the exponential function is strictly positive for any real exponent, and even for complex exponents it has magnitude eReλt0e^{\mathrm{Re}\,\lambda \cdot t} \neq 0. So that factor cannot be what is making the product vanish. The only way the equation can hold is

λ+3  =  0.\lambda + 3 \;=\; 0.

This is the characteristic equation for our ODE. Notice what just happened: we went from an equation about a function (the ODE) to an equation about a single number (λ\lambda). The function-level structure has been absorbed into the algebra.

Step 6 — Solve for λ\lambda. Trivially:

λ  =  3.\lambda \;=\; -3.

Step 7 — Write the candidate solution. Plug λ=3\lambda = -3 back into the ansatz:

x(t)  =  e3t.x(t) \;=\; e^{-3 t}.

This is one function that satisfies the ODE. Check by direct substitution: x˙=3e3t\dot x = -3 e^{-3 t}, and x˙+3x=3e3t+3e3t=0\dot x + 3 x = -3 e^{-3 t} + 3 e^{-3 t} = 0. ✓

Step 8 — Promote to the general solution using linearity. The ODE is linear, so for any constant CC the function Ce3tC\, e^{-3 t} also satisfies it. Verify: x˙=3Ce3t\dot x = -3 C e^{-3 t} and x˙+3x=3Ce3t+3Ce3t=0\dot x + 3 x = -3 C e^{-3 t} + 3 \cdot C e^{-3 t} = 0. ✓ This is the general solution — a one-parameter family of curves, with CC free:

x(t)  =  Ce3t.x(t) \;=\; C\, e^{-3 t}.

It’s a one-parameter family because the ODE is first-order and “free constants == order” (from 5.1). For a second-order ODE we’d get a two-parameter family.

Step 9 — Apply the initial condition. We were given x(0)=5x(0) = 5. Evaluate the general solution at t=0t = 0:

x(0)  =  Ce30  =  Ce0  =  C1  =  C.x(0) \;=\; C\, e^{-3 \cdot 0} \;=\; C\, e^{0} \;=\; C \cdot 1 \;=\; C.

So C=5C = 5.

Step 10 — Write the final answer.

  x(t)  =  5e3t  \boxed{\;x(t) \;=\; 5\, e^{-3 t}\;}

Step 11 — Sanity-check the answer. Three quick checks:

  1. Initial condition. x(0)=5e0=5x(0) = 5 e^0 = 5. ✓
  2. ODE itself. x˙=15e3t\dot x = -15 e^{-3t}, and x˙+3x=15e3t+35e3t=15e3t+15e3t=0\dot x + 3 x = -15 e^{-3 t} + 3 \cdot 5 e^{-3 t} = -15 e^{-3 t} + 15 e^{-3 t} = 0. ✓
  3. Qualitative shape. The coefficient in x˙+3x=0\dot x + 3 x = 0 is positive, so α=3\alpha = 3 and the system should decay with time constant τ=1/α=1/3\tau = 1/\alpha = 1/3. At t=1/3t = 1/3 the answer should be 5/e1.845 / e \approx 1.84. Check: 5e31/3=5e11.845 e^{-3 \cdot 1/3} = 5 e^{-1} \approx 1.84. ✓

That is the entire recipe. Eleven steps and we never had to know a single thing about ODEs beyond the shape of the ansatz. The recipe scales without modification to second- and higher-order linear ODEs — only steps 5–6 get more interesting, because the characteristic equation becomes a quadratic or higher-degree polynomial with more (and possibly complex) roots to combine. We’ll see that play out in 5.3.

The carousel below walks the same recipe across seven increasingly rich examples — including the second-order cases we’ll work through properly in 5.3.

1 of 7 first-order decay
1. the ODE ẋ + α x = 0 (α = 1)
2. substitute x = eλt λ + α = 0
3. solve for λ λ = −α = −1
4. solution x(t) = e^(−α t)
x(t)t →

One real negative root → pure exponential decay.

Click through. Watch how the qualitative shape of the answer falls directly out of where the root λ\lambda lives in the complex plane. (For higher-degree characteristic polynomials, finding λ\lambda becomes a numerical root-finding problem — see Foundations 10.6.)

The last case is the one worth flagging here, because it looks like an exception to the recipe. When the characteristic polynomial has a double root, the recipe yields only one exponential — but a second-order ODE must have a two-parameter family of solutions. The missing piece turns out to be teλtt\, e^{\lambda t}, which you can verify by substitution. The “critically damped” regime of the damped oscillator is precisely this case, and we’ll meet it concretely in 5.3.

The central fact about linear constant-coefficient ODEs is in that bullet list: the character of the solution is encoded entirely in the position of the roots in the complex plane. The next lesson takes us from one root (first-order) to two roots (second-order), where the action gets interesting.