Separable Equations

The friendliest differential equations are the ones that come apart. A first-order ODE is separable when its right-hand side factors into a part depending only on x and a part depending only on y:

\frac{dy}{dx} = g(x)\,h(y).

When that happens we can shepherd all the y's to one side and all the x's to the other, then integrate each side on its own. It is the most direct solution method in the whole subject, and it is the one every other technique secretly hopes to reduce to.

Treating \tfrac{dy}{dx} as a ratio of differentials — a manoeuvre justified by the chain rule, as the theorem notes — the recipe is

\frac{dy}{h(y)} = g(x)\,dx \quad\Longrightarrow\quad \int \frac{dy}{h(y)} = \int g(x)\,dx.

The centrepiece: solving y' = ky

One separable equation governs an astonishing share of the natural world — populations, radioactive decay, compound interest, cooling coffee. It is

\frac{dy}{dx} = ky,

"the rate of change is proportional to the amount present." Let us solve it from scratch, line by line. Here g(x) = k (a constant) and h(y) = y.

Step 1 — separate the variables. Divide both sides by y and multiply by dx, collecting each letter on its own side:

\frac{dy}{y} = k\,dx.

Step 2 — integrate both sides. The left integral is a standard logarithm; the right is the integral of a constant:

\int \frac{dy}{y} = \int k\,dx \quad\Longrightarrow\quad \ln|y| = kx + C_1.

Step 3 — exponentiate to free y. Apply e^{(\cdot)} to both sides, and split the exponential of a sum:

|y| = e^{kx + C_1} = e^{C_1}\,e^{kx}.

Step 4 — absorb the constants. The factor e^{C_1} is just some positive constant; dropping the absolute value lets it carry a sign, and the case y \equiv 0 (lost when we divided by y) is recovered by allowing the constant to be zero. Write the single constant as C = \pm e^{C_1}:

\boxed{\,y = C\,e^{kx}\,.}

Step 5 — read off the meaning. Setting x = 0 gives y(0) = C, so C is the initial amount. With k > 0 this is exponential growth; with k < 0, exponential decay. The proportional-rate law and the exponential function are two faces of the same fact.

A second example, with an initial condition

Separable equations need not be linear. Solve the IVP

\frac{dy}{dx} = \frac{x}{y}, \qquad y(0) = 2.

Step 1 — separate. Here g(x) = x and 1/h(y) = 1/(1/y) = y, so bring the y across:

y\,dy = x\,dx.

Step 2 — integrate both sides.

\int y\,dy = \int x\,dx \quad\Longrightarrow\quad \frac{y^2}{2} = \frac{x^2}{2} + C_1.

Step 3 — tidy into an implicit relation. Multiply by 2 and rename the constant C = 2C_1:

y^2 = x^2 + C.

Step 4 — apply the initial condition y(0) = 2. Substitute x = 0, y = 2: 4 = 0 + C, so C = 4.

Step 5 — solve for y. Take the root, choosing the positive branch because y(0) = 2 > 0:

y = \sqrt{x^2 + 4}.

A quick check: y' = x/\sqrt{x^2+4} = x/y, and y(0) = 2. Both the equation and the initial condition hold. ✓

If a first-order ODE has the form \dfrac{dy}{dx} = g(x)\,h(y) with h(y) \ne 0, then it is solved by separating and integrating:

\int \frac{dy}{h(y)} = \int g(x)\,dx + C.

This is legitimate because, by the chain rule, if H' = 1/h and G' = g then \tfrac{d}{dx}H(y(x)) = \tfrac{1}{h(y)}y' = g(x) = G'(x), so H(y) = G(x) + C. Two riders:

Pure exponential growth y' = ky is a fantasy of unlimited resources — left alone, the population reaches the moon. Reality imposes a ceiling, the carrying capacity M, and the fix is the logistic equation, still separable:

\frac{dy}{dx} = k\,y\left(1 - \frac{y}{M}\right).

When y is small the bracket is near 1 and growth is nearly exponential; as y \to M the bracket \to 0 and growth stalls. Separating and integrating (the y-integral needs partial fractions) gives the S-shaped curve

y = \frac{M}{1 + A\,e^{-kx}}, \qquad A = \frac{M - y_0}{y_0}.

It rises exponentially, bends at the inflection point y = M/2, then levels off at M — the model behind epidemics, technology adoption, and bounded population growth alike. The constant solutions y \equiv 0 and y \equiv M are the equilibria the theorem warned us to keep.

The family y = Ce^{kx}, live

Below is the solution curve of y' = ky for sliders k (the growth rate) and C = y(0) (the starting amount). Push k positive for runaway growth, negative for decay toward the axis; the faint reference curve is the unit exponential e^{x}. Each setting is one member of the infinite family the general solution describes.