DIFFERENTIAL EQUATIONS
Chapter 9: Differential Equations
Chapter 9
Differential Equations
Big idea: many laws of nature do not tell you a quantity directly. They tell you how fast it changes. A differential equation states such a law, and solving it recovers the quantity itself.
9.1 Introduction
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.
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.
9.2 Basic Concepts
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:
- (the rate of growth is twice the value),
- (the second derivative is the negative of the function),
- .
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, calculate its derivatives and substitute.
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.
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.
9.2.1. Order of a differential equation
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 |
|---|---|---|
9.2.2 Degree of a differential equation
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.
Answers
- Order 3, degree 1. The highest derivative is , to the first power.
- Order 1, degree not defined. The derivative is inside an exponential, which is not a polynomial.
- Order 2, degree 1. The highest derivative is (power ). The cube on is a lower derivative, so it does not matter.
EXERCISE 9.1
- State the order and the degree (if defined) of .
- State the order and the degree (if defined) of .
- State the order and the degree (if defined) of .
- State the order and the degree (if defined) of .
- State the order and the degree (if defined) of .
- State the order and the degree (if defined) of .
- State the order and the degree (if defined) of .
- State the order and the degree (if defined) of .
- State the order and the degree (if defined) of . (Square both sides first.)
- State the order and the degree (if defined) of .
Answers
- Order 1, degree 1.
- Order 2, degree 1.
- Order 3, degree 2.
- Order 3, degree 1.
- Order 1, degree 2.
- Order 2, degree 1.
- Order 2, degree not defined.
- Order 2, degree 2.
- Order 2, degree 2.
- Order 2, degree 1.
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).
The general solution of an equation of order has independent arbitrary constants. The order tells you how many.
- Order : one constant. Example: has general solution .
- 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.
Start from the family . Differentiate: . The right side is , so . The constant has disappeared, and we have found the differential equation that this family satisfies.
EXERCISE 9.2
- Show that is a solution of for .
- Show that is a solution of . Find if , and then find .
- Show that is a solution of . Find the solution with and .
- Show that is a solution of for .
- Is a solution of ? Is ?
- Show that is a solution of . Find the solution with and .
- Find the particular solution of that satisfies .
- A population grows according to , with . Show that and find .
Answers
- , so . Adding : . It matches.
- , so . From . Then .
- . Using and , we get and . So .
- . And . They are equal.
- : , so . Yes. : , so . No.
- and . Then . From the conditions, and , so and . The solution is (it gives , ).
- Integrating, . At : , so . The solution is .
- , and . So it is the solution. .
9.4. Methods of Solving First Order, First Degree Differential Equations
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 |
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.
9.4.1 Differential equations with variables separable
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:
- Divide by and "multiply by " to separate: .
- Integrate both sides: . One constant is enough.
- If you can, solve for . If not, leave the answer as a relation between and (an implicit solution).
Solve . Separate: . Integrate: . Then , so
Here may be positive or negative. The value (the solution ) also works. The computer checked this for and .
Solve . Separate: . Integrate: . Take the tangent of both sides and use the addition formula for tangent, writing :
With , the computer confirmed that satisfies the equation at several points (away from ).
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.
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.
Return to the drink of Section 9.1: , . Separate: . Integrate: . So . From we get . When does the drink reach C? Solve : minutes. A step-by-step numerical solution gives at that time.
EXERCISE 9.3
- Solve for .
- Solve .
- Solve .
- Solve with .
- Solve with .
- Solve for . What is the solution through ?
- Solve for . Is there a solution that this method misses?
- A population of bacteria satisfies , with . Find .
- Find the curve through whose slope at every point is . (Take .)
Answers
- Separate: . So , which gives .
- Write . Separate: . So , and . (The computer checked this for .)
- Separate: . Then , so .
- Separate: . So and . From : . The solution is .
- Separate: . So and . From : . The solution is .
- Separate: . So , and (that is, ). Through : , so .
- Separate: . So , which gives . The method divides by , and it misses the solution .
- Separate: , so , and . Then .
- From Example 3, . At : (the point gives at ). The curve is the upper half of the circle, .
9.4.2 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 .
Solve . Here . So , which gives , that is . Integrate: . Replace :
The computer checked 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.
Solve . Divide top and bottom by : the right side is . So , hence . Separate: . Integrate: . So . For and :
Solve . Then , so . Separate: . Integrate: , so . Hence , or .
Solve for . Divide by : . So , which gives . Integrate: , which gives . Writing and using :
With this is , and with it is . The computer checked both against the original equation.
Find the solution of with . From Example 1, . At : , so . Then . A step-by-step numerical solution of the equation from to agrees.
EXERCISE 9.4
- Solve for .
- Solve for .
- Solve for , .
- Solve for .
- Which of these are homogeneous: (a) , (b) , (c) , (d) , (e) ?
- Solve with .
- Solve for .
- Solve with and find .
Answers
- , so and . Separate: . Integrate: , so and . (The computer checked .)
- , so , , and .
- The right side is , so . Separate: . Then , so and . (Checked for .)
- . Separate: . Integrate: , so and . (Checked for .)
- (a), (b), (c) are homogeneous: each is unchanged when , . (d) is not: the right side becomes (degree on top, degree below). (e) is not: the number breaks it.
- The right side is , so . Separate: . Integrate: , so . From : . The solution is .
- , so . Then , so . (Checked for .)
- From Example 2, . At : . So and . A step-by-step numerical solution agrees.
9.4.3 Linear differential equations
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:
The steps:
- Write the equation in the standard form (divide by the coefficient of if needed).
- Find . You do not need a constant here.
- Multiply the equation by , and integrate: .
- Divide by to get .
The computer checked the property for each integrating factor used below.
Solve . Here , so . Then . Integrate: . 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.
Solve for . Here , so . Then . Integrate: , so .
Solve . Divide by to reach the standard form: , so . Then , so and
A balance (in units) grows continuously at the rate per year, and also receives steady deposits of units per year. Then , or . Here and . So , and . Therefore . 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 .)
EXERCISE 9.5
- Solve .
- Solve for .
- Solve for .
- Solve .
- Solve with , and find .
- Solve , treating as the unknown.
- A capacitor charges according to , with . Find and .
- Solve for .
Answers
- . , so and .
- , so . , so and .
- , so . , so and . (Checked for .)
- . . Integrating by parts twice (Chapter 7), . So .
- . , so and . From : . Then . (A step-by-step numerical solution agrees.)
- . , so and . (Checked for .)
- . , so . With : . So and . As grows, approaches .
- Divide by : . , so . , so and .
Miscellaneous Examples
Find the curve through whose slope at every point is . Separate: . Integrate: , so . At : , so . Hence . Check: at this gives , which is .
A radioactive sample decays at a rate proportional to the amount present: . Its half-life is days. How much remains after days? 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.
Solve . Put : , so . Separate: . Use partial fractions: . Integrate and tidy up:
This is an implicit solution. The computer checked, at the points , and of the curve with , that its slope equals .
Solve for . Separate: . Integrate: . So .
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
This is linear with . Then , so . 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.
Solve . Write and separate: . Integrate: , so and . 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 .
Miscellaneous Exercise on Chapter 9
- State the order and degree (if defined) of (a) and (b) .
- Show that is a solution of . Find the particular solution with and .
- Solve . Is there a solution that your method misses?
- Solve .
- Solve .
- Solve with and find .
- A drink at C stands in a room at C. After minutes it is C. Assuming Newton's law of cooling, , find and the time it takes to reach C.
- Show that and are solutions of . Find the solution with and .
Answers
- (a) Order 2, degree 2: the highest derivative is , squared; the cosine only contains a lower derivative. (b) Order 3, degree not defined: the highest derivative is inside a sine, so the equation is not a polynomial in it.
- and . Then . From the conditions, and , so , . The solution is .
- Separate: . So , which gives . The method misses , which is also a solution. (Checked: and .)
- With : . Separate: . Integrate: . So , that is . (The computer checked the slope at four points of the curve .)
- . , and (by parts twice). So . (Checked for .)
- Divide by : , so . , so . From : . So and . (A step-by-step numerical solution agrees.)
- . At : , so . For : , so minutes. (A step-by-step numerical solution confirms both temperatures.)
- Both were checked by substitution (for : , , and ). From . Also , so and . The solution is , with and .
Summary
- 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.
Historical Note
Differential equations grew out of calculus. Their story begins in the late 17th century.
- 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, oscillate?) without finding a formula. This is now essential in physics, biology and engineering.