A rate that depends on the quantity
An equation that contains a derivative is a differential equation, and a solution of one is a function. says that y changes at a rate proportional to y itself. With k > 0, the larger y is, the faster it grows: that is growth. With k < 0, y shrinks, and shrinks more slowly as it gets smaller: that is decay.
For , the gradient at height 1 is 0.5, at height 2 it is 1, and at height 3 it is 1.5. The gradient depends only on the height, so a solution steepens as it climbs.
Short segments at whole-number points, each drawn at the gradient : 0.5 along the line y = 1, 1 along y = 2, 1.5 along y = 3, and flat along the x-axis. The gold curve passes through (0, 1) and runs along every segment it meets; at (2, e) its gradient is .
Separate, then integrate
Treat dy and dx as the two sides of a rate, and move every y to the side with dy and every x to the side with dx. Dividing by y gives .
Now each side is in one letter, so each can be integrated in its own letter: , which gives ln|y| = kx + c.
Each integral has its own constant, but two constants on opposite sides combine into one. Write a single c, on the side with x.
Undo the log
Take e to the power of both sides: . A power of a sum splits into a product, so . The number is a constant like any other, so call it A, and drop the absolute value by letting A be negative as well as positive: .
A = 0 gives y = 0, which also solves , since both sides are 0. Dividing by y at the start had quietly set that solution aside.
Check: differentiates to , which is k times y.
A starting value fixes A
The equation alone has a whole family of solutions, one for each A. A known value, called an initial condition, picks one of them. Solve with y = 6 when x = 0. Separating and integrating gives . At x = 0, , so 6 = A, and the solution is .
Check it at a point. At x = 0.5, . A difference quotient across a tiny step gives the derivative there as 32.62, which is 2 × 16.31, as the equation says it must be.
In the same way, P = 100 at t = 0 with gives . It doubles each unit of time, and reaches 800 at t = 3.
Other separable equations
Solve with y = 1 when x = 0. Separating gives , and integrating gives . At x = 0, ln 1 = 0, so c = 0, and the solution is . At x = 1 it is , and the gradient there, measured by a difference quotient, is also 1.649, which is x times y with x = 1.
Solve with y = 3 when x = 0. Separating gives y dy = x dx, and integrating gives . At x = 0, . Multiplying by 2, , and since y is positive at the start, . At x = 4, y = 5, and the equation asks for a gradient of there, which the curve has.
Use the condition after integrating, not before: the constant only exists once both sides have been integrated.
The slope field of : flat along the y-axis, gradient 1 at (1, 1), 2 at (1, 2) and at (2, 1), and −1 at (−1, 1). The gold curve is the solution through (0, 1); the dashed curve is the one through (0, 2). Both run along the segments.
Decay
With a negative k the same steps give decay. with y = 8 at x = 0 gives . Each units of x halves y, whatever y is: at x = 2, , and the gradient there is .
The usual mistakes
Integrating without separating. does not integrate to y = kx + c: that solves , a constant rate, and ignores the y on the right.
Adding the constant after exponentiating. From ln y = kx + c the next line is , not .
Leaving A at 1. With y = 6 at x = 0, the solution of is , not .
Swapping the rate and the starting value. with y = 6 at x = 0 is , not : the rate goes in the exponent and the starting value in front.
A water butt emptying
In the application below, the depth of water falls at a rate proportional to its square root. Separating and integrating gives as a straight line in time, and two readings fix its two constants.
Worked example: A Water Butt Emptying Through Its Tap: A Sentence About a Rate Turned Into an Equation and Solved
Question A water butt with straight sides empties through a tap at its foot. Torricelli's law says that the depth of water falls at a rate proportional to the square root of the depth. The depth is 64 centimeters when the tap is opened, and 49 centimeters five minutes later. (a) Find the depth after 20 minutes. (b) Find when the butt is empty.
1.Let h be the depth in centimeters and n the number of minutes since the tap was opened. The depth falls at a rate proportional to √h, so dhdn = −k√h with k > 0, the minus sign because the depth is falling.
The depth falls at a rate proportional to √h, so dhdn = −k√h, the minus sign because it falls. 2.Separate the variables and integrate: ∫ h−12dh = −k∫ dn, so 2√h = −kn + C, which is tidier written as √h = A − k2n.
Separating gives 2√h = −kn + C, so √h is a straight line in n: that is the right thing to plot. 3.At n = 0 the depth is 64, so √64 = 8 = A. At n = 5 the depth is 49, so 7 = 8 − 5k2, giving k2 = 0.2. Hence √h = 8 − 0.2n, that is h = (8 − 0.2n)2.
At n = 0, √h = 8; at n = 5, √h = 7. So the line is √h = 8 − 0.2n and h = (8 − 0.2n)2. 4.(a) At n = 20, √h = 8 − 4 = 4, so the depth is h = 42 = 16 centimeters.
(a) At n = 20, √h = 8 − 4 = 4, so the depth is 42 = 16 centimeters. 5.(b) The butt is empty when h = 0, that is when 8 − 0.2n = 0, so n = 40 minutes. Check: the rule gives (8 − 1)2 = 49 at n = 5, as it must, and the emptying slows down as it should, losing 15 centimeters in the first five minutes and only 1 centimeter in the last five.
(b) The butt is empty when √h = 0, that is 40 minutes after the tap was opened.
Answer: (a) the depth is 16 centimeters; (b) the butt is empty 40 minutes after the tap was opened
Common mistakes
- Reading the sentence as ordinary decay, dhdn = −kh, and solving it as h = 64e−kn. The rate is proportional to the square root of the depth, not to the depth, and the difference is not a detail: an exponential never reaches zero, so that model says the butt never empties, while the real one is dry after 40 minutes.
- Reading √h = 8 − 0.2n at n = 20 as h = 4. The 4 is the square root of the depth, so the depth is 42 = 16 centimeters. Squaring is the last step and it is easy to leave out when the number that comes out looks like an answer.