A differential equation is an equation that links a function to its own derivatives, and it is one of the most useful objects in all of applied mathematics. The reason is simple. We rarely know a quantity directly, but we very often know how fast it is changing, and a differential equation is exactly the bridge from a rate of change back to the quantity itself. This article works through the main types you will meet, from the simplest direct integration to coupled systems, and finishes with two economic applications that show why the subject matters.
Order, degree, and what we are classifying
An ordinary differential equation, or ODE, relates a function of a single independent variable to one or more of its derivatives. The word ordinary signals that there is just one independent variable, which distinguishes it from partial differential equations. Two numbers classify an ODE at a glance. The order is the highest derivative that appears, and the degree is the power to which that highest derivative is raised once the equation is written as a polynomial in its derivatives. Consider the following equation.
The highest derivative present is the second derivative, so the order is two. That second derivative appears only to the first power, so the degree is one, even though a lower derivative is squared. Order looks at which derivative is highest, degree looks at the power of that highest one.
Solving by direct integration
The friendliest case is when the right-hand side depends only on the independent variable. A first-order equation of that kind is solved by integrating both sides directly.
The constant of integration is not an afterthought. It is the reason this is called the general solution, because every value of the constant gives a valid curve. To solve the equation where the derivative equals three x squared minus two x plus four, you integrate term by term.
To pin down the constant you need extra information, a condition that gives the value of the function at a specific point. Suppose the solution must pass through the point where x is one and y is six. Substituting those values gives four plus the constant equals six, so the constant is two, and the particular solution is the following.
The same idea extends to second-order equations of the form where the second derivative depends only on x. You integrate twice, and because each integration introduces its own constant, you end up with two, which means you now need two conditions to determine them. Take the equation where the second derivative equals six x plus two, with the conditions that the function and its first derivative both have known values at zero. Integrating once gives the first derivative.
If the first derivative equals three at x equals zero, then the first constant is three. Integrating again gives the function itself.
If the function equals one at x equals zero, the second constant is one, and the particular solution is complete.
Separable equations
Direct integration fails the moment the right-hand side involves y, but many such equations are still separable, meaning you can gather all the y terms on one side and all the x terms on the other and integrate each side independently.
Take the equation where the derivative equals x divided by y. Multiplying across separates the variables into y dy on one side and x dx on the other, and integrating both gives a tidy relationship.
Multiplying through by two and renaming the constant leaves the general solution in implicit form, from which y can be written explicitly with a square root.
Linear equations and the integrating factor
Not every first-order equation separates. The important class that does not is the linear first-order equation, which has a standard form worth memorising.
The trick here is to multiply the whole equation by a carefully chosen integrating factor, designed so that the left-hand side collapses into the derivative of a single product. That factor is the exponential of the integral of the coefficient of y.
Once you multiply through, the left side becomes the derivative of the integrating factor times y, and the equation can be integrated in one move. Consider the equation where the derivative plus two over x times y equals x squared. The coefficient of y is two over x, so the integrating factor is the exponential of twice the natural logarithm of x, which simplifies to x squared.
Multiplying through and recognising the left side as the derivative of x squared times y turns the problem into a direct integration.
Integrating and then dividing by x squared gives the general solution, where the constant rides along divided by x squared.
Homogeneous second-order equations
Stepping up to second-order linear equations with constant coefficients, the homogeneous case has zero on the right-hand side.
The clever move is to guess that the solution is an exponential, because the derivative of an exponential is just a multiple of itself. Substituting that guess turns the differential equation into an ordinary quadratic called the auxiliary, or characteristic, equation.
Everything now hinges on the roots of that quadratic, and there are three cases governed by the discriminant. When the discriminant is positive there are two distinct real roots, and the general solution is a combination of two exponentials.
For the equation with coefficients giving the auxiliary equation that factors into roots two and three, the solution is immediate.
When the discriminant is zero there is a single repeated root, and you cannot simply write the same exponential twice, because that would not give two genuinely independent solutions. The fix is to multiply one copy by x.
So the equation whose auxiliary equation is a perfect square with repeated root two has the following solution.
When the discriminant is negative the roots are a complex conjugate pair, written as a real part alpha plus or minus an imaginary part beta. Rather than leave the answer in complex exponentials, you convert it into the equivalent real form with sines and cosines.
For the equation whose roots are one plus or minus two i, the real part is one and the imaginary part is two, giving an oscillation that grows with an exponential envelope.
Non-homogeneous equations
When the right-hand side is not zero, the equation is non-homogeneous, and its general solution comes in two parts added together.
The first part, the complementary function, is the general solution of the associated homogeneous equation, found exactly as above through the auxiliary equation. The second part, the particular integral, is any single solution of the full equation, found by guessing a trial function that has the same shape as the right-hand side. Take the equation whose left side has the auxiliary roots two and three and whose right side is the linear polynomial two x plus one. The complementary function is the familiar combination of exponentials.
Because the right-hand side is a degree-one polynomial, you try a general degree-one polynomial for the particular integral, substitute it in, and match coefficients on each power of x. Doing so determines the two unknowns and gives the particular integral.
The full general solution is the sum of the two parts.
Choosing the trial function
The trial function for the particular integral is chosen to mirror the form of the right-hand side. A polynomial calls for a general polynomial of the same degree, an exponential calls for a multiple of that exponential, and a sine or cosine calls for a combination of both a sine and a cosine at the same frequency. There is one important complication. If your standard trial function would already be part of the complementary function, substituting it produces zero on the left and the method collapses. This happens precisely when the exponent in the right-hand side matches a root of the auxiliary equation. The remedy is to multiply the trial function by x, or by x squared if the root is repeated.
A clean case shows the standard procedure. For the equation whose auxiliary roots are one and two and whose right side is four times the exponential of three x, the exponent three is not a root, so no complication arises. Trying a multiple of the exponential of three x and substituting gives a coefficient of two, so the particular integral is twice that exponential.
Now change the right-hand side to four times the exponential of x. The complementary function is unchanged, but the exponent one is now a root, so the natural trial is already inside the complementary function. Multiplying the trial by x rescues it. Trying a multiple of x times the exponential of x, differentiating carefully, and substituting yields a coefficient of minus four.
Systems of coupled equations
Sometimes two unknowns evolve together, each rate of change depending on both quantities. The standard technique is elimination, reducing the pair to a single second-order equation in one unknown. Consider a system where the rate of change of x is x plus two y, and the rate of change of y is three x plus two y. Solving the first equation for y in terms of x and its derivative, differentiating, and substituting into the second equation produces a single second-order equation in x alone.
This is now an ordinary homogeneous equation. Its auxiliary equation factors into roots four and minus one, giving x as a combination of two exponentials.
Back-substituting this into the expression for y recovers the second unknown, with the same two constants tying the pair together.
Recovering a demand function from elasticity
The first economic payoff concerns the price elasticity of demand, which measures how responsive quantity demanded is to price.
If the elasticity is known, this is really a separable differential equation linking quantity and price. Rearranging puts the relative change in quantity on one side and the relative change in price on the other.
Suppose the elasticity is a constant minus two, with the condition that quantity is one hundred when price is five. Integrating both sides gives the natural logarithm of quantity equal to minus two times the natural logarithm of price plus a constant, and exponentiating turns this into a power law.
Applying the condition fixes the constant at two thousand five hundred, so the demand function is fully determined.
How a market converges to equilibrium
The second application models price adjustment in continuous time, where the rate of price change is proportional to excess demand, the gap between what buyers want and what sellers offer.
With linear demand and supply schedules this reduces to a first-order equation pointing the price toward its equilibrium value.
Take demand equal to one hundred minus two P, supply equal to minus twenty plus four P, and an adjustment speed of one. The excess demand is one hundred twenty minus six P, which is zero at the equilibrium price of twenty. Rewriting the equation around that equilibrium and separating variables leads, after integrating and applying the starting price of ten, to an explicit path for the price over time.
The structure of this solution is the general lesson. As time grows, the exponential term decays to zero, so the price glides toward its equilibrium value, and it does so for any positive adjustment speed.
A stable market, in other words, corrects its own disequilibrium exponentially, and the differential equation is what makes that intuition precise.
Practise this lesson here: https://datalad.co.uk/differential-equations-exercises-with-worked-solutions/
The thread that connects them
For all their variety, these methods sort into a short decision process. If the right-hand side depends only on the independent variable, integrate directly. If the variables separate, separate and integrate each side. If the equation is linear and first order but will not separate, use an integrating factor. For second-order equations with constant coefficients, solve the auxiliary equation and let its roots dictate the form, adding a particular integral whenever the right-hand side is nonzero. Coupled systems collapse to a single higher-order equation by elimination. Underneath all of it sits one idea: a differential equation encodes a rule about change, and solving it recovers the quantity that obeys that rule.
See you soon.
[…] Differential Equations […]