Since I am finally TAing for a calculus class it seemed like a good time to write about this topic. Unfortunately I still can’t make nice pictures and a good visualization is extremely useful in intuitively understanding calculus.
Before taking calculus students are taught the equations which represent lines on a graph, i.e. . The letter “m” represents the important information, the slope of the line. The slope is just how quickly the line rises compared to how far across it goes. A line with slope 2, would go up 2 units for every 1 unit it moved to the right. A line with slope would move up 5 units for every 13 units it moves to the right. Hence the familiar idea of “rise over run.”
Higher slopes indicate steeper lines. This is because the line is rising much faster than it is moving to the right. Negative slope just means going to the down and to the right. A line with slope -5 will move down 5 units and to the right one unit.
After learning how to graph, students will typically learn a bunch of other seemingly random stuff, but slope is actually the most important idea. One of the random things is the mysterious function called the “difference quotient.” The difference quotient involves a starting function, f(x), and doing what seems like an arbitrary mash up of things.
Given a function f(x), the difference quotient of f(x) is the function, . It looks like gibberish to the untrained eye but it is secretly the slope, and here’s why.
First, means to replace x with “x+h” in the function f(x). For example, if the function was then . Replacing the input with “x+h” is supposed to represent plugging in slightly more than x into the function. More precisely, plugging in “h more than x”.
For example if then and . The idea here is that adding just a little more to 1, namely h, affects the function much differently than simply adding h to the end result, 6. In fact we can see here that by adding h into the input of the function, we get in general . So again, adding h into the input, can have a drastic affect on the output.
Now that we understand we can look closely at . Again, starting with an example makes it easier to see.
Let and lets use an actual x and an actual h. How about, and . Then we get:
and stop there. We are just subtracting two outputs, aka two y-values. This should remind you of calculating the slope between two points, . Here the first point is given, and the second point comes from adding a little bit more to the first point, (h more).
Right now we have and to get a slope equation we need to divide by the two inputs subtracted, just like with the slope between two points we subtract the two x-values in the denominator. Well what are the two inputs here? “x+h” and “x”. Therefore, the slope between the two points and is given by
This is the difference quotient! So this mysterious equation was secretly the slope equation written in a special way all along. It will become clear later why we write it in this way, but for now just know that it is the slope between the points, and .
Students don’t typically dissect this formula in a good way so they just forget about it. Then much later they learn about the idea of limits, which really should be shown right after slope. Limits can take a lot of rigorous explaining which I won’t go through. Instead I will talk about them in a very informal way.
Think of a function, represented by a graph, as “moving” as you plug in values. As you plug in what is happening to the graph? For something simple like a line, you can easily visualize as the input x moves left and right, that the line follows what it should. The idea of seeing what happens to the function as the input x moves around is what limits are all about.
We represent this with the following notation, . This means, “the limit of f(x) as x approaches c”. We are looking at what the function does, as the inputs approach some value c. Note that we don’t care what actually happens when plugging c into f(x), but rather we care about what the function is doing as the input gets close to the value c. The typical example is a piece-wise function, i.e. a function that consists of putting other functions together. We can have functions approach some limit, L, as the inputs approach something, c, but the actual value of the function at c, f(c), is not equal to L. This can be hard to grasp and leads to the idea of continuity, but that is a topic for another time. So instead of worrying about that, just think of limits of functions as what happens to outputs as the input goes toward a certain number.
So, they teach you this thing called the difference quotient, and then they later teach you this idea of limits. The logical step is to put the two topics together in a smart way.
What happens to when we move h around? Consider x as just some number, and we are not moving it around. It is immovable. Think of x as a fixed point and we add the value h to it. Well, we already know that the difference quotient will give us the slope between the two points and . What happens when we make h get smaller and smaller? This means we are adding less and less to the fixed point x. This corresponds to the slope of two points, where the second point is getting closer to the stationary one. Now imagine we keep making h smaller and smaller, in fact we want to make it as small as possible. We can’t make it be exactly zero, or else we would be dividing by zero. However, we can take the limit of the function as h goes toward zero. This would be written as:
When h goes to zero, we can think of the second point, as actually right on top of the point . So if we could actually take this limit to when h becomes zero, we would get the slope of two points which are actually the same point. Thus we magically have the slope of a line going through a single point instead of two points! Note I said “if we could actually take this limit.” This is because the limit does not have to exist in the first place, but when it does we have this neat idea of a slope of a line going through a single point.
This slope is tied to the original function we started with. So it’s not exactly just a slope of a line going through some random point, but instead is the slope of a line related to f(x). We have a special way of saying what this thing is. It is the slope of the line tangent to the graph, at the point x. A tangent line is a line that barely touches the graph once (a topic for another day).
In practice what happens is that you are given some function. Then you get the difference quotient and if it is a “good” function you will be able to manipulate it in a way that gets rid of the h in the denominator. Assuming you do mathematically correct manipulations (multiply by 1 or add zero) the end result will have the same limit that the non manipulated equation had. Then because it no longer has the risk of zero being the denominator, you will be able to plug in directly to find the exact limit as h approaches zero.
After doing this entire process we finally have what is known as the derivative of a function!