Equations relating a function to its first derivative, solved by separation of variables or integrating factors.
IntuitionHow fast is it changing right now?
Many phenomena are easiest to describe not by a formula for the quantity itself, but by a rule for how fast that quantity is changing: a population grows in proportion to its current size, a hot cup of coffee cools at a rate proportional to how much hotter it is than the room, a charging capacitor's voltage rises more slowly the closer it gets to full. A first-order differential equation is exactly such a rule — it relates an unknown function y(x) to its own derivative y′(x) — and solving it means recovering the full function from the rule for its rate of change.
Interactive cubic curve widget illustrating the right-hand side of a directly integrable first-order equation.
Slope field of a first-order ODE y′=y−cx2 with three solution curves starting from different initial values y(t0)=y0.
UndergraduateSeparable and linear equations
Definition: Separable equation
A first-order equation is separable when it can be written as dxdy=f(x)g(y): the right-hand side factors into a part depending only on x and a part depending only on y. Moving all y-terms to one side and all x-terms to the other turns the equation into two ordinary integrals, ∫g(y)dy=∫f(x)dx.
dxdy=f(x)g(y)
For instance, the autonomous equation dxdy=g(y) (where the rate of change depends only on the current value y, not on x) is the special case f(x)=1; its equilibrium solutions occur exactly where g(y)=0, and these constant solutions are easy to lose if one divides by g(y) carelessly.
dxdy+P(x)y=Q(x)
Types of first-order equations
Type
Standard form
Solution method
Separable
dxdy=f(x)g(y)
integrate both sides: ∫g(y)dy=∫f(x)dx
Linear first-order
dxdy+P(x)y=Q(x)
multiply by μ(x)=e∫P(x)dx, then integrate
Autonomous
dxdy=g(y)
special separable case; equilibria at g(y)=0
UndergraduateSolving and guaranteeing a solution exists
If P(x) and Q(x) are continuous on an interval and μ(x)=e∫P(x)dx, then every solution of the linear equation dxdy+P(x)y=Q(x) is given by y(x)=μ(x)1(∫μ(x)Q(x)dx+C).
Why is it true?
The trick is analogous to completing the square: we multiply the whole equation by a cleverly chosen factor μ(x) so that the left-hand side collapses into the derivative of a single product μ(x)y(x), turning a differential equation into something we can integrate directly.
Proof
Define μ(x)=e∫P(x)dx; differentiating with the chain rule gives μ′(x)=P(x)μ(x), since the derivative of the exponent ∫P(x)dx is P(x).
Multiply both sides of dxdy+P(x)y=Q(x) by μ(x): this gives μ(x)y′+μ(x)P(x)y=μ(x)Q(x).
By the product rule, dxd[μ(x)y(x)]=μ(x)y′(x)+μ′(x)y(x), and since μ′(x)=P(x)μ(x), this equals exactly μ(x)y′+μ(x)P(x)y — the left-hand side above. So the equation becomes dxd[μ(x)y(x)]=μ(x)Q(x).
Integrating both sides with respect to x gives μ(x)y(x)=∫μ(x)Q(x)dx+C for an arbitrary constant C. Dividing through by μ(x) (which is never zero, being an exponential) yields y(x)=μ(x)1(∫μ(x)Q(x)dx+C).
Suppose f(x,y) is continuous on a rectangle around (x0,y0) and satisfies a Lipschitz condition in y: ∣f(x,y1)−f(x,y2)∣≤L∣y1−y2∣ for some constant L. Then the initial value problem y′=f(x,y),y(x0)=y0 has a unique solution on some interval containing x0.
Why is it true?
The Lipschitz condition bounds how steeply f can vary in the y-direction, which prevents nearby solution trajectories from splitting apart or crossing: it is exactly the condition needed to guarantee a well-defined flow, with precisely one trajectory passing through each point.
Proof
Rewriting the initial value problem as an integral equation, a continuous function y(x) solves y′=f(x,y),y(x0)=y0 if and only if it solves y(x)=y0+∫x0xf(t,y(t))dt; this equivalence follows from the fundamental theorem of calculus.
Define the Picard iteration operator T on continuous functions by T[y](x)=y0+∫x0xf(t,y(t))dt, restricted to a small interval I=[x0−h,x0+h] chosen so that f stays in the rectangle where the hypotheses hold.
For two continuous functions y1,y2 on I, the Lipschitz condition gives ∣T[y1](x)−T[y2](x)∣≤∫x0x∣f(t,y1(t))−f(t,y2(t))∣dt≤Lhsupt∈I∣y1(t)−y2(t)∣. Choosing h small enough that Lh<1 makes T a contraction mapping in the supremum norm.
By the Banach fixed-point theorem, a contraction on a complete metric space (the continuous functions on I with the supremum norm) has exactly one fixed point y, satisfying y=T[y]. This fixed point is precisely the unique solution of the original initial value problem on I.
UndergraduateReal-World Applications and Worked Examples
First-order equations model population growth capped by limited resources (logistic growth in ecology and epidemiology), charging and discharging RC circuits in electronics, Newton's law of cooling in thermodynamics, radioactive decay in physics and carbon dating, and continuously compounding interest with a time-varying rate in finance. The two worked examples below solve the most common patterns end to end.
Example: Logistic population growth
A population P(t) grows according to the logistic model dtdP=rP(1−KP) with initial population P(0)=P0. Find P(t).
Solution
This equation is separable: it rearranges to P(1−P/K)dP=rdt.
The partial fraction decomposition P(1−P/K)1=P1+1−P/K1/K lets us integrate the left side term by term, giving ln∣P∣−ln∣1−P/K∣=rt+C1, i.e. lnK−PP=rt+C2 after combining constants and multiplying by K.
Exponentiating gives K−PP=Aert for a constant A; evaluating at t=0 with P(0)=P0 gives A=K−P0P0.
Solving for P and simplifying produces the closed form P(t)=K+P0(ert−1)KP0ert, which starts near P0 and approaches the carrying capacity K as t→∞, exactly the S-shaped curve seen in real population data.
Example: Charging an RC circuit
A capacitor charging through a resistor from a constant voltage source V satisfies dtdQ+RCQ=RV with Q(0)=0, where Q(t) is the charge at time t. Find Q(t).
Solution
This is linear with P(t)=RC1 and source term RV, so the integrating factor is μ(t)=et/(RC).
Multiplying through gives dtd[et/(RC)Q]=RVet/(RC); integrating both sides yields et/(RC)Q=VCet/(RC)+C1 for a constant C1.
Dividing by et/(RC) gives Q(t)=VC+C1e−t/(RC). Applying Q(0)=0 gives C1=−VC.
So Q(t)=CV(1−e−t/(RC)): the charge rises from 0 toward its final value CV, with the approach governed by the time constant RC — slower for a larger resistor or capacitor.
What is the integrating factor for the linear first-order equation dxdy+P(x)y=Q(x)?
In the logistic growth model dtdP=rP(1−KP), what does the constant K represent?
Solve the separable equation dxdy=xy with y(0)=1.
Which condition guarantees the Picard–Lindelöf theorem gives a unique solution to y′=f(x,y),y(x0)=y0?