STEMviz
Mathematics · Differential Equations and Complex Analysis

Separable, Homogeneous and Linear First-Order Equations

Develops separation of variables with its singular solutions, the v=y/x substitution for homogeneous equations, and the integrating factor for linear first-order equations.

Separable, Homogeneous and Linear First-Order Equations

Chapter 1 set up first-order equations and proved when they are well posed; this chapter supplies the three standard techniques that actually produce a closed-form solution: separation of variables, the homogeneous substitution v=y/xv=y/x, and the integrating factor for linear equations. Each technique reduces the given ODE to one or two ordinary integrals, so the chapter is really about recognising which reduction applies and executing it correctly — including the bookkeeping steps (singular solutions, the constant of integration, the role of the integrating factor) that are the most common sources of lost marks.

Have to hand: techniques of integration from a first calculus course (substitution, partial fractions), and the vocabulary of Chapter 1 (order, linearity, IVP, equilibrium solution).

1. Separable Equations

A first-order ODE is separable if it can be written as

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

for some functions g,hg,h — the right side splits into a factor depending only on xx and a factor depending only on yy.

Method. Wherever h(y)≠0h(y)\ne 0, divide by h(y)h(y) and integrate both sides with respect to xx:

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

This is justified by the chain rule: if H(y)=∫dyh(y)H(y) = \int \frac{dy}{h(y)}, then ddxH(y(x))=H′(y) y′=y′h(y)=g(x)\dfrac{d}{dx}H(y(x)) = H'(y)\,y' = \dfrac{y'}{h(y)} = g(x), and integrating both sides in xx recovers exactly the displayed equation.

Singular solutions. Every zero y=y0y=y_0 of h(y)h(y) gives the constant function y≡y0y\equiv y_0 as an extra solution, which the division step silently discards. These are exactly the equilibrium solutions of Chapter 1 (Section 4) and must be reported separately — a separable-equation answer that omits them is incomplete.

Worked example (logistic equation, solved explicitly). Solve y′=y(1−y)y' = y(1-y), y(0)=y0y(0)=y_0 with 0<y0<10<y_0<1. Separating,

∫dyy(1−y)=∫dx.\int \frac{dy}{y(1-y)} = \int dx.

Partial fractions give 1y(1−y)=1y+11−y\dfrac{1}{y(1-y)} = \dfrac{1}{y} + \dfrac{1}{1-y}, so the left side integrates to ln⁡∣y∣−ln⁡∣1−y∣=ln⁡∣y1−y∣\ln|y| - \ln|1-y| = \ln\left|\dfrac{y}{1-y}\right|. Hence

ln⁡∣y1−y∣=x+C⟹y1−y=Aex,A=±eC.\ln\left|\frac{y}{1-y}\right| = x + C \quad\Longrightarrow\quad \frac{y}{1-y} = Ae^{x}, \quad A = \pm e^{C}.

Using y(0)=y0y(0)=y_0 gives A=y0/(1−y0)A = y_0/(1-y_0), and solving for yy,

y(x)=Aex1+Aex=11+(1−y0y0)e−x.y(x) = \frac{Ae^x}{1+Ae^x} = \frac{1}{1+\left(\frac{1-y_0}{y_0}\right)e^{-x}}.

As x→∞x\to\infty, y(x)→1y(x)\to 1 — matching the stability analysis of Chapter 1 (the equilibrium y=1y=1 is asymptotically stable), and this is the "S-shaped" logistic curve. The discarded singular solutions y≡0y\equiv 0 and y≡1y\equiv 1 are precisely the two equilibria.

2. Homogeneous Equations

A first-order ODE is homogeneous (in the ODE sense — not to be confused with the "homogeneous" linear equations of Section 3, an unfortunate but standard clash of terminology) if it can be written as

dydx=f ⁣(yx)\frac{dy}{dx} = f\!\left(\frac{y}{x}\right)

for some function ff of a single variable, i.e. the right side depends on xx and yy only through the ratio y/xy/x. Equivalently, M(x,y) dx+N(x,y) dy=0M(x,y)\,dx + N(x,y)\,dy=0 is homogeneous in this sense if M,NM,N are homogeneous functions of the same degree (M(tx,ty)=tnM(x,y)M(tx,ty)=t^nM(x,y), likewise NN), since then their ratio depends only on y/xy/x.

Method (the substitution v=y/xv=y/x). Set y=vxy = vx, so v=y/xv = y/x and, by the product rule, y′=v+xdvdxy' = v + x\dfrac{dv}{dx}. Substituting into y′=f(y/x)=f(v)y'=f(y/x)=f(v) gives

v+xdvdx=f(v)⟹xdvdx=f(v)−v,v + x\frac{dv}{dx} = f(v) \quad\Longrightarrow\quad x\frac{dv}{dx} = f(v) - v,

which separates in vv and xx:

∫dvf(v)−v=∫dxx.\int \frac{dv}{f(v)-v} = \int \frac{dx}{x}.

This is why the technique belongs in this chapter: every homogeneous equation reduces to a separable one after exactly one substitution.

Worked example. Solve dydx=x2+y2xy\dfrac{dy}{dx} = \dfrac{x^2+y^2}{xy}. Dividing numerator and denominator by x2x^2, the right side is 1+(y/x)2y/x=1+v2v\dfrac{1+(y/x)^2}{y/x} = \dfrac{1+v^2}{v} with v=y/xv=y/x, confirming the equation is homogeneous. Substituting y=vxy=vx, y′=v+xv′y'=v+xv':

v+xdvdx=1+v2v⟹xdvdx=1+v2v−v=1v.v + x\frac{dv}{dx} = \frac{1+v^2}{v} \quad\Longrightarrow\quad x\frac{dv}{dx} = \frac{1+v^2}{v} - v = \frac{1}{v}.

Separating, v dv=dxxv\,dv = \dfrac{dx}{x}, so v22=ln⁡∣x∣+C\dfrac{v^2}{2} = \ln|x| + C, i.e. v2=2ln⁡∣x∣+C1v^2 = 2\ln|x| + C_1. Substituting back v=y/xv=y/x:

y2x2=2ln⁡∣x∣+C1⟹y2=x2(2ln⁡∣x∣+C1).\frac{y^2}{x^2} = 2\ln|x| + C_1 \quad\Longrightarrow\quad y^2 = x^2\bigl(2\ln|x|+C_1\bigr).

3. Linear First-Order Equations

A first-order linear ODE, from Chapter 1, can always be arranged into standard form

dydx+p(x) y=q(x).\frac{dy}{dx} + p(x)\,y = q(x).

Unlike general nonlinear first-order equations, this entire class has a single, universal method of solution.

Theorem (integrating factor). If p,qp,q are continuous on an interval II, define μ(x)=e∫p(x) dx\mu(x) = e^{\int p(x)\,dx} (any one antiderivative). Then on II,

ddx[μ(x) y]=μ(x) q(x),\frac{d}{dx}\bigl[\mu(x)\,y\bigr] = \mu(x)\,q(x),

and hence the general solution is

y(x)=1μ(x)(∫μ(x) q(x) dx+C).y(x) = \frac{1}{\mu(x)}\left(\int \mu(x)\,q(x)\,dx + C\right).

Proof. By the product rule, ddx[μy]=μy′+μ′y\dfrac{d}{dx}[\mu y] = \mu y' + \mu' y. Since μ′=p(x)μ(x)\mu' = p(x)\mu(x) (as μ=e∫p dx\mu=e^{\int p\,dx}), this is μy′+pμy=μ(y′+py)\mu y' + p\mu y = \mu(y'+py). If yy solves the ODE, y′+py=qy'+py=q, so ddx[μy]=μq\dfrac{d}{dx}[\mu y] = \mu q exactly — the left side is now a single derivative, hence directly integrable. Conversely, integrating ddx[μy]=μq\dfrac{d}{dx}[\mu y]=\mu q and dividing by μ\mu (never zero, since it is an exponential) recovers every solution of the original equation. ■\blacksquare

The entire content of the method is the observation that μ(x)\mu(x) was engineered precisely so that μy′+μ′y\mu y' + \mu' y collapses to the derivative of a product — the same combination that appears on the left after multiplying the standard form through by μ\mu.

Worked example (mixing problem, continued from Chapter 1). Solve y′=2−y50y' = 2 - \dfrac{y}{50}, y(0)=0y(0)=0, i.e. y′+150y=2y' + \dfrac{1}{50}y = 2 in standard form, so p(x)=150p(x)=\tfrac{1}{50} (constant) and q(x)=2q(x)=2. The integrating factor is μ(x)=e∫(1/50) dx=ex/50\mu(x) = e^{\int (1/50)\,dx} = e^{x/50}. Then

ddx[ex/50y]=2ex/50⟹ex/50y=100ex/50+C⟹y(x)=100+Ce−x/50.\frac{d}{dx}\bigl[e^{x/50}y\bigr] = 2e^{x/50} \quad\Longrightarrow\quad e^{x/50}y = 100e^{x/50} + C \quad\Longrightarrow\quad y(x) = 100 + Ce^{-x/50}.

Applying y(0)=0y(0)=0: 0=100+C0 = 100+C, so C=−100C=-100, giving y(x)=100(1−e−x/50)y(x) = 100\bigl(1-e^{-x/50}\bigr) — exactly the formula asserted (and verified by direct substitution) in Chapter 1's exercises, now derived rather than guessed. Note the equilibrium value y→100y\to 100 as x→∞x\to\infty, consistent with Chapter 1's stability analysis of the autonomous mixing equation.

4. Choosing the Right Method

Given an unfamiliar first-order equation, the practical order of checks is:

  1. Is it already separable (right side factors as g(x)h(y)g(x)h(y))? If so, separate directly — it is almost always the fastest method when it applies.
  2. Is it linear in yy, i.e. of the form y′+p(x)y=q(x)y'+p(x)y=q(x)? If so, use the integrating factor; this always works for linear equations, with no guesswork.
  3. Does the right side depend only on y/xy/x (homogeneous in the Section 2 sense)? If so, substitute v=y/xv=y/x to reduce to a separable equation in vv and xx.

Many equations satisfy more than one of these criteria simultaneously (e.g. y′=kyy'=ky is both separable and linear), in which case either method works and typically gives the same effort.

5. Common Exam Pitfalls

  • Dropping the singular solutions of a separable equation. Dividing by h(y)h(y) is only valid where h(y)≠0h(y)\ne 0; every zero of hh gives an extra constant solution that must be stated alongside the general solution.
  • Substituting v=y/xv=y/x without replacing y′y' correctly. The product rule gives y′=v+x dv/dxy' = v + x\,dv/dx, not y′=dv/dxy'=dv/dx — forgetting the vv term is the single most common algebra slip in this method.
  • Forgetting that the "homogeneous" of Section 2 is a different concept from "homogeneous linear" (Chapters 4–5, where it means q(x)≡0q(x)\equiv 0). The same word names two unrelated properties; state which sense is meant when it matters.
  • Choosing the wrong constant of integration when computing μ(x)\mu(x). Any single antiderivative of p(x)p(x) works in μ(x)=e∫p dx\mu(x)=e^{\int p\,dx}; adding an arbitrary constant there only rescales μ\mu by a constant factor, which cancels out of the final formula, but students sometimes mistakenly carry an extra +C+C through and corrupt the answer.
  • Forgetting to divide by μ(x)\mu(x) at the end. The integrating-factor method produces μy\mu y as an antiderivative of μq\mu q; the solution is y=(that antiderivative)/μ(x)y = (\text{that antiderivative})/\mu(x), not the antiderivative itself.
  • Misidentifying p(x)p(x) and q(x)q(x) when the equation is not yet in standard form. y′=3y+x2y' = 3y + x^2 must first be rearranged to y′−3y=x2y'-3y=x^2, giving p(x)=−3p(x)=-3, not p(x)=3p(x)=3.

Summary

  • Separable: y′=g(x)h(y)y'=g(x)h(y) reduces to ∫dy/h(y)=∫g(x) dx\int dy/h(y) = \int g(x)\,dx; zeros of h(y)h(y) give extra equilibrium (singular) solutions lost in the division step.
  • Homogeneous (y′=f(y/x)y'=f(y/x)): substitute y=vxy=vx, y′=v+xv′y'=v+xv', reducing to the separable equation x dv/dx=f(v)−vx\,dv/dx = f(v)-v.
  • Linear (y′+p(x)y=q(x)y'+p(x)y=q(x)): the integrating factor μ(x)=e∫p dx\mu(x)=e^{\int p\,dx} makes ddx[μy]=μq\dfrac{d}{dx}[\mu y]=\mu q, giving the universal formula y=μ(x)−1(∫μ(x)q(x) dx+C)y = \mu(x)^{-1}\left(\int \mu(x) q(x)\,dx + C\right).
  • Method selection: check separability first, then linearity (always solvable via integrating factor), then the homogeneous ratio form.
  • Worked results to remember: the logistic solution y(x)=[1+(1−y0y0)e−x]−1y(x) = \left[1+\left(\tfrac{1-y_0}{y_0}\right)e^{-x}\right]^{-1}, and the mixing-problem solution y(x)=100(1−e−x/50)y(x)=100(1-e^{-x/50}) derived rigorously via the integrating factor.