The Calculus Diaries - Jennifer Ouellette [110]
Let’s say that in this much-anticipated sequel, Columbus, Wichita, Little Rock, and the Twinkie-craving Tallahassee manage to find an uninfected haven and enjoy a brief respite from battling the Undead. Then the first zombies appear, and the refugees know their days of peace are numbered. If they knew the rate of infection—that is, how quickly the zombie population is growing—they could predict when those numbers would become overwhelming and could plan to evacuate before the situation grew dire. With luck, they could just keep moving, always staying one step ahead of the zombie plague. All they need is a bit of calculus.
To solve this problem, we must delve into the murky realm of differential equations, which sound scary but are really just equations that contain a derivative. This is a bit more convoluted than the problems in appendix 1, but as I discovered in my own odyssey, at some point you’ve got to nut up or shut up and face the monsters head on if you’re serious about learning calculus. You never know when this sort of thing might help you survive a zombie apocalypse.
Why do we need a differential equation? Remember that exponential growth (or decay) in populations—how fast something grows (or declines)—depends on the size of the population itself. (A perfect exponential model would require infinite resources, a condition that rarely exists, but for illustrative purposes, it will suffice.) Solving the differential equation will give us the key to determining how many zombies there will be at any time. We’ll use a textbook sample problem, cribbed from Kelley: = ky.
In the above equation, y represents the population of zombies, x represents the time that has passed, and the derivative is the rate of change in the number of zombies. The constant (k) describes how quickly the zombies multiply.
The first step toward solving a differential equation usually involves shifting different variables to opposite sides of the equation—we’re essentially rephrasing the question. In this case, we want to isolate y on the left side of the equation. A mathematician will tell you that isn’t “really” a fraction, but standard rules of algebra still apply. To move y from left to right, we must divide both sides of the equation by y: do this and you get = k.
We want y all by itself, so now we have to move dx to the right side of the equation. This is easily accomplished by multiplying both sides of the equation by dx to get = kdx.
Since we want to add up the number of zombies over time, we now integrate both sides of the equation to find the integral. We would write this mathematically as Fortunately, k is a constant, and we learned a neat trick for determining the integral of a constant in chapter 2. Just as the integral of 5 is 5x, the integral of k is kx. Meanwhile, on the left-hand side, we have the integral of with respect to y, which just happens to be the natural logarithm function ln(y). We would end up with ln(y)=kx+c.
Because we used an indefinite integral, we’ve picked up a constant (c), as well as that pesky natural log function (ln). Fortunately, we can cancel out the natural log function by using the natural exponential function, ex, described in appendix 1. This is the inverse function to a natural log, which means it undoes what the log has done. (Inverse functions are tools to eliminate something you don’t want in an equation—in this case, the natural log function.) We can rewrite our equation like this: eln(y) = ekx+ c. All we’ve done is change each side of the prior equation so that it’s expressed as a power of e. Because ex and ln x cancel each other out, we end up with y=ekx+c.
This is a solution of sorts, but we can simplify it even