Separable Differential Equations

Recognize and solve separable first-order ODEs by separating variables and integrating, with a worked example.

  • University Physics Year 1
On this page

A first-order ODE is separable if you can rewrite it as a pure-x factor times a pure-y factor:

dy/dx = f(x) g(y).

Some sources call these “variable separable” equations.

In physics, separable ODEs are common because many models say “rate of change = (something depending on the state) × (something depending on time/position)”.

Why physics needs this (examples you can click)
Recognition trick

If you can move everything involving y (and dy) to one side and everything involving x (and dx) to the other, it’s separable.


Method (separate → integrate)

Starting from

dy/dx = f(x) g(y),
Template (what to write in an exam)
  1. Rearrange into (1/g(y))dy = f(x)dx.
  2. Integrate both sides and include + C.
  3. Solve for y if possible.
  4. Apply the initial condition to determine C.
  5. Do a quick check: differentiate your answer and verify the ODE.
  1. Separate variables

    1/g(y) dy = f(x) dx
  2. Integrate both sides

    ∫ 1/g(y) dy = ∫ f(x) dx + C
  3. Solve for y if possible, and apply initial conditions to fix C.

Don’t forget equilibrium (constant) solutions

If g(y*) = 0, then y(x) = y* is a constant solution (often physically meaningful).

Pitfalls (the ones that bite in physics)
  • Missing absolute values in logs: if you integrate ∫ dy/y you must write ln |y|.
  • Dividing by something that can be zero: when you divide by g(y), you may lose solutions with g(y) = 0. Handle equilibrium solutions separately.
  • Forgetting the domain: after solving, check where the solution is defined (e.g. denominators not zero).

Worked example

Solve

dy/dx = x y², y(0) = 1.

Separate:

dy/y² = x dx.

Integrate:

∫ y⁻² dy = ∫ x dx ⇒ -1/y = x²/2 + C.

Apply y(0) = 1:

-1 = 0 + C ⇒ C = -1.

So the solution is:

y(x) = 1/(1-x²/2).

Worked example (physics): exponential decay / relaxation

Radioactive decay and many “relaxation” models start from

dN/dt = -λ N, N(0) = N₀.

Separate:

1/N dN = -λ dt.

Integrate:

∫ 1/N dN = ∫ -λ dt ⇒ ln |N| = -λ t + C.

Exponentiate and apply N(0) = N₀:

N(t) = N₀e^(-λ t).

Interpretation:

  • λ has units s⁻¹ and sets the decay rate.
  • Half-life: t_(1/2) = (ln 2)/λ.

Worked example (physics): quadratic drag leads to tanh

One standard falling-with-drag model is

dv/dt = g-(b/m)v², v(0) = 0,

where b is a drag constant and v ≥ 0 after release.

Define the terminal speed

vₜ = square root of (mg/b) .

Then the ODE becomes

dv/dt = g(1-v²/vₜ²).

Separate variables using u = v/vₜ:

dv/(1-(v/vₜ)²) = g dt ⇒ vₜdu/(1-u²) = g dt.

Integrate:

vₜ artanh(u) = gt + C.

Apply v(0) = 0 so u(0) = 0 and C = 0:

u = tanh(gt/vₜ) ⇒ v(t) = vₜ tanh(gt/vₜ).

Sanity checks:

  • t → 0: tanh x ≈ x, so v ≈ gt (free-fall initially).
  • t → ∞: tanh → 1, so v → vₜ (terminal speed).

For full physical setup/sign conventions, see UY1: Resistive Forces.


Practice (with hints + answers)

1) Solve: dy/dx = 3xy, with y(0)=2

Hint: Move all y terms to the left: (1/y)dy = 3x dx.

Answer:

(1/y)dy = 3x dx ⇒ ln |y| = (3/2)x² + C.

Apply y(0) = 2: ln 2 = C.

y(x) = 2e^((3/2)x²).
2) Solve: dq/dt = -(1/RC) q, with q(0)=q0

Hint: This is separable and gives an exponential.

Answer:

q(t) = q₀e^(-t/RC).
3) Find equilibrium solutions of: dy/dt = y(1-y)

Hint: Set the right-hand side to zero.

Answer: Equilibria are y(t) = 0 and y(t) = 1 because y(1-y) = 0 at y = 0,1.

4) (Stretch) Solve: dy/dx = y^2, y(0)=1

Hint: ∫ y⁻²dy = -1/y.

Answer:

dy/y² = dx ⇒ -1/y = x + C.

Apply y(0) = 1: -1 = C.

y(x) = 1/(1-x).

Back to First Order Differential Equations