The Calculus is made up of a few basic principles that anyone can understand. If looked at in the right way, it’s easy to apply these principles to the world around you and to see how the real world works in their terms. Of the two main ideas of The Calculus — the derivative and the integral — today we’ll focus on the derivative.
You can enjoy this article by itself, but it is also worth looking back at the previous installment in this series. We went over the history of The Calculus and saw how it arose from two paradoxes put forth by a 4th century philosopher named Zeno of Elea. These paradoxes lead to the derivative/integral ideas that revolutionized mankind’s understanding of motion.
The derivative is what is necessary to solve Zeno’s “The Arrow” paradox. In this paradox, Zeno asks how an arrow flying through the air can have a velocity at an instant in time. For at each instant, the arrow is still. Before we begin with our process of discovering the answer — a process that took civilization over two thousand years to figure out — let us refresh our static memory with our previous description of the derivative:
The Derivative – The derivative is a technique that will allow us to calculate the velocity of the arrow in “The Arrow” paradox. We will do this by looking at positions of the arrow through incrementally smaller amounts of time, such that the precise velocity will be known when the time between measurements is infinitely small.
Is It Really This Simple?
I think you will find that it is, and even wonder why it took civilization so long to figure it out. Zeno wants the velocity of the arrow. In order to calculate velocity we need two things – time and position. Velocity is just distance divided by time, such as miles per hour or feet per second. If we measure the distance traveled by the arrow and divide it by the time it took to move the distance, that is by definition the velocity of the arrow.
Let us assume that the arrow is moving at a constant velocity (this will be important later). Then let us place markers every mile along the path of the arrow. With the addition of a watch on our wrist, we have everything in place to measure the arrow’s velocity. We watch the arrow fly through the air and mark the position of the arrow when our watch reads 1 minute. Let us suppose this position corresponds to the 1 mile marker. We then mark the position of the arrow when our watch reads 2 minutes, which happens to be at the 2 mile marker. Using basic math, we can find the average velocity of our arrow. To keep things simple, we’ll use the measurement unit of miles per minute for velocity, allowing us to say that our arrow was traveling with an average velocity of 1 mile per minute.
The important thing to understand is that we take a final position, which is p(2), subtract the initial position, p(1), and divide the difference by the time it took to cover the distance. This is the fundamental understanding of motion from a mathematical point of view. That the arrow is at one point at one time, and another point at another time.
Now that we have an average velocity between two points in time, we can begin to refine our process. Zeno wants to know the velocity at an instant in time. Not between two points in time. Well, we know the average velocity between the 1 minute and two minute time points. What’s to stop us from shrinking the difference? Let us find the velocity of the arrow between the 1 minute and 1.1 minute time points. These two points in time are much closer together, and would give us a better idea of what the velocity was at exactly 1 minute.
To do this, let us imagine that our mile markers are subdivided into more precise markers, such that there is a marker every 10th of a mile. Now we treat the problem the same way we did before.
Because the arrow is moving at a constant velocity, the answer will always be the same. Let us ignore this for a moment, and keep pushing this idea of subdividing the mile markers to finer measurements so that we can make the time interval between measurements smaller and smaller, getting us ever closer to Zeno’s instant in time.
Let’s take a look at our average velocity just before the 1 minute time point and see what we get.
As we make the time between measurements smaller and smaller, the velocity of the arrow doesn’t change. We could take the time between measurements even smaller…in fact we could take them infinitely smaller until the difference is zero, and still get the same velocity. It’s safe to say that the instantaneous velocity of the arrow at the instant in time of 1 minute is 1 mile per minute. Technically, we have solved this paradox. But because the arrow was moving at a constant velocity, the answer is rather obvious. But that’s a good thing; the idea with this exercise was to get you familiar with the concept of the limit.
Taking the Limit
A few of the commenters in our previous article pointed out that the idea of the limit is an important ingredient to The Calculus. I don’t disagree. In our above example, the process of taking finer and finer time measurements is referred to as a “limiting” process. In a real calculus problem, we would limit this value all the way to zero. My idea is to keep things as simple as possible in these articles, so we will not be covering the limit in detail. But it is important to be aware of it. At this point, all you need to understand is that as we take increasingly finer measurements, we converge on a single number. This is the main thought process behind the derivative.
Now, because the arrow was moving at a constant velocity, it made our example almost too simple. To truly understand the derivative and its power, we’re going to have to bump up the complication just a little bit. Let us look at the arrow once again, but this time with the arrow accelerating.
If one were to graph the first example with the arrow moving at a constant velocity, they would get a linear function of p(t) = t. What this means is that the distance traveled will always be equal to the time. So at any point along the path of the arrow, we can say the elapsed time is equal to the distance traveled. So at the 1 mile marker, we have an elapsed time of 1 minute, 2 minutes to the 2 mile marker, 3 minutes to the 3rd and so forth.
Let us change that function to p(t) = t2. This means after an elapsed time of 1 minute we are at the one mile marker, after 2 minutes we’re at the 4 mile marker, after 3 minutes we’re at the 9 mile marker…you get the point. We’re accelerating. We will apply the same technique of taking the arrow’s position at points in time and calculating its average velocity. Below, we see the average velocity after 1 minute is 3 miles per minute.
And just as before, we will begin to calculate the average velocity through smaller and smaller time intervals trending to the 1 minute time point.
Just as before, we seem to be converging on a single number: 2. And just like before, we can make the time interval between measurements infinitely small…as close as you’d like to 0.0, and we would end up with the value of 2. We can say that the instantaneous velocity of the arrow at a time of 1 minute is 2 miles per minute. We have now truly solved Zeno’s “The Arrow” paradox. The arrow is indeed moving at a known velocity at an instant in time, for we have calculated it. Can you believe it took two thousand years to figure that out!
Making the Derivative
We can all agree that finding the instantaneous velocity through increasingly smaller time intervals is a simple process. We can also agree that it’s a laborious and mundane process. Lest you get disappointed, the derivative has not surfaced just yet. You now know how the derivative works, but you have yet to see its full power. To see this, we will need to perform the above process for other times.
We have proven that the instantaneous velocity of the arrow at the time point of 1 minute is 2 miles per minute. If we wanted, we could go through the tedious process of working out its velocity at other times. But not to worry, I have already done that for you. Below are the instantaneous velocities at time points 0.7, 1.4, 2 and 3 minutes.
Using the same process as before, we see that we converge on a single value as we take finer and finer measurements. At time 0.7, the average velocity gets closer and closer to the value of 1.4 miles per minute. For time 1.4, the average velocity is clearly 2.8 miles per minute. For the 2 minute mark, it’s 4 miles per minute and for a time of 3 minutes, the arrow is moving at 6 miles per minute. That’s a fast arrow!
The pattern is obvious. The instantaneous velocity is twice the value of our initial time of measurement. We can say that if p(t) = t2, then v(t) = 2t. We can abstract the derivative by saying the derivative of the function f(x) = x2 is 2x. We can also make a generalized definition of the derivative using Zeno’s arrow example:
You should be able to understand this by now. The little pyramid symbol is known as a delta, and just means “a change in.” This equation gives us the average velocity of the arrow. As the delta t becomes smaller, the two positions of the arrow (in the numerator) grow closer together, eventually giving us the instantaneous velocity at time t. The concept of making delta t smaller is what makes the equation a derivative. If you can grasp this concept, give yourself a pat on the back. This is what a student would see in a calc-101 class. Look familiar? And you now know this equation, not by brute force memorization from note cards, or plugging in variables like some data entry clerk, but by a fundamental understanding of how it works. That’s why we’re hackers. That’s how we roll.
There is a lot more to the derivative than what I have presented here, but I hope this article has given you a basic understanding of its underlying concepts. In the next article, we will follow this same process with the integral, which is like an inverted derivative. In fact, you will often hear the integral referred to as an anti-derivative.
If you feel you’ve mastered the concept of the derivative (within the context of this article), I challenge you to prove it in a language your fellow hackers can understand – code. Consider a machine that measures the volume of a liquid being added to a closed container. It does this by recording the increase in pressure inside the container as the liquid is added, and using Boyle’s Law to calculate the amount. There is a problem, however. Sometimes the liquid runs dry, resulting in air getting into the closed container. The engineer needs to figure out a way to detect this. Because there are thousands of machines in the field, she has to use software to solve the issue.
She figures out that when air gets added to the chamber, the rate of change in the pressure increase is greater than the rate of change when the liquid is added. If she can monitor the rate of change of the pressure increase, she can see the difference between liquid and air, and sound the alarm.
Let us see your pseudo code on how you would solve this problem. Try to use the concept of the derivative to monitor the change in pressure.
All images are from The Teaching Company course, Lecture 2.