Skip to content

Mathematics · Ch 12 — Differential Equations

Solution by Separation of Variables

4

Solution by Separation of Variables

The simplest first-order, first-degree differential equations to solve are those whose right-hand side, when written as dydx=h(x,y)\dfrac{dy}{dx} = h(x,y), factorises as a function of xx alone times a function of yy alone:

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

Such an equation is said to have variables separable.

Method. Provided g(y)≠0g(y) \neq 0, divide both sides by g(y)g(y) and multiply by dxdx to collect every yy-term (together with dydy) on one side and every xx-term (together with dxdx) on the other:

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

Both sides are now ordinary single-variable expressions, so each can be integrated independently:

∫dyg(y)=∫f(x) dx+C,\int \frac{dy}{g(y)} = \int f(x)\,dx + C,

where a single arbitrary constant CC is added (the two separate constants of integration are absorbed into one, since only their difference matters). Carrying out both integrals and simplifying gives the general solution, usually as an implicit relation between xx and yy; if possible, this is then solved explicitly for yy.

If dydx=f(x)g(y)\dfrac{dy}{dx} = f(x)g(y), then ∫dyg(y)=∫f(x) dx+C\displaystyle\int \frac{dy}{g(y)} = \int f(x)\,dx + C is the general solution -- separate the variables, then integrate each side on its own.

Worked derivation. To solve dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y} (y≠0y \neq 0): separate, y dy=x dxy\,dy = x\,dx; integrate both sides, y22=x22+C1\dfrac{y^2}{2} = \dfrac{x^2}{2} + C_1; multiply by 22 and rename the constant, y2−x2=Cy^2 - x^2 = C. Substituting back confirms this satisfies the original equation for every value of CC: differentiating y2−x2=Cy^2 - x^2 = C implicitly gives 2y y′−2x=02y\,y' - 2x = 0, i.e. y′=x/yy' = x/y, exactly the equation started with. …