## Derivatives

Okay, so we’ve got one of our real-valued functions defined on some domain : . Let’s start analyzing it!

We start with some point , and we can crank out the value the function takes at that point: . What we want to understand is how the value of the function changes as we change . More specifically, we want to understand how it changes as we vary our input *continuously*. Of course, “continuous” means we’re just moving around a little bit in some neighborhood of the point we started with, and neighborhoods in basically come down to open intervals. So let’s just assume that our domain is some open interval containing the point we’re looking at. If it contains an open interval already we can just restrict it, and if it doesn’t contain a neighborhood of our point then we can’t vary the input continuously, so we aren’t interested in that case.

The simplest sort of function is just a constant . In this case, the value *doesn’t* change. That’s what it means to be constant! A little more complex is a linear function for real numbers and . Then if we move our point over a bit by adding an amount to it our function takes the value

That is, adding to our input adds the constant multiple to our output. It’s easy to understand how this sort of function changes as we change the input. We can characterize this behavior by calling the change in the output , and considering the constant .

Now, let’s consider an arbitrary continuous function. We can still tweak our input by adding to it, and now we get a new output . Subtracting off we get the change in the output: . This won’t in general be a constant like it was for the linear functions above: if we pick different values for we may get different values for . But we can still ask how the changes in the input and output are related by calculating the “difference quotient” . This gives us a function of the amount by which we changed our input.

Let’s look back at the difference quotient for a linear function: . But it’s not really the constant function ! There’s a hole in the function at , which we can patch by taking the limit . Since the difference quotient is everywhere around the hole, the limit exists and equals .

There’s also a hole at in all our difference quotient functions, and we’d love to patch them up by taking a limit just like we did above. But can we always do this? Look at the function near . For positive inputs the function just gives the input back again, for negative inputs it gives back the negative of the input, and at zero it gives back zero again. So let’s look at . When is positive this is , where is negative this is , and of course there’s a hole at . But now we see that there’s no limit as approaches zero, since the image of a sequence approaching from the left converges to , while the image of one approaching from the right converges to . Since they don’t agree, we can’t unambiguously patch the hole.

On the other hand, maybe we *can* patch the hole by taking a limit. If we can, then we say that is “differentiable” at , and the limit of the difference quotient is called the “derivative” of at . We write this as

Another notation for the derivative that shows up is . This hints at the fact that as we change the point we started with we may get different values for the derivative. That is, the derivative is a new function! In analogy with continuity, we say that a function is differentiable on a region if it is differentiable — if the difference quotient has a limit — for each point . The linear functions we considered above are differentiable everywhere in , with for all . On the other hand, the absolute value function is continuous everywhere, but differentiable only where . In this case, the derivative is the constant when is positive and the constant when is negative.

It’s worth pointing out that if a function is differentiable at a point then it must be continuous there. Indeed, if is to have any chance at converging, we must have , and this just asserts that the limit of at is its value there. So differentiability implies continuity, but continuity doesn’t imply differentiability, as we saw from the absolute value above.