9. Differential Equations
9.1 Chapter Opener: Introduction and Mathematical Modeling
Chapter 9
Differential Equations
Big idea: many laws of nature do not hand you the quantity itself. They tell you how fast it changes, and solving the differential equation rebuilds the quantity from its rate.
A weather report says how fast the night air cools. A bank states the yearly growth rate of a deposit. A tank manual states the rate at which salt flows in and out. None of these tells you the temperature, the balance, or the salt content directly. Each one states a rule about change. This chapter turns such rules into equations and solves them.
- 9.1 meets the first rule: a cooling drink, and what it means to solve an equation about change.
- 9.2 names the parts: differential equation, order, degree, and the family of solutions.
- 9.3 fixes one curve out of the family with extra conditions.
- 9.4 sorts first-order equations into three types and gives each type its own method.
A cup of hot drink stands in a room at C. You notice that it cools quickly at first, and then more and more slowly. The hotter the drink is compared with the room, the faster it loses heat. A simple law says this exactly: the rate of cooling is proportional to the temperature difference. In symbols, with the temperature after minutes,
This is a differential equation: an equation that contains the derivative of an unknown function. It does not give . It gives a rule about how changes. To find , you have to solve the equation. If the drink starts at C, the solution is
You can check this by differentiating: , and . They match. After minutes the temperature is C. The computer confirmed this by solving the equation step by step on its own, without using the formula.
Graph of the temperature of a cooling drink against time for 40 minutes. The curve starts at 80 degrees, falls quickly at first, then more slowly, and levels off towards a dashed horizontal line at the room temperature of 20 degrees.
Read the figure like this. The horizontal axis is time, the vertical axis is temperature. The orange curve starts at 80 and drops steeply, because the gap to room temperature is large. As the curve nears the dashed line, the gap shrinks, so the curve flattens. The flattening is the picture of the minus sign in the equation: the rate dies away as the difference dies away.
Cooling is only one example. The same pattern appears in many places, and each one leads to a differential equation of the same shape.
| Situation | Unknown quantity | Rule about its rate |
|---|---|---|
| A drink cools in a room | temperature | is proportional to |
| A small population grows freely | count | is proportional to |
| A radioactive sample decays | mass | is proportional to |
All three rules say the same thing in words: the rate is a fixed multiple of the current amount. You will solve all three with one method in Section 9.4.1. The equation states the rule; the solution rebuilds the quantity.
You already know the simplest kind. In Chapter 7 you solved by integrating: . Every integral is the solution of a differential equation of the form . The equations in this chapter are harder, because the right side may contain too, as in . You will need all your integration skills.
Differential equations appear wherever something changes according to a rule: cooling and heating, the growth of a population, a decaying radioactive sample, the motion of a falling object, the charging of a battery, the spread of a rumour.
Answer in your own words, then check.
Differential equations grew out of calculus. Their story begins in the late 17th century, when mathematicians first learned to work with rates of change.
- 1675: Gottfried Wilhelm Leibniz (1646–1716) wrote the integral sign and the symbol for the first time, in a note on integrating . The birth of the subject is often dated to this year. Leibniz wanted to find a curve from a rule about its tangents, which is exactly a differential equation.
- 1690: Jakob Bernoulli (1654–1705) used the word "integral" for what we now call a solution. The word solution came later: it was used by Joseph-Louis Lagrange (1736–1813) in 1774, and Henri Poincaré (1854–1912) argued strongly for it. The name "separation of variables" is due to Johann Bernoulli (1667–1748), the younger brother of Jakob.
- 1691 and later: Leibniz found the method of separating variables, then a method for homogeneous equations (about a year later), and soon after a method for linear first-order equations. All three methods of this chapter came from one person within about 25 years of the first equation.
- Around 1715: Johann Bernoulli studied the innocent-looking equation and found solutions of surprisingly different shapes. You can see why: it has the solutions and , and every combination also works. With the graph is a parabola; with it is a hyperbola; with both, a cubic-type curve. (The computer checked all three types.)
- 20th century: mathematicians turned to qualitative analysis: studying how solutions behave (do they settle down, grow, or oscillate?) without finding a formula. This is now essential in physics, biology and engineering.
Every method in this chapter is over three hundred years old, yet scientists and engineers use them daily: the mathematics of change has never gone out of date.
9.2 Basic Concepts: Order, Degree and Linearity
A differential equation is an equation that contains an unknown function of one variable together with its derivatives. We write the derivatives as , , ... or in the short form , , ... Here are some examples:
- [Concept] (the rate of growth is twice the value),
- [Board Standard] (the second derivative is the negative of the function),
- [HOTS] .
In this chapter there is only one independent variable (such as or ), so these are ordinary differential equations.
A solution of a differential equation is a function that makes the equation true when you put it in. To test a candidate, follow three steps: calculate its derivatives, substitute them into the equation, and check that both sides agree for every .
Test 1. Is a solution of ? Differentiate: . And . They are equal for every , so yes. (At both sides equal .) What about ? Then but , which is different, so no. The computer checked both claims at several values of .
Test 2. Is a solution of ? We get and , which is exactly . So . Yes. Testing by substitution is the one skill you will use in every section, so practise it until it feels automatic.
Take again. The function is a solution for every number . Each value of gives one curve, and every curve in the picture satisfies the same equation. The equation does not choose between them. To choose one, you need extra information, such as the value of at one point. That is the topic of Section 9.3.
Four exponential curves y equals C times e to the 2x for C equal to minus 2, minus 1, 1 and 2, plus the horizontal axis y equals 0. The curves with positive C rise steeply to the right and the curves with negative C fall steeply. All of them satisfy the equation y prime equals 2y.
Read the figure curve by curve. For positive C the curves climb to the right, because where y is large the slope 2y is large. For negative C they dive down, for the same reason. The dashed axis is the member with C = 0: zero slope everywhere, still a solution. One equation, many curves: that is why extra conditions matter.
Answer in your own words, then check.
The order of a differential equation is the order of the highest derivative that appears in it. First derivative: order . Second derivative: order . And so on. Only the highest derivative counts. The unknown function itself (order ) and any lower derivatives do not change the order.
| Equation | Highest derivative | Order |
|---|---|---|
Look at the last row: the square does not matter for the order. The highest derivative is still the second one, so the order is 2. Powers belong to the next topic, degree.
State the order, then check.
The degree is defined only when the equation is a polynomial in its derivatives. Then the degree is the power of the highest-order derivative.
Before you read off the degree, clear any roots or fractions that contain derivatives, so that the equation is a polynomial in . Then look at the highest derivative and find its power.
| Equation | Order | Degree | Why |
|---|---|---|---|
| highest derivative has power | |||
| highest derivative is cubed | |||
| 2 | 2 | square both sides: | |
| 1 | not defined | the derivative is inside a sine, so it is not a polynomial | |
| 1 | 2 | highest derivative has power |
Notice two things. First, in the derivative sits inside a sine function. A sine is not a polynomial, so the degree is not defined. Second, the power of itself does not matter: has degree because appears to the first power.
State the order and degree of each equation.
9.3 General and Particular Solutions of a Differential Equation
Look at the simplest equation . Integrating gives . Here is an arbitrary constant: you may choose any number. The result is the general solution. It describes all the solutions in one formula.
A particular solution is one single solution, obtained by giving the arbitrary constants definite values. Usually you do this using a condition, for example "the curve passes through the point ". Then , so , and the particular solution is .
Four parabolas y equals x squared plus C for C equal to minus 2, 0, 2 and 4, each shifted vertically. The parabola with C equal to 2 is drawn thicker and passes through the marked point (1, 3).
Read the figure from bottom to top. Every grey curve has the same shape, because every member has the same slope 2x at each x. They differ only by a vertical shift. The marked dot sits on exactly one of them, the orange curve. One point is enough to choose one curve out of infinitely many.
The general solution of an equation of order has independent arbitrary constants. The order tells you how many.
- [Board Standard] Order : one constant. Example: has general solution .
- [HOTS] Order : two constants. Example: has general solution . The computer checked, for several choices of and , that this is a solution.
A second-order equation needs two conditions. For , suppose we are told and . Since and , putting gives and . So the particular solution is . Check: and .
A ball is thrown straight up. Its height (in metres) after seconds follows (gravity slows it down by m/s every second). Integrate once: . Integrate again: . If the ball starts at ground level with speed m/s, then gives , and gives . So . The ball is highest when , that is at , where m. It is back on the ground at s.
You can also start from a family of curves and find the differential equation it satisfies. The rule is: differentiate once for each arbitrary constant, then eliminate the constants. Each differentiation gives one more relation, so with constants you differentiate times.
One constant. Start from the family . Differentiate once: . The right side is , so . The constant has disappeared, and we have found the differential equation that this family satisfies. It is first order, as it should be with one constant.
Two constants. Start from . Differentiate once: . Differentiate again: . Now look at : it equals , which is exactly . So , that is . Both constants are gone. The result is second order, as it should be with two constants. The computer checked the solution against by substitution.
Answer in your own words, then check.
9.4 Methods of Solving Differential Equations: Variables Separable Method
From here on we study equations of order and degree . They can be written as . There is no single method that solves all of them, but three types cover most of what you will meet. Learn to recognise the type first.
| Type | It looks like | Method | Section |
|---|---|---|---|
| Variables separable | put all on one side, all on the other, integrate | 9.4.1 | |
| Homogeneous | substitute , then separate | 9.4.2 | |
| Linear | multiply by an integrating factor | 9.4.3 |
Each method turns a hard equation into an easy integration. Separation works because integration undoes differentiation: once the part and the part stand on different sides, each side is an ordinary integral. Substitution works because setting rewrites a homogeneous equation using only the single quantity , and the result separates. The integrating factor works because multiplying by it packs the whole left side into one product derivative, , which you then integrate. The next three sections carry out each idea in full.
Follow the chart from top to bottom. Test the product shape first, then the ratio shape, then the linear shape. If more than one box fits, any matching method gives the same family of solutions.
An equation is homogeneous if replacing by and by does not change : . This works exactly when can be written using only the ratio . The computer tried several values of on each function:
| Unchanged by , ? | Homogeneous? | |
|---|---|---|
| yes | Yes | |
| yes | Yes | |
| yes | Yes | |
| no (it becomes ) | No | |
| no (it becomes ) | No |
Some equations belong to more than one type. For instance is separable, homogeneous and linear. Use whichever method you find easiest.
Name the type of each equation, then check. Do not solve yet.
A first-order equation is variables separable if it can be written as
a product of a function of only and a function of only. Then you can move everything with to one side and everything with to the other, and integrate each side.
The steps:
- [Concept] Divide by and "multiply by " to separate: .
- [Board Standard] Integrate both sides: . One constant is enough.
- [HOTS] If you can, solve for . If not, leave the answer as a relation between and (an implicit solution).
Why does this work? Integrating undoes differentiating. After separation, the left side involves only and the right side only , so each side is an ordinary integral of the kind you met in Chapter 7. Separation turns one hard problem into two easy ones. The only price is the division by , which is why you must check the case separately (Example 4).
Goal: solve . Separate: . Integrate: . Solve for y: , so
Here may be positive or negative. The value (the solution ) also works. The computer checked this for and .
Goal: solve . Separate: . Integrate: . Take the tangent of both sides and use the addition formula for tangent, writing :
Check: with , the computer confirmed that satisfies the equation at several points (away from , where the formula breaks down because the denominator is zero).
Goal: solve . Separate: . Integrate: , which gives
This is an implicit solution: a family of circles centred at the origin. The upper half of the circle with is the function , and the computer confirmed that it satisfies the equation, and that the slope of the circle at the points , , and is .
Three circles centred at the origin with radii 1, 2 and 3. At each point of a circle, the tangent to the circle has slope minus x over y, as the differential equation says.
Read the figure as follows. Pick any point on a circle and draw the tangent there. Its slope always equals minus x over y at that point, exactly what the equation demands. So each circle is a solution, and together the circles fill the plane. An implicit solution can describe curves that are not functions, like full circles.
Before solving, you can picture the equation. At every point , the equation fixes the slope of the solution through that point. Drawing a short dash with that slope at each point of a grid gives a slope field. The solution curves must follow the dashes, like a path following signposts.
A grid of short dashes whose slopes equal minus x over y, forming a circular pattern around the origin. One solution curve, the upper half of a circle of radius 2, threads through the dashes, always tangent to them.
Read the figure dash by dash. Along the top row the dashes tilt down to the right; along the bottom row they tilt up. On the vertical axis they are flat, because x = 0 gives slope 0. The orange curve rides the dashes everywhere it goes. If you can draw the field, you can sketch any solution even before you integrate.
Goal: solve . Separate: . Integrate: , so . But we divided by , which is not allowed if . And is a solution of the equation (both sides are ). It cannot be obtained from for any . The computer confirmed that both and are solutions.
Goal: return to the drink of Section 9.1, , . Separate: . Integrate: . Solve for T: . Use the condition: from we get . When does the drink reach C? Solve : minutes. A step-by-step numerical solution gives at that time.
Try these, then check.
9.5 Homogeneous Differential Equations
An equation is homogeneous when depends only on the ratio , that is, (Section 9.4). It is not separable directly, but a change of variable makes it so.
The method. Put , where is a new unknown function of . By the product rule,
Substitute into the equation. The ratio becomes just , and the result is a separable equation in and . Solve it, then replace by .
Why does this work? Scaling both and by the same factor leaves a homogeneous equation unchanged, so only the ratio carries new information. The substitution names that ratio . Once the equation speaks only about and , the variables separate, and you are back on familiar ground. Substitution reduces a new type to an old one.
Goal: solve . Rewrite: . Substitute: , which gives , that is . Integrate: . Put v back as :
Check: the computer verified against the equation for several .
Four curves y equals x times (the natural log of x plus C), for C equal to minus 1, 0, 1 and 2, drawn for x from 0.1 to 4. All of them start near zero at the left, dip and then rise. They are different members of the same solution family.
Read the figure from left to right. Near x = 0 every curve hugs the axis, because the factor x squeezes all members together. Further right the curves fan out: a larger C lifts the whole curve. One equation, one substitution, and a whole family appears.
Goal: solve . Rewrite: divide top and bottom by : the right side is . Substitute: , hence . Separate: . Integrate: . Put v back: so . For and :
Goal: solve . Substitute: , so . Separate: . Integrate: , so . Put v back: hence , or .
Goal: solve for . Rewrite: divide by : . Substitute: , which gives . Integrate: , which gives . Writing and using :
Check: with this is , and with it is . The computer checked both against the original equation.
Goal: find the solution of with . From Example 1, . Use the condition: at : , so . Then . A step-by-step numerical solution of the equation from to agrees.
Try these, then check.
9.6 Linear Differential Equations and Integrating Factors
A first-order equation is linear if it can be written in the standard form
where and are functions of only (or constants). "Linear" means that and appear only to the first power and are not multiplied together.
Define the integrating factor . It has the useful property . Now multiply the whole equation by and use the product rule:
The left side is the derivative of a single product. So we can integrate both sides:
Why does this work? The factor is built exactly so that , which is the missing piece the product rule needs. Multiplying by packs the two terms and into one derivative, . After that packing, one integration finishes the job.
The steps:
- [Concept] Write the equation in the standard form (divide by the coefficient of if needed).
- [Board Standard] Find . You do not need a constant here.
- [Board Standard] Multiply the equation by , and integrate: .
- [HOTS] Divide by to get .
The computer checked the property for each integrating factor used below.
Goal: solve . Find I: here , so . Pack and integrate: . Integrate: . Divide: so
Five curves y equals e to the minus x plus C times e to the minus 2x, for C from minus 2 to 2, drawn for x from 0 to 4. At the left they are spread out, but as x grows they all come together and approach the curve for C equal to 0.
Read the figure from left to right. The five curves start far apart, because C matters most when e^(−2x) is large. As x grows, e^(−2x) shrinks to nearly zero, so every curve settles onto the orange middle curve e^(−x). The C part is temporary; the e^(−x) part is permanent.
Goal: solve for . Find I: here , so . Pack and integrate: then . Integrate: , so .
Goal: solve . Standard form first: divide by to reach the standard form: , so . Pack and integrate: then , so and
Goal: a balance (in units) grows continuously at the rate per year, and also receives steady deposits of units per year. Then , or . Find I: here and . Pack and integrate: so , and . Divide: therefore . Use the condition: if , then and . After years, . A step-by-step numerical solution agrees.
Sometimes it is easier to treat as the unknown and as the variable. The equation , with functions of , is solved in exactly the same way, with . For example, has , so and . (The computer checked .)
Try these, then check.
9.7 Miscellaneous Worked Examples
The examples below mix all three methods. For each one, first name the type, then solve. This is how the chapter test will ask them: the type is never announced.
Type: separable, since . Goal: find the curve through whose slope at every point is . Separate: . Integrate: , so . Use the condition: at : , so . Hence . Check: at this gives , which is .
Type: separable. Goal: a radioactive sample decays at a rate proportional to the amount present: . Its half-life is days. How much remains after days? Solve: the solution is . Half-life means , so . After days, . That is of the original amount, as you expect from three halvings. A step-by-step numerical solution agrees.
Exponential decay curve starting at 1 and falling towards zero over 16 days, with marked dots at day 0 (value 1), day 5 (value one half), day 10 (value one quarter) and day 15 (value one eighth).
Read the figure in steps of 5 days. Each step cuts the height in half: from 1 to one half, to one quarter, to one eighth. The dots sit exactly on the curve, which shows the formula and the halving idea agree. Half-life means the same fraction is lost in every equal time step.
Type: homogeneous (every term has degree ). Goal: solve . Substitute: put : , so . Separate: . Partial fractions: . Integrate and tidy up:
Check: this is an implicit solution. The computer checked, at the points , and of the curve with , that its slope equals .
Type: separable. Goal: solve for . Separate: . Integrate: . So .
Type: linear (after writing it in standard form). Goal: a tank holds litres of pure water. Salt water with grams of salt per litre flows in at litres per minute, and the well-mixed liquid flows out at litres per minute. Let be the grams of salt in the tank after minutes. Salt comes in at g/min. Salt leaves at g/min. So
Read the diagram like a balance sheet. The top arrow adds 6 grams every minute. The bottom arrow removes liquid whose concentration is S divided by 50, times 2 litres per minute. Inflow minus outflow is the rate of change of S, which is exactly the differential equation.
Solve: this is linear with . Then , so . Use the condition: with : . So . After minutes, grams. In the long run the tank holds g, which is L g/L, the concentration of the incoming water.
Graph of the amount of salt in the tank over 120 minutes. The curve starts at zero, rises quickly at first, then more slowly, and levels off towards a dashed horizontal line at 150 grams.
Read the figure in two halves. In the first half the curve climbs fast, because the tank is nearly fresh and almost all incoming salt stays. In the second half it flattens towards the dashed line: the outgoing liquid is now nearly as salty as the incoming one, so little extra salt accumulates. The dashed line is not a guess; it is 50 litres times 3 grams per litre.
Type: separable, since . Goal: solve . Separate: . Integrate: , so and . Check the domain: this exists only while . For , the solution stops at , where goes to infinity. The computer checked for . Solutions of differential equations do not always exist for all .
9.8 Miscellaneous Exercise and Board Assessment
9.9 Chapter Summary and Decision Flowchart for ODEs
This chapter began with a rule about change and ended with the quantity itself. These are the ideas to carry forward.
- A differential equation contains an unknown function and its derivatives. Its order is the order of the highest derivative. Its degree is the power of the highest derivative, when the equation is a polynomial in the derivatives (otherwise the degree is not defined).
- A solution is a function that makes the equation true. The general solution of an equation of order has independent arbitrary constants. A particular solution fixes the constants using conditions.
- Variables separable: . Write and integrate both sides. Check whether gives an extra solution.
- Homogeneous: , that is, . Put , so , separate, integrate, and replace by .
- Linear: . The integrating factor is , and the solution is . If the equation has as the unknown, , use .
- Always check: differentiate your solution and substitute it back into the equation.
| If the equation looks like | Then it is | And the first step is |
|---|---|---|
| a product | separable | write |
| a function of only | homogeneous | put |
| with in | linear | multiply by |
When you meet a new equation, name its type before you touch your pen. The type chooses the method, and the method is mostly integration you already know.