Contents / Calculus / Differential Equations
Chapter 7
Differential Equations
First- and second-order equations, direction fields, Euler's method, models, and oscillations.
Introduction
A differential equation is an equation whose unknown is a function, and in which that function appears together with one or more of its derivatives. Solving it means finding the function. Everything so far in calculus has run in one direction — given , compute or — and this chapter runs the other way: given a law relating to its rate of change, recover .
Almost every quantitative law of nature is stated this way. A population grows at a rate proportional to its size; a hot object cools at a rate proportional to how much hotter it is than the room; a mass on a spring accelerates in proportion to how far it has been displaced. None of these statements tells you the population, the temperature or the position directly. Each tells you how the quantity is changing, and a differential equation is the bridge from that local rule to the global behaviour.
The chapter has three parts. The first studies first-order equations: how to picture their solutions, how to approximate them numerically, and the handful of families (separable, linear, exact, Bernoulli) that can be solved in closed form, together with the models — growth, cooling, mixing, logistic populations, predator and prey — that motivate them. The second studies second-order linear equations with constant coefficients, where a single quadratic decides everything. The third applies those to springs and circuits, then closes with two short methods (Cauchy–Euler and power series) that reach beyond constant coefficients.
7.1What is a differential equation?
Definition 7.1 (Differential equation, order, solution). A differential equation is an equation relating an unknown function to one or more of its derivatives . Its order is the order of the highest derivative that appears. A solution on an interval is a function defined on whose substitution into the equation makes it an identity for every in .
The equation is first order; is second order; is third order. When the unknown depends on one variable, as in all of these, the equation is an ordinary differential equation; when the unknown depends on several variables and partial derivatives appear, it is a partial differential equation. This chapter is about the ordinary kind.
Because the unknown is a function, a solution is checked by substitution, exactly as a proposed root of a polynomial is checked by plugging it in. The check is not optional: it is the only way to be sure an answer is right, and it is the sanity check that closes every solved example below.
Example 7.2 (Verifying a solution). Show that is a solution of on the whole real line.
Solution. Differentiate: . Then
which is the right-hand side, for every . So is a solution. Note that alone also works, and so does : the term can carry any constant multiple, because contributes to .□
The example shows the typical situation. A differential equation does not have a solution; it has a family of them, one for each value of one or more arbitrary constants. A first-order equation carries one constant (it undoes one differentiation, and every antiderivative comes with a ); a second-order equation carries two. The family is called the general solution, and any single member is a particular solution.
Definition 7.3 (General and particular solution). The general solution of an th-order differential equation is a family of solutions containing arbitrary constants that includes every solution of the equation (apart from occasional exceptional solutions noted when they arise). A particular solution is one member of that family, obtained by fixing the constants.
Definition 7.4 (Linear differential equation). A differential equation is linear if it can be written as
that is, and its derivatives appear only to the first power, never multiplied together, never inside another function. Otherwise it is nonlinear.
So and are linear; , and are nonlinear. The distinction matters because linear equations have a complete theory — their solutions can be added and scaled, and their general solution has a predictable shape — while nonlinear equations must be handled family by family. Notice that the coefficients may depend on in any way at all; linearity is a statement about how enters, not about .
Example 7.5 (A family of solutions). Show that every member of the family is a solution of , and find the member through the point .
Solution. For the chain rule gives
for every value of , so the whole family solves the equation. For the member through we need , so and . Sanity check: , and .
One solution is missing from the family: also satisfies , and no choice of produces it. Such exceptional solutions are common with nonlinear equations and are discussed under separable equations.□
Example 7.6 (Exponential trial solutions). For which values of is a solution of ?
Solution. Substitute , , :
Since is never zero, this forces , so or . Both and are solutions, and so — by linearity — is for any constants. That this two-parameter family is the whole general solution is the content of the second-order theory later in the chapter.□
Intuition. A differential equation is a rule a car's dashboard could enforce: "your speed must always equal twice your distance from home." That rule does not tell you where you are; it tells you how where you are is changing. Many journeys obey the rule — every starting point gives a different one — and the family of all such journeys is the general solution. Telling the driver where they started at noon picks out one journey: that is a particular solution.
Pitfall. Checking a solution means substituting into the original equation, not into some rearranged version of it and not into the equation you got after integrating. A sign slip in a rearrangement will make a wrong answer check out against the wrong equation.
7.2Initial-value problems and the existence–uniqueness theorem
Definition 7.7 (Initial-value problem). An initial-value problem (IVP) consists of a differential equation together with enough initial conditions — the values of and its lower derivatives at a single point — to fix the arbitrary constants of the general solution. For a first-order equation one condition is required; for a second-order equation two, and .
Geometrically, a first-order condition selects the one solution curve that passes through the point . A second-order condition selects the curve through with slope there — position and velocity, if is time. One condition per order is the rule, because each integration introduces one constant.
Method 7.8 (Solving an initial-value problem).
- Find the general solution, with its arbitrary constants.
- Substitute each initial condition to obtain one equation per constant.
- Solve for the constants.
- Write down the particular solution and check it against the original equation and the initial conditions.
Example 7.9 (A first-order IVP by direct integration). Solve , .
Solution. Integrating, . The condition gives , so and
Check: and . Of the whole family of parabolas , the initial condition picked the one through .□
Example 7.10 (A second-order IVP by integrating twice). Solve , , .
Solution. Integrate once: . The condition gives . Integrate again: , and gives . So
Check: , , . Two integrations, two constants, two conditions.□
Does an initial-value problem always have a solution, and is it the only one? For first-order equations the answer is yes under a mild smoothness condition. The theorem below is the reason differential equations can predict anything: it says that a rule of change plus a starting state determine a unique future, at least for a while.
Theorem 7.11 (Existence and uniqueness for first-order IVPs). Suppose and are both continuous on some open rectangle in the plane containing the point . Then the initial-value problem
has a solution on some open interval containing , and that solution is the only one on .
The proof belongs to real analysis: one builds the solution as the limit of the Picard iterates
and uses the bound on to show that the iterates converge and that two solutions cannot drift apart. The idea to keep is that continuity of buys existence, and the extra continuity of buys uniqueness. Drop the second hypothesis and uniqueness can genuinely fail.
Example 7.12 (Where uniqueness fails). Show that the initial-value problem , has more than one solution, and explain why this does not contradict the theorem.
Solution. The constant function is a solution: both sides are . But is also a solution through the same point, since
and . So are the functions that equal up to any and afterwards: infinitely many curves leave the origin.
There is no contradiction. Here is continuous, so a solution exists, but
blows up as : it is not continuous on any rectangle containing a point with . The theorem's uniqueness hypothesis fails exactly at the initial condition that causes trouble. Through any point with the solution is unique.□
Two further remarks. First, the theorem promises a solution only on some interval around , not on the whole line — and the interval cannot be read off from in advance. Second, for linear first-order equations with and continuous on an interval, the solution exists and is unique on that entire interval; this is one of the ways linear equations are better behaved.
Example 7.13 (Existence is only local). Solve , , and find the largest interval on which the solution exists.
Solution. This equation is separable (the method is developed two sections on): dividing by and integrating gives , and forces , so
Check: and . But the solution has a vertical asymptote at ; it exists on and no further. The function and are continuous everywhere, so the theorem applies at every point — and still the solution lives on a bounded interval to the right. Existence is guaranteed near , not globally.□
Second-order initial-value problems are solved by the same recipe, and several are worked in the second-order sections. There we will also meet boundary-value problems, in which the two conditions are imposed at different points, and see that those can have no solution or infinitely many — the existence–uniqueness theorem is a statement about conditions at a single point.
Intuition. Imagine a hill and a marble. The slope of the hill at each point is the rule ; where you place the marble is the initial condition. Continuity of the slope guarantees the marble has somewhere to roll. Continuity of guarantees the hill has no infinitely sharp crease at which two marbles placed at the same spot could set off in different directions — and has exactly such a crease along the -axis.
7.3Direction fields (slope fields)
A first-order equation tells you the slope of the solution curve at every point of the plane — before you know the curve. Drawing those slopes is the fastest way to see what solutions look like, and it works even when the equation cannot be solved by hand.
Definition 7.14 (Direction field). The direction field (or slope field) of is the picture obtained by drawing, at each point of a grid, a short line segment of slope . A solution curve is a curve that is tangent to the segment at every point it passes through.
To sketch a field by hand, tabulate on a grid and draw each segment; to sketch a solution, start at the initial point and follow the segments, adjusting direction continuously. Two shortcuts save effort. Points where carry horizontal segments; if depends only on , whole horizontal lines with are themselves solutions (equilibria), and the rest of the field is the same in every vertical strip. More generally the curves , called isoclines, are the curves along which every segment has the same slope , and drawing three or four of them organises the picture.
Example 7.15 (Reading a direction field). For , compute the slopes at the nine points with , identify the isoclines, and find the one solution that is a straight line.
Solution. The slope at is :
The isoclines are the lines of slope . On the isocline , that is , every segment has slope — the same as the slope of the line itself. So the line is tangent to the field everywhere and is a solution: indeed and . Above the line the slopes are smaller than , below it larger, and following the segments shows every other solution bending toward as increases. (The linear-equation method later gives the general solution , which confirms it.)□
Example 7.17 (Equilibria from a field). Describe the direction field of and sketch the solutions through , and .
Solution. The slope depends on alone, so the field looks the same in every vertical strip. It is along and , so those two horizontal lines are solutions. Between them, : segments point upward, and the solution through rises from toward without ever crossing (it cannot cross a solution, by uniqueness). Above the slope is negative — at it is — so the solution through falls toward . Below the slope is negative too, so the solution through plunges downward, ever more steeply. The picture is the S-curve of logistic growth, obtained without solving anything.□
Example 7.18 (Isoclines that are curves). Where are the segments of the direction field for horizontal, and what is the slope at ?
Solution. Horizontal segments occur where : on the unit circle. Inside the circle the slopes are negative, outside positive; at the slope is . The isoclines are the concentric circles , so the field gets steeper as you move away from the origin.□
Intuition. A direction field is a weather map of the plane: at every point a little arrow shows the wind. A solution is the path of a leaf carried by that wind from wherever you drop it. You can see where leaves converge, where they scatter and where the air is still, without computing a single trajectory.
7.4Euler's method
A direction field suggests a way to compute a solution curve: from the starting point, take a short step in the direction the field indicates, look up the field at the new point, take another short step, and so on. Making that precise is Euler's method, the simplest numerical method for differential equations and the ancestor of every better one.
Method 7.19 (Euler's method). To approximate the solution of , with step size :
Then approximates the true value .
The formula is the tangent-line approximation used repeatedly. Over one step of length the solution is replaced by its tangent line at the current point, whose slope is known from the equation. The step ends at ; the true curve ends somewhere nearby, and the difference is the error of that step. Note that the slope used is always the one at the start of the step, evaluated with the current , not with any exact value.
Example 7.20 (Euler's method by hand). Use Euler's method with to approximate for , . Compare with the exact solution .
Solution. Each row uses the slope and the update .
| slope | ||||
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 1.1 |
| 1 | 0.1 | 1.1 | 1.2 | 1.22 |
| 2 | 0.2 | 1.22 | 1.42 | 1.362 |
| 3 | 0.3 | 1.362 | 1.662 | 1.5282 |
| 4 | 0.4 | 1.5282 | 1.9282 | 1.72102 |
So . The exact solution (found in the linear-equations section; check: and ) gives . The error is about . Every Euler step here undershoots because the true solution is concave up: the tangent line lies below the curve.□
Example 7.21 (Two steps with a larger step size). Approximate for , using Euler's method with .
Solution. Step 1: at the slope is , so at .
Step 2: at the slope is , so at .
So . The exact solution is (separable; check , ), giving . Two coarse steps badly undershoot a solution that curves upward this fast — the method is only as good as its step size.□
How good is the method, and how does the step size help? Repeating the first example with different step sizes gives the following approximations to :
| | | | | |
|---|---|---|---|---|
| Euler estimate | | | | |
| error | | | | |
Halving roughly halves the error. That is the general rule: the error of a single step is proportional to (it is the error of a tangent-line approximation), but reaching a fixed takes steps, so the accumulated error is proportional to . Euler's method is called a first-order method for this reason. Better methods (the improved Euler and Runge–Kutta methods) make cleverer choices of slope within each step and achieve errors proportional to or , but they are built on exactly this idea.
Remark. Applied to , with steps of size , Euler's method gives as its estimate of . The familiar limit is Euler's method converging.
Intuition. You are driving across unfamiliar country with a device that only tells you your current heading. Every ten minutes you glance at it and drive straight in that direction until the next glance. You will drift off the true road on every bend, but glance twice as often and you drift half as far.
Pitfall. The slope for each step is with the current approximate — not the exact (which you do not know) and not the slope at the end of the step. A common error is to update before computing the slope, using .
7.5Separable equations
Definition 7.22 (Separable equation). A first-order equation is separable if it can be written as
a product of a function of alone and a function of alone.
The equations , , and (take ) are separable; is not, because does not factor. The test is purely algebraic: try to write the right side as a product.
Method 7.23 (Separation of variables).
- Write the equation as , all on one side and all on the other.
- Integrate both sides, collecting the two constants into a single on one side.
- Solve for if possible; otherwise leave the answer as an implicit relation between and .
- Check separately whether any constant with is a solution that step 1 discarded.
Why is one allowed to treat as a fraction and "multiply through by "? Because the manipulation is shorthand for the chain rule. Let be an antiderivative of and one of . If satisfies , then
so , which is exactly what steps 1 and 2 produce. The and bookkeeping is a reliable way of writing that argument down.
Step 4 is there because step 1 divides by , which is illegal wherever . If then the constant function satisfies and is a solution; it may or may not reappear in the general formula.
Example 7.24 (Solving a separable equation with an initial condition). Solve with .
Solution.
- Separate: multiply by to get .
- Integrate: , so .
- The initial condition gives , so and . Since , take the positive root:
Check: and . The general solution is a family of hyperbolas; the initial condition chose the upper branch of one of them.□
Example 7.25 (An implicit solution). Solve .
Solution. Separate: . Integrate:
This cannot be solved for in closed form, and it does not need to be: the relation defines implicitly as a function of , and differentiating it implicitly, , recovers the equation. An implicit solution is a complete answer.□
Example 7.26 (Recovering a lost solution). Find all solutions of .
Solution. Separating requires dividing by , so first note that makes both sides zero and is a solution. For :
Exponentiate: , so . Writing , which is any nonzero constant,
The lost solution corresponds to , a value the derivation excluded but the formula happily accepts. So the complete answer is with any real number. Check: .□
The pattern in the last example is universal. Integrating produces ; exponentiating produces ; absorbing the sign into a new constant removes the absolute value; and allowing restores the equilibrium solution. Writing the answer as with arbitrary is standard, and correct, provided you know why.
Separable equations also answer a classical geometric question. Two curves are orthogonal if they meet at right angles, that is, if their tangent slopes at the intersection point are negative reciprocals. Given a one-parameter family of curves, its orthogonal trajectories are the curves that cut every member of the family at right angles — think of electric field lines cutting equipotential curves.
Method 7.27 (Orthogonal trajectories).
- Differentiate the family's equation implicitly and eliminate the parameter to get a differential equation satisfied by every member.
- The orthogonal trajectories satisfy .
- Solve that equation (it is often separable).
Example 7.28 (Orthogonal trajectories of a family of parabolas). Find the orthogonal trajectories of the family , a constant.
Solution. Differentiate with respect to : . Eliminate :
The orthogonal trajectories have the negative reciprocal slope, . Separate and integrate: gives , that is,
The orthogonal trajectories are a family of ellipses centred at the origin. Sanity check at the point , which lies on the parabola and the ellipse : the parabola's slope there is , the ellipse's is , and their product is .□
Intuition. Separation is sorting laundry. The equation arrives with -things and -things tangled together; if they can be pulled apart into an pile and a pile, each pile can be dealt with by ordinary integration. Equations like are the sock that will not come apart, and they need a different machine.
Pitfall. After integrating do not forget the absolute value, and after exponentiating do not forget that the constant can be negative — and, once the equilibrium solution is restored, zero. Writing and stopping there loses every negative solution.
7.6Homogeneous first-order equations
Some equations that are not separable become separable after a change of variable. The most useful case is an equation in which the right-hand side depends only on the ratio .
Definition 7.29 (Homogeneous first-order equation). A first-order equation is homogeneous if it can be written as
for some function of one variable. Equivalently, with for all .
Equations like or qualify: divide numerator and denominator by the highest power of and only survives. (The word "homogeneous" is also used, with an unrelated meaning, for linear equations with zero right-hand side; the context always makes clear which is meant.)
Method 7.30 (The substitution ).
- Set , so and, by the product rule, .
- The equation becomes , that is, , which is separable.
- Solve for (possibly implicitly), then replace by .
The substitution works because has no in it, so the only -dependence in the transformed equation is the explicit factor on the left, and that separates: .
Example 7.31 (A homogeneous equation). Solve .
Solution. The right side is , so the equation is homogeneous with . With ,
So and gives
Check: , and . They agree.□
Example 7.32 (A homogeneous equation with an initial condition). Solve with .
Solution. Dividing top and bottom by gives . Substituting :
Separate and integrate:
Exponentiate: . Substituting and multiplying by gives ; for (where the initial condition lives) this is . The condition gives , so
Check by implicit differentiation: , so . Substituting in the numerator gives , the original equation, and confirms the initial condition.□
Example 7.33 (Where the integral in needs partial fractions). Solve .
Solution. Here , so . Separating,
By partial fractions , so , hence (absorbing signs into ). Solve for : , so and . Finally
The equilibria and that were divided out give (the case ) and (not in the family; it is the " " member). Check for : and .□
Intuition. A homogeneous equation cannot tell the difference between the point and the point : the slope it prescribes is the same along every ray from the origin. So the natural coordinate is the direction of the ray, , and in that coordinate the equation simplifies to something separable.
7.7Exponential growth and decay
The simplest model of change says that a quantity grows or shrinks at a rate proportional to its current size. Bacteria in a dish, money at continuously compounded interest, and atoms of a radioactive isotope all obey it, at least for a while.
Theorem 7.34 (The natural growth equation). Every solution of
is of the form , and the solution with is .
Proof. That is a solution is immediate: its derivative is . To see that there are no others, let be any solution and consider . By the product rule,
so is constant, say , and . Setting identifies .∎
The proof is worth remembering because it does not use separation of variables and so has no lost-solution issues: it shows directly that the family , including , is everything. Separation gives the same answer in the usual way: , , .
When the solution grows exponentially; when it decays toward zero. The constant is the relative growth rate — the growth per unit time as a fraction of the current amount — and in applications it is usually determined from one measurement rather than given.
Proposition 7.35 (Doubling time and half-life). For growth at rate , the time for the quantity to double is . For decay at rate , the time for it to halve — the half-life — is .
Proof. Doubling means , that is , so . Halving means , so and .∎
Both times are independent of : it takes the same time to go from to as from to . This is the defining feature of exponential change, and the reason a half-life is a meaningful constant of a substance. A population that doubles every units of time satisfies , which is the same as with .
Example 7.36 (A bacterial culture). A culture triples in size in hours. Starting from cells, how many cells are there after hours, and when does the culture reach cells?
Solution. Let . Tripling in hours means , so and it is cleanest to write . After hours,
For we need , so and
Sanity check: after hours the culture has tripled twice, to ; after hours, to . So should fall between and hours, as it does.□
Example 7.37 (Radiocarbon dating). Carbon-14 has a half-life of years. A bone fragment contains of the carbon-14 that a living sample contains. How old is it?
Solution. With and half-life , the decay constant is . We want :
Sanity check: remaining is less than one half-life of decay, so the answer should be less than years — and about half a half-life, since .□
Example 7.38 (Finding the half-life from data). After years, of a radioactive sample remains. What is its half-life?
Solution. gives , and then
Sanity check: in years the sample halves; in years it loses ; since , the numbers are consistent.□
Example 7.39 (Continuously compounded interest). Money grows at per year, compounded continuously. How long does it take to double?
Solution. The balance satisfies , so and years. The "rule of 70" — divide by the percentage rate — gives ; it is this formula with .□
Intuition. Exponential growth is a snowball rolling downhill: the bigger it is, the more snow it picks up per metre, so it grows faster the bigger it gets. Exponential decay is the same law run backward — a puddle that evaporates at a rate proportional to its size shrinks fast at first and then ever more slowly, never quite disappearing. In both, only the fraction gained or lost per unit time is fixed, which is why doubling time and half-life are constants.
7.8Newton's law of cooling
Theorem 7.40 (Newton's law of cooling). If an object at temperature sits in surroundings at constant temperature , and heat is exchanged at a rate proportional to the temperature difference, then
and the temperature is
Proof. Let . Since is constant, , so by the natural growth theorem with . Substituting back gives the formula.∎
The law says nothing about whether the object is hotter or cooler than the room: if the "cooling" is warming, and the same formula applies. In either case decays exponentially to zero, so as , rapidly at first and then ever more slowly. The constant depends on the object's size, material and surroundings and is almost always found from one extra temperature reading.
Example 7.41 (Cooling coffee). A cup of coffee at C is placed in a C room. After minutes it has cooled to C. What is its temperature after minutes, and when will it reach C?
Solution. The model is . From :
There is no need to solve for itself. At , , so
For we need , so ; with this gives minutes. Sanity check: the gap to room temperature shrinks by the factor every minutes — at — so reaching a gap of should happen a little after minutes.□
Example 7.42 (Estimating time of death). A body is found in a room kept at C. Its temperature is C when found and C one hour later. Assuming a normal body temperature of C at the moment of death, how long before it was found did death occur?
Solution. Measure time from the moment the body is found, so , , and . From : , so . At the (negative) time of death, :
Since , this gives . Death occurred about hours before the body was found. Sanity check: every hour the gap above room temperature shrinks by ; running that backward, gaps of at hours bracket the gap of between and hours ago.□
Example 7.43 (Warming up). A bottle of water at C is left in a C room, and after minutes it is at C. When is it at C?
Solution. (the gap is negative, and stays negative). From : , so — the gap halves every minutes. For the gap must be , so , , and
Sanity check: gaps of at ; a gap of lands just before minutes.□
Intuition. The law is about the gap, not the temperature. A coffee at in a room and a coffee at in a room cool identically, gap for gap. And the gap loses a fixed fraction of itself in each equal interval of time, which is why "the gap halves every minutes" is often the whole solution.
7.9Linear first-order equations
Definition 7.44 (Linear first-order equation, standard form). A first-order linear equation is one that can be written in the standard form
where and are continuous functions of on some interval.
The equation is linear; divided by it reads , so and . The equation is linear with , . The equation is both linear (, ) and separable; is separable but not linear. The two families overlap, and the linear one has the great advantage of always being solvable by a single method.
The idea is to multiply the equation by a cleverly chosen function so that the left side becomes the derivative of a product. We want
which holds precisely when . That is a separable equation for : , so and
(Any one antiderivative will do; a constant of integration in the exponent only multiplies by a constant, which cancels.) With this , the equation reads , which integrates immediately.
Method 7.45 (The integrating-factor method).
- Write the equation in standard form — divide through by the coefficient of if necessary.
- Compute the integrating factor (no constant needed).
- Multiply the whole equation by . The left side is now ; verify this by differentiating.
- Integrate: .
- Divide by to get .
Theorem 7.46 (Solution of the linear first-order equation). On any interval where and are continuous, the general solution of is
and every initial-value problem with in that interval has exactly one solution, defined on the whole interval.
Proof. The derivation above shows that solves the equation if and only if , and since this holds if and only if is an antiderivative of , which is the displayed formula. The constant is determined uniquely by , and the formula makes sense wherever the integrand is continuous.∎
Example 7.47 (A constant-coefficient linear equation). Solve .
Solution.
- Already in standard form, with and .
- .
- Multiply: , and the left side is .
- Integrate: .
- Divide:
Check: , so . The term dies out as whatever is — it is the transient — while is the response to the forcing term.□
Example 7.48 (A variable coefficient and an initial condition). Solve with , for .
Solution.
- Divide by : , so , .
- .
- Multiply: , and indeed .
- Integrate: .
- . The condition gives , so and
Check: , so , and .□
Example 7.49 (The equation behind the Euler-method table). Solve , .
Solution. Standard form is , so and . Then , and integrating by parts,
So , and gives :
Check: and . This is the exact solution against which Euler's method was measured.□
Example 7.50 (A trigonometric coefficient). Solve on .
Solution. (positive on this interval). Multiply: , and the left side is . Integrate: , so
Check: , and .□
A standard physical instance is the series circuit with a resistor and an inductor. Kirchhoff's voltage law says the electromotive force supplied equals the sum of the voltage drops, across the inductor and across the resistor:
Example 7.51 (An RL circuit). A circuit has inductance H, resistance and a constant voltage V. The switch is closed at with no current flowing. Find and the limiting current.
Solution. The equation is , or . The integrating factor is : , so and . With , :
As , A, which is — Ohm's law, once the inductor has stopped resisting the change. The time constant s is the time for the gap to shrink by the factor .□
Intuition. An integrating factor is a lens that makes a blurry expression snap into focus as a single derivative. The left side is "almost" the derivative of something; multiplying by the right supplies exactly the missing factor so that the product rule reassembles it into . After that, solving the equation is just integrating.
Pitfall. Two errors account for most wrong answers here. First, computing from an equation not yet in standard form: for the coefficient is , not . Second, multiplying only the left side by — the right side must be multiplied too, and it is , not , that appears in the answer.
7.10Mixing problems
A tank contains a solution — salt in water, pollutant in a lake, drug in a bloodstream. Liquid flows in at some concentration and flows out, and the question is how much of the substance is in the tank at time . Every such problem is set up by the same balance sheet.
Method 7.52 (Setting up a mixing problem). Let be the amount of substance in the tank and the volume of liquid. Then
where are the volume flow rates and the incoming concentration. The outgoing concentration is because the tank is assumed well mixed. If then is constant; otherwise .
The resulting equation is always linear in (the only is in the rate-out term, to the first power), so the integrating-factor method always applies; when is constant it is also separable, and either method works.
Example 7.53 (Constant volume). A tank holds L of brine containing kg of dissolved salt. Brine with kg of salt per litre flows in at L/min, the tank is kept well mixed, and the mixture drains at L/min. Find the amount of salt at time , its long-run value, and the time at which the tank holds kg.
Solution. The volume stays at L. Salt enters at kg/min and leaves at kg/min, so
In standard form, with : , so and . From , :
As , kg, which is what L of the incoming brine would contain — the tank is gradually replaced by inflow. For : , so min. Check: and agree, and .□
Example 7.54 (Changing volume). A L tank initially holds L of water with kg of salt dissolved. Brine at kg/L enters at L/min and the well-stirred mixture leaves at L/min. How much salt is in the tank at the moment it overflows?
Solution. The volume is , so the tank overflows when , at min. Salt enters at kg/min and leaves at kg/min:
The integrating factor is . Then
so . From : , so and
At : kg. Sanity check: at overflow the tank holds L, and L of the incoming brine would hold kg; the tank has not yet fully caught up with the inflow concentration, so slightly less than kg is right.□
Intuition. Think of a bathtub with the tap running and the plug half out. What flows in is fixed by the tap. What flows out is whatever is in the water right now, so the more concentrated the bath, the more escapes each minute. The equation is nothing but that bookkeeping — and "well mixed" is the assumption that lets a single number describe the outgoing concentration.
7.11Exact equations
Write a first-order equation in differential form, ; this is the same as . If there happens to be a function whose partial derivatives are and , then the left side is the total differential , and the equation says : the solutions are the level curves .
Definition 7.55 (Exact equation). The equation is exact on a region if there is a function with
throughout the region. Its general solution is then the family of implicit curves .
That really does give solutions follows from the chain rule: along any curve with , differentiating gives , that is . Conversely a solution of keeps constant.
Theorem 7.56 (Test for exactness). Let and have continuous first partial derivatives on an open rectangle. Then is exact on that rectangle if and only if
Proof. If the equation is exact, then and , and mixed partials of a function with continuous second derivatives are equal, so .
Conversely, suppose . Define , where the integral is with respect to with held fixed and is still to be chosen; then automatically. We need , that is
The right side is a function of alone, because its -derivative is . So exists (integrate in ), and the built this way works. The rectangle hypothesis is what guarantees that the antiderivatives are defined throughout the region.∎
The proof is also the method: it tells you exactly how to build .
Method 7.57 (Solving an exact equation).
- Identify (the coefficient of ) and (the coefficient of ) and confirm .
- Integrate with respect to , holding constant: .
- Differentiate this with respect to , set the result equal to , and solve for ; it must involve only .
- Integrate to find , and write the solution .
(You may equally start from : integrate with respect to and add an unknown .)
Example 7.58 (A first exact equation). Solve .
Solution. and , with : exact. Integrate in :
Differentiate in : , and this must equal , so and . The solution is
Check by implicit differentiation: , i.e. . Here one can even solve for : .□
Example 7.59 (An exact equation with an exponential). Solve with .
Solution. and : exact. Integrating in (note ):
so and . The solution is , and gives , so
Sanity check: at the left side is .□
Example 7.60 (When the test fails). Show that is not exact, but that multiplying it by makes it exact, and solve it.
Solution. while ; not equal, so not exact. Multiply through by :
Now . Integrate the new in : ; then , which equals when . So
Multiplying by did not change the solutions (it only rescales both sides), so this is the solution of the original equation too. A factor that makes an equation exact is again called an integrating factor; finding one in general is hard, but the linear equation's is exactly such a factor, and factors of the form are worth trying when the coefficients are polynomials.□
Intuition. Exactness means the equation is secretly a contour map. Somewhere there is a landscape , and the solution curves are its contour lines — the equation just tells you the direction of the contour at each point. The test asks whether the prescribed directions are consistent with any landscape; if they are, the recipe reconstructs it.
Pitfall. When the equation is given as , put it in the form carefully: means and have opposite signs from the numerator and denominator of . For instance gives , .
7.12Bernoulli equations
Definition 7.61 (Bernoulli equation). A Bernoulli equation has the form
(For it is linear, and for it is linear and separable.)
The only thing separating this from a linear equation is the power on the right. Dividing through by gives , and the combination is, up to a constant, the derivative of . That observation is the whole method.
Method 7.62 (The Bernoulli substitution).
- Divide the equation by : .
- Set , so that and .
- The equation becomes the linear equation
- Solve for by an integrating factor, then recover . Check separately whether is a solution (it is whenever ).
Example 7.63 (A Bernoulli equation with ). Solve for .
Solution. Here , so and . Dividing by : , that is , or
The integrating factor is : , so and . Therefore
together with the solution lost in the division. Check: , and .□
Example 7.64 (A Bernoulli equation with ). Solve .
Solution. With , and . Dividing by and multiplying by :
The integrating factor is : . Integrating by parts, , so and
Check on : .□
Example 7.65 (The logistic equation as a Bernoulli equation). Solve by the Bernoulli substitution.
Solution. Expand: , a Bernoulli equation with , , . With the linear equation is
Integrating factor : , so and . Hence
the logistic curve — derived again, by a different route, in the logistic section.□
Intuition. A Bernoulli equation is a linear equation wearing a disguise: the power is the mask. The substitution is chosen so that the chain rule strips exactly that power off the derivative term, and the equation underneath turns out to be one you already know how to solve.
7.13Autonomous equations, equilibria and stability
Many models have no explicit time dependence: the rate of change of depends only on . Such equations can be understood almost completely without solving them, and the understanding is often more useful than a formula.
Definition 7.66 (Autonomous equation, equilibrium). A first-order equation is autonomous if it has the form . A number with is an equilibrium (or critical point), and the constant function is an equilibrium solution.
Between two consecutive equilibria has constant sign, so every solution starting there is monotone: increasing where and decreasing where . By uniqueness a solution can never cross an equilibrium line, so a solution that starts between two equilibria stays between them forever, and being monotone and bounded it must tend to one of them. All of this is recorded on the phase line: draw the -axis, mark the equilibria, and put an arrow in each gap pointing up where and down where .
Definition 7.67 (Stability of an equilibrium). An equilibrium is stable (a sink) if every solution that starts close enough to tends to as ; unstable (a source) if solutions starting arbitrarily close to on either side move away from it; and semistable if solutions approach it from one side and leave it from the other.
Theorem 7.68 (Linearised stability). Let be differentiable with . If then is stable; if then is unstable. If the test is inconclusive.
Proof. Suppose . Then is decreasing through : for slightly below , and solutions rise toward ; for slightly above , and solutions fall toward . Since solutions cannot cross and are monotone, they converge to . The case is the same argument with the arrows reversed. When the sign of near is not determined by the derivative — compare , and .∎
Near the equilibrium the equation looks like , whose solutions are : decaying to when , growing away when . That is why the derivative decides.
Example 7.69 (A phase-line analysis). Find the equilibria of , classify them, and describe the solutions with , and .
Solution. The equilibria are and . The sign of is positive for , negative for and positive for , so the phase line has arrows pointing up below , down between and , and up above . Both arrows around point toward it: is stable. Both arrows around point away: is unstable. The derivative test agrees: , so and .
The solution with increases toward ; the one with decreases toward ; the one with increases without bound (in fact it blows up in finite time, like ).□
Example 7.70 (The logistic equation without solving it). Analyse with , including where the solutions are concave up and concave down.
Solution. Equilibria: and . For the right side is positive, so solutions increase; for it is negative, so they decrease; for it is negative. With , , so (unstable) and (stable). Every positive population tends to the carrying capacity .
For concavity, differentiate the equation itself using the chain rule:
For the second factor is positive, so the sign of is the sign of : solutions are concave up while and concave down once . A solution starting below therefore has an inflection point exactly when it crosses , and that is where it grows fastest, at rate . This is the S-shape of the logistic curve, obtained from the equation alone.□
Example 7.71 (Harvesting a population). A fish population obeys the logistic equation with per year and , and is harvested at a constant fish per year:
Find and classify the equilibria, and determine the largest harvest rate the population can sustain.
Solution. Set the right side to zero and multiply by : , so
The right side is negative below , positive between and , and negative above . So is stable (arrows from both sides) and is unstable. A population above settles at ; one that ever falls below is driven to extinction, since there and is no longer an equilibrium.
The equilibria are the intersections of the parabola with the horizontal line . The parabola's maximum is at , where it equals . For there are two equilibria; at they merge into a single semistable one at ; for there are none and every solution decreases to extinction. The maximum sustainable harvest is fish per year — and harvesting at exactly that rate is reckless, since any disturbance below is fatal.□
Example 7.72 (A semistable equilibrium). Classify the equilibrium of .
Solution. The only equilibrium is , and , so the derivative test says nothing. But on both sides: solutions below rise toward it and solutions above rise away from it. The equilibrium is semistable. Explicitly, solves the equation; for and it tends to , while starting above it blows up at .□
Intuition. A phase line is a landscape seen from the side, with the equilibria as the flat spots. A stable equilibrium is the bottom of a valley: nudge the ball and it rolls back. An unstable one is a hilltop: nudge it and it rolls away. A semistable one is a ledge — safe from one side, a cliff on the other. You learn all of this from the sign of , which is far easier to find than a formula for the solutions.
Pitfall. The derivative test is one-directional. guarantees stability and guarantees instability, but decides nothing: has a stable equilibrium at , an unstable one, and a semistable one, all with . Fall back on the sign of .
7.14Logistic growth
Exponential growth cannot last: food, space and patience run out. The logistic model, proposed by Verhulst in the 1840s, keeps the natural-growth equation for small populations but makes the relative growth rate fall to zero as the population approaches a ceiling , the carrying capacity.
Definition 7.73 (The logistic equation). The logistic equation is
The constant is the carrying capacity and the intrinsic growth rate.
When is small compared with , the factor is nearly and the equation is nearly : exponential growth. When is near the factor is nearly and growth stalls; above it is negative and the population declines. The previous section showed, without solving anything, that every positive solution tends to and has its inflection point at . The equation is separable, and here is the solution.
Theorem 7.74 (Solution of the logistic equation). The solution of the logistic equation with is
Proof. Separate: , and multiply top and bottom by so that the left side is . Partial fractions give
(check: the right side over the common denominator is ). Integrating,
where absorbs the sign. Setting gives . Finally solve for : , so and . The equilibria and (divided out at the start) correspond to , which the formula excludes, and , which it includes.∎
The formula confirms the picture. As , and . At the formula gives . If then and rises toward from below; if then and falls toward from above. If is very small, is large and, for a while, : the exponential phase.
Example 7.75 (Solving a logistic initial-value problem). A population satisfies with . Find , the time at which the population reaches , and the growth rate at that moment.
Solution. Here , and , so
Check: . For we need , so and . At that moment the growth rate is per unit time, the largest it will ever be, since is the inflection point. Sanity check: in the exponential phase the population would double every time units, reaching in about ; the logistic brake makes it take longer, as it does.□
Example 7.76 (Fitting the growth rate to data). A lake can support fish. It is stocked with , and after years there are . Assuming logistic growth, find , and predict the population after years.
Solution. and , so . From :
Then and
Sanity check: from to in the first decade, and the population is now past the inflection point at , so the second decade's gain () is larger than the first's () but the growth is beginning to slow.□
Example 7.77 (Starting above the carrying capacity). Solve with and describe the solution.
Solution. , so
Check: . The denominator increases from toward , so decreases from toward , concave up throughout: an overpopulated habitat shrinking to its capacity. It never reaches , and the formula is valid for all (the denominator would vanish only at ).□
Intuition. Picture a rumour spreading through a school of students. At first every student who knows it tells others who do not, and it spreads exponentially. But the more people already know, the harder it is to find someone who does not, so the spreading slows — fastest when exactly half know — and finally stops when everyone does. The product counts pairs of a knower and a non-knower, and that is what the logistic equation says the rate is proportional to.
Pitfall. The constant in is not the initial population and is not ; it is . And the carrying capacity is the value the solution tends to, not its starting value: in with , the capacity is .
7.15Predator–prey systems
Two species can be modelled by two coupled equations. In the Lotka–Volterra model, a prey population (rabbits) grows exponentially on its own but is eaten at a rate proportional to the number of encounters with predators (wolves), who in turn die out on their own but breed in proportion to the same encounters:
This system cannot be solved in closed form, but its qualitative behaviour can be read off in the same spirit as the phase line, now in the -plane.
Proposition 7.78 (Equilibria of the Lotka–Volterra system). The system has exactly two equilibrium points: , and
Proof. requires or ; requires or . The combinations and satisfy both; the mixed combinations ( with , or with ) are impossible.∎
Away from the equilibria the two signs tell the story. With the prey increase and with they decrease; with the predators increase and with they decrease. Starting with few predators and many prey, prey rise, predators then rise, prey fall, predators fall, and the cycle repeats: the trajectories in the phase plane circle the equilibrium counterclockwise (with on the horizontal axis), and both populations oscillate, the predators' peak lagging the prey's.
Example 7.79 (A rabbit–wolf model). For and , find the nonzero equilibrium, and determine which populations are increasing when and .
Solution. Here , , , , so the equilibrium is rabbits and wolves. At : and . Both populations are growing — the phase point is moving up and to the right, on its way around the cycle. Left alone, the rabbits will peak when reaches , after which the wolves keep growing while the rabbits decline.□
Although the system has no explicit solution, the trajectories do. Dividing the two equations,
a separable equation. Separating gives , and integrating,
Each trajectory is a level curve of the function on the left, and those level curves are closed loops around the equilibrium. This is why the populations cycle forever rather than spiralling in or out: the model has a conserved quantity.
Example 7.80 (The trajectory through a point). For the rabbit–wolf model above, write the equation of the trajectory through .
Solution. Substituting , , , :
At : . The trajectory is the closed curve on which the left side equals . The point lies directly below the equilibrium : there while , so it is the point of the cycle at which the wolf population is at its minimum and the rabbits are still increasing.□
Intuition. Think of a pendulum: it never settles, because energy is conserved. The Lotka–Volterra populations behave the same way — the expression plays the role of energy. Real ecosystems have friction (limited food for the prey, for instance, which adds a logistic term), and then the loops spiral in to a steady coexistence.
7.16Second-order linear homogeneous equations
Definition 7.81 (Second-order linear equation). A second-order linear equation has the form
It is homogeneous if for all , and nonhomogeneous otherwise. It has constant coefficients if are constants, in which case it is written with .
The first thing to know about a homogeneous linear equation is that its solutions can be combined.
Theorem 7.82 (Superposition). If and are solutions of the homogeneous equation , then so is for any constants .
Proof. Differentiation is linear, so with ,
Superposition fails for nonhomogeneous and for nonlinear equations: the sum of two solutions of satisfies , and the sum of two solutions of is generally not a solution. It is the property that makes the theory of linear equations tractable.
To get all solutions, two solutions are enough, provided they are genuinely different — not one a multiple of the other. The test for that is a determinant.
Definition 7.83 (Wronskian, linear independence). The Wronskian of two differentiable functions is
Two solutions of a homogeneous linear equation are linearly independent on an interval if neither is a constant multiple of the other; for solutions, this holds exactly when at some (equivalently every) point of the interval.
Theorem 7.84 (General solution of the homogeneous equation). Let be continuous on an interval with there, and let be linearly independent solutions of on that interval. Then every solution is of the form
The proof uses the existence–uniqueness theorem for second-order linear equations (the same statement as for first order, with two initial conditions). Given any solution and a point , the two equations , have a unique solution because their determinant is the nonzero Wronskian; then and solve the same initial-value problem, so they are equal.
Now specialise to constant coefficients: . The exponential trial solution of the introductory section is the key. Substituting gives , so is a solution exactly when is a root of the characteristic equation
The three possibilities for the discriminant give three shapes of general solution.
Theorem 7.85 (Solutions by characteristic roots). For with characteristic roots :
- If , the roots are real and distinct, and .
- If , there is one repeated real root , and .
- If , the roots are complex conjugates with and , and .
Proof. Case 1. and are solutions, and their Wronskian is , so by the general-solution theorem every solution is a combination of them.
Case 2. is one solution; we need a second. Try : then and , so
The first bracket vanishes because is a root, and because . So is a solution. The Wronskian of and is .
Case 3. Formally and are solutions, and the computation that showed solves the equation is valid for complex . By Euler's formula, . Superposition (which allows complex constants) shows that half their sum, , and their difference over , , are solutions — and these are real. Their Wronskian is (the terms in cancel and remains).∎
In case 3 the real part of the roots controls growth or decay of the amplitude and the imaginary part is the angular frequency of the oscillation. In case 1 with every solution decays; in case 2 the factor makes the solution rise briefly before wins (if ). The three cases are the overdamped, critically damped and underdamped motions of a spring, treated later.
Example 7.86 (Complex roots: pure oscillation). Solve .
Solution. The characteristic equation has roots , so and :
No exponential factor, so the oscillation neither grows nor decays; the period is . Check: .□
Example 7.87 (Distinct real roots with initial conditions). Solve with , .
Solution. , so and . The conditions give and . From the second, ; substituting, , so and :
Check: and .□
Example 7.88 (A repeated root with initial conditions). Solve with , .
Solution. , a repeated root , so . Then . Differentiating, , so and :
Check: ; . The solution rises at first (positive initial velocity) and then decays to zero, as the factor takes over.□
Example 7.89 (Damped oscillation). Solve with , .
Solution. gives , so . Then and, since
gives :
Check: , . The amplitude decays like while the solution oscillates with angular frequency .□
A boundary-value problem imposes the two conditions at different points, typically and . Unlike an initial-value problem, it may have one solution, none, or infinitely many.
Example 7.90 (Boundary-value problems). Solve with (a) , ; (b) , ; (c) , .
Solution. The general solution is , and gives in every case.
(a) . Unique solution .
(b) , regardless of . The requirement cannot be met: no solution.
(c) holds for every : infinitely many solutions .
The existence–uniqueness theorem is silent here because the conditions are at two different points.□
Intuition. The characteristic equation is the equation's fingerprint. Because reproduces itself under differentiation, feeding it into a constant-coefficient equation just multiplies it by a polynomial in ; the equation is satisfied precisely when that polynomial vanishes. A quadratic has two roots, a second-order equation has two constants, and the three ways a quadratic can have roots (two, one, or a complex pair) are the three shapes of solution.
Pitfall. In the repeated-root case the second solution is , not again; writing gives a one-parameter family and cannot satisfy two initial conditions. In the complex case the solution is written with real functions and — do not leave in a final answer.
7.17Nonhomogeneous equations: undetermined coefficients
Theorem 7.91 (Structure of the general solution). Let be any one solution of the nonhomogeneous equation , and let be the general solution of the complementary equation . Then the general solution of the nonhomogeneous equation is
Proof. If is any solution of the nonhomogeneous equation, then satisfies , so it solves the complementary equation and equals for some constants. Conversely satisfies the nonhomogeneous equation, by linearity.∎
So the work splits: find from the characteristic equation, and find one particular solution by any means. When is built from polynomials, exponentials, sines and cosines — which covers most forcing terms in applications — the method of undetermined coefficients finds by guessing its shape and solving for the coefficients. The guess works because differentiating such functions never produces anything outside their family.
Method 7.92 (Undetermined coefficients). For , choose the trial form for from the table, with all coefficients unknown:
| forcing term | trial |
|---|---|
| polynomial of degree | (full polynomial of degree ) |
| or (or both) | (always both) |
| polynomial of degree | |
| or | |
| polynomial or | (polynomial) + (polynomial), both of degree |
Modification rule. If any term of the trial form solves the complementary equation, multiply the whole trial form by ; if it still does (repeated root), multiply by .
Sum rule. If , find particular solutions for and separately and add them.
Substitute the trial form, match coefficients of like terms, and solve.
The sum rule is superposition again: if handles and handles , then handles . The modification rule is needed because a trial term that solves the complementary equation is annihilated by the left side and can never produce ; multiplying by produces a new function that is not a solution and whose derivatives bring in the needed terms.
Example 7.93 (Polynomial forcing). Find the general solution of .
Solution. Complementary: , so . For , try the full quadratic , so and . Substituting,
Matching coefficients: , so ; , so ; , so and . Hence
Check : . Note that the full quadratic was needed even though has no or constant term.□
Example 7.94 (Exponential forcing). Find a particular solution of .
Solution. Try : , so and . Thus , and the general solution is . No modification was needed because does not solve .□
Example 7.95 (The modification rule). Find a particular solution of .
Solution. The characteristic roots are and , so — and the naive trial is a complementary solution. (Substituting it gives : no choice of works.) Multiply by : , with and . Then
so and . Check: with the bracket is and the result is .□
Example 7.96 (A repeated root and the modification rule twice). Find a particular solution of .
Solution. : the root is repeated, so both and are complementary solutions. The trial form must be . Then and , so
giving and .□
Example 7.97 (Resonance). Find the general solution of and describe its behaviour.
Solution. , and the forcing term is itself a complementary solution, so the trial form is . Differentiating twice (the products need care),
Then , since the terms with cancel. Matching with : , . So
The particular solution has amplitude , growing without bound: forcing a system at its own natural frequency produces resonance. This is the mathematics behind a pushed swing, a shattered wine glass and a bridge that must not be marched across in step.□
Example 7.98 (A sum of forcing terms). Find a particular solution of .
Solution. . Handle the two terms separately. For : try , giving , so , . For : try , giving , so . Adding,
Check: .□
Intuition. A guitar string plucked and left alone rings at its own frequencies — that is , the equation's natural behaviour, which always dies away when there is damping. Bow the string instead, and after the transient it vibrates at the frequency you impose — that is , the forced response. Undetermined coefficients says: the forced response has the same shape as the force (a sine for a sine, an exponential for an exponential), and only its size and phase need to be computed.
Pitfall. For a forcing term the trial form must contain both and ; the first derivative turns cosines into sines, and omitting the sine term makes the equations for inconsistent whenever there is a term. Likewise a polynomial forcing term needs the full polynomial of that degree, not just the terms present in .
7.18Variation of parameters
Undetermined coefficients fails when is not of the exponential–polynomial–trigonometric type: for or there is no finite family of functions closed under differentiation to guess from. Variation of parameters is a method that always produces a particular solution, given the complementary solutions, at the price of two integrals.
The idea is to look for in the form , replacing the constants of by functions. Two unknown functions give two degrees of freedom, and the equation is only one condition, so a second condition can be imposed for convenience.
Theorem 7.99 (Variation of parameters). Let be linearly independent solutions of , with Wronskian . Then a particular solution of
is , where
Proof. Set . Then . Impose the convenient condition
so that and hence . Substituting into the equation and grouping,
The two brackets vanish because solve the homogeneous equation, so the equation reduces to
Together with the imposed condition this is a linear system for with determinant . Cramer's rule gives and ; integrate to get . Constants of integration may be dropped, since they only add multiples of to .∎
Note the equation must be in standard form, with leading coefficient : for , use .
Method 7.100 (Variation of parameters).
- Write the equation as (divide by the leading coefficient).
- Find and compute .
- Compute and , omitting constants.
- ; the general solution is . Any part of that is a multiple of or may be dropped.
Example 7.101 (Forcing by ). Solve on .
Solution. , , and . Then
Integrating, and (the absolute value is unnecessary since on this interval). So
and the general solution is . Sanity check at : , and is odd, as is.□
Example 7.102 (Forcing that undetermined coefficients cannot handle). Solve for .
Solution. The characteristic root is repeated, so , , and
With :
so and . Then ; the term is a multiple of and can be dropped, leaving and
Check: writing with , one finds , since and .□
Example 7.103 (Comparing the two methods). Find a particular solution of on .
Solution. , , . Then
so and , and
Undetermined coefficients could not have started, because has no finite trial family. Variation of parameters simply asks for two integrals.□
Intuition. The constants in are the settings of two dials that describe how the system rings on its own. Variation of parameters lets the dials turn continuously as time passes, and asks how they must turn so that the forcing is exactly accounted for. The answer is a pair of integrals of the force against the natural modes — which is why the method never needs a lucky guess.
7.19Applications: springs and oscillations
A mass on a spring, displaced from its rest position, feels the restoring force (Hooke's law, the spring constant), a damping force proportional to velocity (air resistance, a dashpot), and possibly an external force . Newton's second law gives:
Definition 7.104 (The mass–spring equation).
The motion is free if and forced otherwise; undamped if and damped otherwise.
Free undamped motion, , has characteristic equation with roots where , so
where is the amplitude and the phase, with , . (The rewriting is the cosine subtraction formula run backward.) The motion is simple harmonic with angular frequency , period and frequency ; a stiffer spring or lighter mass oscillates faster, and the amplitude is set entirely by the initial conditions.
Example 7.105 (Simple harmonic motion). A spring with natural length m is stretched to m by a force of N. A mass of kg is attached, pulled to m and released from rest. Find the position at time .
Solution. Hooke's law gives N/m, so the equation is , or , and . The general solution is . The initial conditions are (stretched m beyond rest) and , so and :
The mass oscillates between m with period s.□
With damping, has roots , and the sign of the discriminant sorts the motion into three kinds.
Theorem 7.106 (The three damping regimes). For free damped motion with :
- Overdamped, : two distinct negative real roots , and . No oscillation; the mass creeps back to equilibrium, crossing it at most once.
- Critically damped, : repeated root , and . No oscillation; the fastest return to equilibrium without overshoot.
- Underdamped, : complex roots with , and . Oscillation at the reduced frequency , with amplitude decaying like .
In every case as .
Proof. The three cases are the three cases of the characteristic-roots theorem. In case 1, both roots are negative because . In case 2, . In case 3 the real part is . In all three the exponentials decay, so ; and a sum with vanishes for at most one , which is the "at most once" claim in case 1.∎
Example 7.107 (Overdamped motion). Solve with , , and show that the mass never crosses the equilibrium.
Solution. : overdamped. , so . The conditions give and , so , , , :
Since for , : the mass approaches equilibrium from above and never crosses it. Check: , .□
Example 7.108 (Critical damping). A mass with spring constant is critically damped. Find , and solve with , .
Solution. Critical damping requires , so and the equation is with repeated root : . Then and :
The mass, struck at equilibrium with velocity , moves out to a maximum at (where ), reaching , then returns to equilibrium without crossing it. Door closers and car shock absorbers are tuned to be near this regime.□
Example 7.109 (Underdamped motion). Solve with , , and find the quasi-period.
Solution. : underdamped. , so with , compared with for the undamped spring. From , ; from , :
The oscillation has quasi-period s, and each successive peak is smaller by the factor .□
Now add a periodic external force, . For the undamped system , undetermined coefficients with the trial gives , so as long as ,
and the general solution is this plus : a superposition of two oscillations at the natural and the forcing frequency. As approaches the amplitude of grows without bound, and at the trial form must be multiplied by ; the resonance example gives
an oscillation whose amplitude grows linearly forever. This is pure resonance. Near resonance a related phenomenon appears: with and close to , the solution is
a fast oscillation at the average frequency whose amplitude is itself slowly oscillating at the small frequency . The slow throbbing is called beats; it is what you hear when two nearly-in-tune strings are struck together.
With damping, , the complementary solution decays whatever the initial conditions — it is the transient — and every solution settles down to the particular solution, the steady state, which oscillates at the forcing frequency with a bounded amplitude. Damping makes true resonance impossible, but the steady-state amplitude still peaks sharply when is near and is small.
Example 7.110 (Steady state of a forced damped spring). Find the steady-state motion of .
Solution. Try : , . Substituting,
so and : the steady state is . The transient (critical damping) dies away, and the mass ends up oscillating with amplitude at the forcing frequency, a quarter-cycle behind the force.□
Intuition. A child on a swing is the whole section. Left alone with no friction, the swing repeats forever: simple harmonic motion. Rusty chains make each swing a little smaller: underdamped. Swing in thick honey and it does not swing at all, just oozes back to the bottom: overdamped, or if the honey is exactly right, critically damped. And a parent pushing in time with the swing's own rhythm makes it go higher and higher: resonance. Pushing at the wrong rhythm just makes it jerky — that is forcing off resonance, and pushing at nearly the right rhythm produces the slow surge and fade of beats.
Pitfall. The damping classification depends on all three constants through , not on alone: is critical for , but overdamped for , . And the frequency of a damped oscillation is , always less than the undamped .
7.20Electric circuits
A series circuit with a resistor , inductor , capacitor and voltage source obeys Kirchhoff's law: the applied voltage equals the sum of the drops across the three elements, which are , and , where is the charge on the capacitor and the current. In terms of ,
which is the mass–spring equation with , , , and . Every result about springs transfers word for word: the circuit's natural frequency is , resistance plays the role of damping, and the three damping regimes are decided by . Differentiating the equation gives the same equation for the current, .
| mechanical | electrical |
|---|---|
| displacement | charge |
| velocity | current |
| mass | inductance |
| damping | resistance |
| spring constant | (elastance) |
| external force | voltage |
Example 7.111 (An undamped LC circuit). A circuit has H, no resistance, and F. The capacitor initially carries a charge of C and no current flows. Find and the frequency of the oscillation.
Solution. The equation is , so . From and : . The charge sloshes back and forth between the capacitor plates at angular frequency rad/s, that is Hz, forever — the electrical analogue of a frictionless spring. The current is .□
Example 7.112 (A forced RLC circuit). A circuit has H, , F and voltage V. Initially the charge and current are zero. Find and the steady-state current.
Solution. The equation is . Complementary: gives , so : underdamped, since . Particular: try ,
So , i.e. , and , giving , : . Now the initial conditions: , so ; and since , gives , :
The first term is the transient; the steady-state charge is and the steady-state current is its derivative, , with amplitude A. Check: .□
Intuition. An inductor resists changes in current the way mass resists changes in velocity; a capacitor pushes charge back the way a spring pushes a mass back; a resistor dissipates energy the way friction does. A tuned radio is the resonance section in electrical clothing — the circuit's natural frequency is adjusted until it matches the station's, and that station's signal is the one that produces a large response.
7.21Cauchy–Euler equations
The constant-coefficient theory does not extend to general variable coefficients, but one family of variable-coefficient equations is almost as easy.
Definition 7.113 (Cauchy–Euler equation). A second-order Cauchy–Euler (or equidimensional) equation has the form
with constants : each derivative is multiplied by .
Because times the th derivative of a power is again a multiple of , the natural trial solution is . Substituting , :
so is a solution exactly when satisfies the indicial equation .
Theorem 7.114 (Solutions of the Cauchy–Euler equation). Let be the roots of . For :
- Real distinct roots: .
- Repeated root : .
- Complex roots : .
The pattern is the constant-coefficient theorem with replaced by and replaced by , and the reason is that the substitution turns a Cauchy–Euler equation into a constant-coefficient equation in : by the chain rule and , so the equation becomes , whose characteristic equation is the indicial equation. Its solutions become .
Example 7.115 (Distinct real roots). Solve for .
Solution. The indicial equation is , so
Check with : .□
Example 7.116 (A repeated root). Solve for .
Solution. : repeated root , so
Check with : , , and .□
Example 7.117 (Complex roots). Solve for .
Solution. gives , so , and
The solution oscillates, but ever more slowly as grows, since grows slowly; and infinitely fast as .□
7.22Power-series solutions
When neither the coefficients are constant nor the equation is Cauchy–Euler, there may be no closed-form solution at all — but there is usually a power series. Assume , substitute, and match coefficients: the equation becomes a recurrence relation for the , and the recurrence determines the series.
Method 7.118 (Power-series solution about ).
- Write , so and .
- Substitute into the equation and shift indices so that every sum is a sum of multiples of the same power .
- Set the total coefficient of each to zero to obtain a recurrence relation.
- Solve the recurrence in terms of the free coefficients (for a second-order equation, and ), and identify the series if possible.
Example 7.119 (Sine and cosine from their equation). Solve by power series.
Solution. Substitute the series. In , replace by so that the power is :
A power series is identically zero only if every coefficient is, so
The even coefficients are determined by : , , , and in general . The odd ones by : , , and . So
recovering the known general solution, with and as they should be. Both series converge for all by the ratio test.□
Example 7.120 (A variable-coefficient equation). Solve by power series, and identify the solution with , .
Solution. Here , which also equals since the term is zero. Collecting the coefficient of :
With and all odd coefficients vanish, and , , , , that is . So
Check: , so , and . The second solution, from , has no elementary closed form — which is exactly the situation the method exists for.□
Intuition. A power series is a polynomial with infinitely many knobs, and a differential equation is a rule relating each knob to the ones before it. Turn the first one or two by hand (the initial conditions) and the rule sets all the rest. The method never asks whether the answer has a name; it simply computes it, one coefficient at a time.
Summary (Which equation, which method).
- , : if and are continuous on a rectangle about , a solution exists and is unique near ; continuity of alone buys only existence.
- Separable, : write and integrate, then check the constants that division discarded.
- Homogeneous, : gives the separable .
- Linear, : multiply by , so and , defined on any interval where are continuous.
- Bernoulli, (): linearises it.
- with : exact, solution with , .
- Autonomous, : equilibria at , stable if , unstable if . Special cases giving , and the logistic equation giving .
- : from the roots of , , , or — the overdamped, critically damped and underdamped regimes. Nonhomogeneous: , with from undetermined coefficients (multiply the trial form by if it solves the complementary equation) or from variation of parameters, , . Cauchy–Euler equations follow the same three cases with in place of .
- Dropping the constant of integration, or writing one on each side and never combining them. A first-order general solution has exactly one arbitrary constant; a second-order one has two.
- Forgetting the absolute value in after separating, and then losing the negative solutions; or forgetting that the constant can also be , which restores the equilibrium solution you divided out.
- Computing the integrating factor from an equation that is not yet in standard form. Divide by the coefficient of first, then read off .
- Multiplying only the left side of a linear equation by . The right side must be multiplied too: the answer involves , not .
- In Euler's method, using the slope at the wrong point — it is always with the current approximation, not the exact value and not the next point.
- Concluding that an equilibrium is stable because . Only decides; when look at the sign of on each side.
- Confusing the carrying capacity with the initial population, or writing instead of in the logistic solution.
- Getting the characteristic equation wrong by a sign or by dropping a coefficient: gives , not .
- Treating a repeated root like two distinct roots and writing ; the second solution is .
- Leaving out the sine term when the forcing is a pure cosine, or omitting lower-degree terms when the forcing is a polynomial. The trial form is the whole family.
- Forgetting the modification rule: if the trial form solves the homogeneous equation, multiply by (by for a repeated root). Otherwise the coefficients cannot be solved for.
- Using variation of parameters on an equation whose leading coefficient is not ; divide first, or the formula for is off by that factor.
- Deciding the damping type from alone. It is the sign of that matters.
- Not checking the final answer in the original equation and initial conditions. Substitution takes a minute and catches almost every error above.