Book Read Free

The Calculus Diaries: How Math Can Help You Lose Weight, Win in Vegas, and Survive a Zombie Apocalypse

Page 24

by Jennifer Ouellette


  So we switch tactics and factor the numerator; x2 and 9 both happen to be perfect squares. (There’s a reason I chose this particular example.) The result is

  Aha! We learned in high school algebra that if you have the same expression in the numerator and denominator, they cancel each other out: In this case, we have (x + 3) in both the numerator and denominator. Cross them out, and that gives us a far simpler problem:

  Now we can revert back to the substitution method and plug in 3. This time we get: −3 − 3 = −6. So As Sean explains, “The limit of the function is well defined at x = −3, even though the function itself is not.”

  Finding the Slope of a Straight Line. In chapter 2 we went on a road trip from Los Angeles to Las Vegas, using highly idealized parameters to illustrate the fundamental concepts of what is essentially precalculus. For illustrative purposes, we’ll use another idealization here: that of a car accelerating to the speed limit, then traveling for a while at a constant speed, before braking suddenly to avoid an obstacle in the road. If we graphed our changing velocity as a function of time, the resulting curve would look like this:

  Yes, this shape technically is still a “curve,” despite its straight edges. Because we are dealing with straight lines, it is pretty easy to determine the slopes of S1, S2, and S3. We simply pick any two points at random on the line of interest, (a,b) and (c,d ), and plug those values into this handy formula: let’s pick the beginning and ending points (0,0) and (3,5). Plug those values into our formula and we get . It’s simple arithmetic to determine that S1 = 1. We can follow the same process for S3, using points (6,5) and (9,0). We get The fact that the slope is negative means we were slowing down.

  The slope of S2 is 0 because it is perfectly horizontal, or flat. Because we are traveling at a constant speed, there will be no difference between the values of those two points. (Perfectly vertical lines have no slope at all, and thus the slope is said to be “undefined.”)

  Recall that the steepness of the slope tells us the rate at which those values are changing (the derivative); the steeper the slope, whether trending upward or downward, the faster its value is changing. You can also see this trend in the above formula. If the numerator (top) is larger than the denominator (bottom), then the y’s are changing faster and therefore the line is getting steeper. If the denominator is larger, that means the x’s are changing faster and the line forms a shallow incline, because it is moving more quickly to left or right than it is moving up and down. So it should be clear that the above curve describes a car accelerating, then cruising at a constant speed before decelerating.

  Finding the Area. It is an equally simple matter to find the area under this particular curve by breaking it into common geometric shapes: a rectangle bounded by two triangles.

  We can find the area of the two triangles by halving the base and multiplying that number by the height, written algebraically as A = ½ bh. (A stands for area in this context, b stands for base, and h stands for height.) We find the area of the rectangle by multiplying the width times the height, written algebraically as A = wh, where w stands for width. Then it’s just a matter of adding those three areas together to find the total area under our simple curve.

  For both triangles, h = 5 and b = 3. So we can multiply 2.5 by 3 to get an area of 7.5 for each. The same goes for the rectangle in the center; we multiply 3 by 5 to get 15. Then we add it all together (15 + 7.5 + 7.5) and we end up with a total area of 30. Simple, right?

  THINGS GET MESSY

  Alas, the real world rarely fits neatly into these sorts of idealized models. In reality, for the above example, our speed and direction would be varying constantly, and we would not be dealing with simple straight lines, but with curves. This is the true value of calculus: It helps us solve more difficult problems dealing with change and motion using known derivatives and integrals for given functions. Once again, the derivative describes rates of change and corresponds to the slope of the tangent line to a particular point on the curve, while the integral corresponds to the area under a curve. It’s just a little trickier to find those values when dealing with irregular geometric shapes.

  In chapter 4, we experienced free fall while riding the Tower of Terror and learned that plotting our motion (change in position) as a function of time onto a graph produced a parabolic curve. This parabolic curve represents our position function (height, h, as a function of time, t): Let’s say we want to figure out our instantaneous velocity at a specific point. We need to find the slope of the tangent line for that point, which is equivalent to the derivative of our position function.

  So we know our position function, and we also know the value of the constant b, namely our starting height. The Tower of Terror is 199 feet high; we can round up to an even 200 feet to make our calculations easier. So b = 200. Finally, we know the value of a, since falling objects travel at −32 feet per second per second; half of that is −16. (The sign is negative because our height decreases as we fall.) Plug those values into our starting function and we get h(t) = -16t2 + 200. Now we’re ready to start differentiating.

  Derivatives: The Hard Way. I won’t lie to you: Things are about to get ugly. But it’s instructive to walk through every painful step just so we can fully appreciate how useful calculus can be when we see the simplified process in the next section. We begin by picking our point (h1,t1). We draw a straight line tangent to that point, and now we want to find the slope, which in turn will give us our instantaneous velocity. The problem is that our chosen tangent line only hits the curve on a single point. We can still pick another nearby point (h2,t2) and use our nifty formula above to calculate the difference between them, but this time it won’t be the exact slope, merely an approximation. The closer the two points are to each other, the better the approximation we will get. (Note that when both points (h1,t1) and (h2,t2) are the same, we end up with Having 0 as your denominator is taboo in math.)

  But we want to find the exact value for the slope of the tangent line. The good news is that we have another nifty for mula for just this sort of problem: where Δ stands for a tiny increment. The bad news is that we have no idea what the values are for h2, h1, or Δh.

  First things first: We need to find the value of h2. We can find h2 by plugging t2 into our starting function, like this: h(t2) = −16t22 + 200.

  We know that t2 = t1 + Δt, so we can substitute that expression for t2, like this: h(t2 ) = −16(t1 + Δt)2 + 200.

  We want to break this down as much as possible. Think of it as deconstructing our equation, i.e., reducing it to its individual components, the better to manipulate the pieces. For instance, we can rewrite the equation above as

  h(t2) = −16(t1 + Δt ) (t1 + Δt ) + 200.

  I’ll skip over the next few steps, which just involve further deconstruction according to the “grammatical rules” of math; suffice it to say, we end up with this:

  h(t2)= −16(t12+2t1Δt +(Δt)2)+200.

  Things are starting to get very confusing, and we’re not done yet. Next we need to find the value of h1. Happily, this is just our starting function: h1 = −16t12 +200.

  Now we can subtract h1 from h2 to get Δh:

  Δh= −16t12−32t1Δt−16(Δt)2+200−(−16t12+200)

  Once we’re done deconstructing that equation and canceling out all the extraneous stuff, we end up with a far more malleable version: Δh =−32t1Δt−16(Δt)2.

  Finally, we divide the whole mess by

  This can be simplified even further to give us

  Now our old friend the limit comes into play. We take the limit by setting Δt to .

  We’ve already solved for above, so we can plug that value in and rewrite this as (-32t1 - 16∆t) = -32t.

  When all is said and done, we end up with v(t) = −32t. Physics fans will recognize this as the stock formula for determining velocity: Velocity is equivalent to acceleration multiplied by time, written generically as v = at.

  Derivatives: The Easy Way. I hope you feel a few twinges of compassion for
the poor souls who went through the above process over and over again to find the derivatives of all the major functions, then compiled them into a master list for subsequent generations. It’s so much easier these days, because we know the derivative of t2 is 2t, for example, and even if we don’t, we can look it up.

  Let’s revisit our problem again using this simpler process. We know we have a starting function of h(t)=−16t2+200. We want to know our instantaneous velocity when t = 1 second. So we take a derivative to find the relevant velocity function: .

  Because we know the value of h, we can use substitution to rephrase the question as

  Next we break up those parenthetical expressions to get

  Now we move the −16 from the parentheses to get Where did that 0 come from? We took the derivative of 200, which is a constant, and one of the hard-and-fast rules in calculus is that the derivative of any constant is 0, because the derivative describes the rate of change and a constant doesn’t change.

  All we have left to do is find the derivative of t2. This is where we can skip all those in-between steps, because we know that the derivative of t2 is 2t. That means we can plug 2t into The equation, so we end up with = - 16(2t).

  We know that is equivalent to v(t). Multiply it out, and you end up with the same answer we got via our earlier belabored process: v(t) = −32t. Translated back into plain English: Our instantaneous velocity at our chosen point on the curve is −32 feet per second and because the velocity is equivalent to the slope of our tangent line, that slope is also −32t. (Our velocity is changing over time, so t must be included.)

  Taking an Integral. The integral is the reverse of the derivative, so now we will reverse the question. This time we know our velocity as a function of time: v = at. We want to determine our position at a given point in time, denoted as h(t). The integral corresponds to the area under a curve, which is fairly easy to calculate in this case, because our velocity function translates graphically into a straight line. So we just need to find the area under that line by dividing the base by 2 and multiplying that number by the triangle’s height .

  But let’s say our starting function gives us a bona fide curve with no straight lines or triangles to assist us; now things become complicated. We’ve already seen a method for approximating the area under a curve in chapter 1: the aptly named method of exhaustion pioneered by Eudoxus, whereby we fill in the curve with a series of rectangles for which it is a simple matter to determine the area. We calculate those individual areas, then add them all together to get an approximation of the area under the curve. The smaller the rectangles we use, the more of them it takes to fill the area under the curve, and the closer the approximation. We literally could do this forever, using infinitesimally small rectangles.

  Luckily for us, there is another way: taking an integral. It’s a bit harder than finding the area of a triangle, but it simplifies matters greatly when trying to determine the area under a curve, so it’s worth walking through the process for v = at. (I will spare you the full derivation. You’re welcome.)

  We can write out our question mathematically like this: h(t)=∫v(t)dt. This just says that we are integrating velocity (v) over time (t), adding all those instantaneous velocities together to determine our position (h).

  Thanks to our handy velocity function, we know that v=at, so we can replace v(t) with at to get h(t ) = ∫at dt .

  Another handy rule of calculus is that whenever you integrate a constant multiplied by a function, like at, you can bring that constant outside the integral symbol, like this:

  h(t)=a∫tdt.

  Now we can get rid of both our integral symbol and the dt by looking up the integral for t, which turns out to be We’ve picked up a constant because of another hard-and-fast rule of calculus: Whenever you take an indefinite integral—i.e., when no beginning and ending point is specified—your answer is going to have a constant (hence the waggish habit of physicists to jokingly add “plus a constant” to random observations). It makes sense if you think about it for a moment: The integral corresponds to the area under a curve, which by definition describes a given range. Even if we don’t know what that range is, we still need a placeholder in our equation: c represents that constant of unknown value.

  We plug all of that into our equation to get this:

  Look familiar? It’s our best buddy, the parabola! So now we know that if our velocity increases like a straight line (v=at), our position increases like a parabola (also written as And we can prove it mathematically.

  Fun with Functions. But the point is, we’ve found our position function in just a few easy steps: Now we can determine our position (h) for any value of t.

  Remember that in our free-fall scenario, b = 200 and a = −32. For instance, what is our position (h) when t = 1? It’s 184 feet. When t = 2, h = 136 feet, when t=3,h = 56 feet, and so on. In fact, we can devise an algebraic equation from our position function to determine when h will equal 0 and we will hit the ground if we fell from atop the Tower of Terror. Since we’re solving for t, it looks like this:

  Plug those numbers into our formula like this: . The minus signs cancel out and we get

  Now it’s just a matter of factoring down until we get . Our handy calculator tells us the square root of 2, we divide 5 by that, and the answer is t = 3.5. So we will hit the ground and go splat 3.5 seconds after we start falling.

  APPENDIX 2

  Calculus of the Living Dead

  Time to nut up or shut up.

  —TALLAHASSEE, Zombieland

  A particularly virulent form of human-adapted mad cow disease sweeps across the United States in the 2009 hit film, Zombieland, transforming most of the nation’s populace into ravenous zombies. The film follows a ragtag group of unlikely survivors on a road trip in hopes of finding someplace yet untouched by the disease, ending with a pitched battle against zombie hordes in an abandoned amusement park. Zombieland beat out the Dawn of the Dead remake as the top-grossing zombie film to date. You just know there’s going to be a sequel.

  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 t
hat 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.

 

‹ Prev