Introduction to differential equations
First-order equations
Separation of variables, integrating factors and the geometry of solutions.
about 7 min
Start from a problem
assigns a slope to every point of the plane. How do we recover the whole curve from "slopes everywhere"?
The previous section proved that a solution exists and is unique, but not how to compute it. We need methods that actually produce solutions, even if only for certain types of equation.
Choose "Logistic growth" below: . Vary the initial value : solutions starting below climb, solutions starting above fall, all towards ; the one starting at stays forever. No two solution curves ever cross.
A first-order equation prescribes a slope at every point . Solution curves are the curves tangent to the prescribed slope everywhere. By uniqueness (see What is an ODE) exactly one solution passes through each point, so they cannot cross. And if factors as a function of times a function of , perhaps we can move and to opposite sides and integrate each.
Separation of variables
If with , solutions satisfy
Let be an antiderivative of and one of . By the chain rule so .
Writing is a mnemonic; what actually happens is the chain rule run backwards.
. From , and . The solution blows up as : first-order solutions can reach infinity in finite time.
. Partial fractions, , give , hence As , , matching the experiment. For separation is illegal (), but is obviously a solution, an equilibrium; so is .
Linear equations and integrating factors
Separation fails: the right side is not . But the left side is "almost" the derivative of a product.
Let . Then is equivalent to , so
; that is the entire reason for the choice of (see in The derivative). Hence Integrate and divide by .
: , , , .
The general solution of equals the general solution of the homogeneous equation plus any one particular solution.
If both solve , then , so is a homogeneous solution. Conversely, homogeneous solution plus particular solution is again a solution.
This structure comes from linearity: the solution set is an affine space, a translate of the homogeneous solution space, which is a one-dimensional vector space. The same structure reappears in Second-order linear equations, where that space becomes two-dimensional.
Dividing by when separating variables throws away the equilibrium solutions where . For the logistic equation, and are lost this way and must be added back by hand. Every time you divide by an expression in , ask what happens when it is zero.
Application
Without solving, draw at each point a short segment of slope : the direction field. Solution curves are the curves that follow it. The short segments in the experiment's phase portrait are a direction field (for a two-dimensional system). Equilibria are horizontal lines where ; for the logistic equation attracts nearby solutions and repels them.
Only a few classes of first-order equations have closed-form solutions: separable, linear, exact, and some reducible by substitution. Most cannot be solved in closed form, which does not stop us analysing them (direction fields, equilibria, stability) or solving them numerically.