PROFESSOR: Section 3.2-- The Derivative as a Function. All of these notes are from OpenStax Calculus Volume 1. At the bottom of your page, there is a link that you can go to. Let's see. The last one is right there. Go to that website and check this book out. It is a pretty awesome book. And these notes are and these videos are meant to go alongside to aid you as you go through that. So let's jump into this. The derivative function-- so let f be a function. Then the derivative function, denoted by f prime and often f prime of x, is the function whose domain consists of the values of x such that this limit exists, f of x equals the limit as h approaches 0 of f of x plus h minus f of x over h. Now, a function is said to be differentiable at a, a point a, if f prime exists, if that limit does exist at that point. And the function is said to be differentiable on a set if it-- if the derivative exists on that set for every value in that range. So let's go ahead. And in the previous section-- let's go ahead and say this-- we talked about these in terms of f prime of 2, f prime of 4. Well, in this case, we are going to come out with a function that tells us the derivative at every point. That is the idea. So we're going to do a little more generically than f prime of a or something like that. So find the derivative of f of x equals square root of x. Well, we are going to begin with our definition. f prime of x equals the limit as h approaches 0 of f of x plus h minus f of x divided by h. Well, evaluating, that is the limit as h goes to 0 of the square root of x plus h minus the square root of x over h. Now, we need to rationalize this so we can get rid of those square roots there. That is our trick we keep pulling. So square root of x plus h plus the square root of x over the square root of x plus h plus the square root of x, multiplying by a clever 1-- that will be the limit as h approaches 0 of x plus h-- the outer and inner terms cancel-- minus x over h times square root of x plus h plus the square root of x. Several things cancel here. Our x terms cancel. And then our h divides out. So let's bring that up here. So this is the limit as h approaches 0 of 1 over square root of x plus h minus the square root of x. Now, as h approaches 0, this is the function 1 over 2 square root x. Therefore, f prime of x equals 1 over 2 square root of x. Now, at some point, we discussed finding the derivative at the point-- I believe it was 4. And if you evaluate this at 4, you get 1/4, which is the slope we had gotten previously. So this is a function that will give you the value of the derivative, the slope of the tangent line, at any point as long as that function exists. So at 0, it does not exist. So we have to pull some limit trickery there to make that happen. Our next function, x squared minus 2x-- so to find the derivative there, f of x, f prime of x, is the limit as h approaches 0. And you might recognize some of these functions from before because we did these before. We just-- we're doing it more generically now. So plugging in x plus h, x plus h squared minus 2x plus h minus f of x-- that is x squared minus 2x-- I really should probably have that in brackets-- divided by h. Well, multiplying some things out, x squared plus 2hx plus h squared minus 2x minus 2h minus x squared plus 2x all over h-- so taking that limit now, several terms should cancel out. In fact, every time we'd find a derivative function here, the slope function, everything that is on-- a part of f of x should cancel out. So in this case, the x squared cancels out. The 2x cancels out. And if you notice, an h factors out. I'm going to go ahead and factor an h out. That is 2x plus h minus 2 all over h. The h's then cancel out. And as we take the limit as h goes to 0, we get-- well, I'll just go ahead and mark these out for posterity's sake. If we scratch these out, h goes to 0. This is 2x minus 2. So that is f prime of x is 2x minus 2. And if you look ahead a couple of videos and a couple of sections, there are some rules. So you might be able to see a pattern that's happening here. Let's move on to example 3, the derivative of x squared. This is going to be very similar to that last one. Let's throw in our limit. And it's f of x plus h. So this will be x plus h squared minus f of x over h. Multiplying that out, we get an x squared, which will cancel out, plus 2hx plus h squared minus x squared over h. Well, if we cancel out our x squared terms and divide out the h, we have the limit h goes to 0 of 2x plus h. And that limit is 2x. Therefore, f prime of x is 2x and we can use that to find the slope of our tangent line at any given function. So the next thing we want to look at here is the relationship between the two. So I've said over and over again that f prime of x is a slope function. So what I'm going to look at here-- I'm going to actually use a table to sketch the graph of f prime of x-- x and f prime of x. So remember, that is the slope. So the easiest thing to start with is, where is the slope 0? Well, I have a horizontal tangent line right here. So at negative 2, an x-value of negative 2, my function is 0. Also, I have another slope there at 3. So at the point 3, my function is 0. So let's go ahead and plot these points over here. So negative 2, 0 and 3, 0-- I have the two solutions for my function. Now, the next thing I really want to just notice, and I don't think I need the table for this, is what's happening to my function between those places. With this right here, this region right here-- in between there, the function is increasing. That means my derivative-- so that means my derivative is positive. So my derivative is positive between those two. Now, it's decreasing here and here to the left of negative 2 and to the right of 3. It's decreasing there. So it's going to look something like that. And that's not a real smooth graph. But that is a quadratic, if you notice. And that is no coincidence. In fact-- well, I don't know the exact function. So I can't tell you what the equation of that is. But I began with a cubic function. My derivative is a quadratic-- not a coincidence. Let's move on to our first proof. I believe this is the first proof that we've done so far. Theorem-- differentiability implies continuity. So let's begin with letting f of x be a function with a in its domain. If f of x is differentiable at a, then f of x is continuous at a. So what we want to show here is that the limit as x approaches a of f of x equals a-- that we can simply evaluate to find the limit. Now, we want to appeal this fact at some point. We know that f is differentiable. So that means f prime of a exists. And f prime of a is this limit. And that limit exists. That is important. So first, let's go ahead and consider the limit as x approaches a of f of x. Now, we're going to pull some algebra in here. Let's go ahead and take the limit. So x approaches a-- that is the same as if I did f of x minus f of a plus f of a. Now, certainly, you'll agree with that. I've added and subtracted the same thing. Let's try another clever one here. This is the same thing as f of x minus f of a divided by x minus a. As long as I multiply by x minus a and preserve the rest of that, multiplying and dividing by x minus a-- well, now, I was told that this limit exists. So that is-- that's very important right here. This limit here exists. So because all the rest of these limits have to exist because the function's differentiable, I can break this up into limit as x approaches a of f of x minus f of a over x minus a times the limit as x approaches a of x minus a plus the limit as x approaches a of f of a. Now, the first bit is-- it's differentiable so that we know this is f prime of a. We're just making a substitution there. The second-- that is a linear function. I can just evaluate that, which is then just 0. Now, the last bit there, the limit as x approaches a-- that is a continuous-- well, it's actually a point. It's a constant. So the limit of that is just f of a from our limit laws. And this is f of a. So that means-- let's go ahead and say this. Therefore, since the limit as x approaches a of f of x equals f of a, we conclude the f, function f, is continuous at x equals a, which is what we wanted to show. We began by saying it was differentiable. And we have now arrived at the conclusion it is differentiable. And the conclusion is that it is continuous at that point. Now, the question might come up, does being continuous imply that it's differentiable? If being differentiable implies continuous, does it work both ways? And the answer is no. The answer is no. And there are a couple of different places and ways this can go wrong. The first is something we call a corner or a cusp. So I'm going to look at a couple of different things here. So a corner is the function-- a good example of that is this function right here, the absolute value of x. At the absolute value of x, if you take the limit going from the left and the right, from the left, the slope there is negative x-- or negative 1, actually, specifically. The slope on this side is negative 1. The slope on this side is positive 1. We have a very quick change here from negative to positive right here. And so that limit is undefined. So the limit is undefined for that function. That's called a corner. We have a very quick change from positive to negative. Now, I don't have a function for this one. But a cusp is a particular kind of corner where we have something like this-- kind of looks like a seagull. In this case, we have-- again, coming from the left, we have negative slopes. From the right, we have positive slopes. And so therefore, at this point right here, we go from negative to positive very quickly. So it's undefined because that's one type-- is a very quick change in the value. Now, for the second one, g of x is the cube root of x. The cube root of x-- I need to draw this very well-- does something like this. If you notice, we have negative slopes on the left-- or positive slopes on the left, positive slopes of the right. However, at this point, it's-- actually goes vertical. There is a vertical tangent line. And that's the other way that we can have something that's not differentiable because that's an undefined slope. Now, these are some simple cases. There's actually a function that's used in the book. h of x equals x times sine of 1 over x. And that's when x is not 0 and 0 when x is 0. And this has continuously changing slopes, positive or negative, positive, negative. So these are simple examples. But look for each of these things. Look for vertical tangent lines and corners and cusps. And check out the book. Example 5-- a toy company wants to design a track for a toy car-- starts out along a parabolic curve. And then it smooths out into a straight line. The function that describes the track is to have this form right here, this piecewise function, where x and f of x are in inches. For the graph to move smoothly along the curve, the function must be both continuous and differentiable at negative 10. Find the values of b and c that make f of x both continuous and differentiable. So let's begin by exploring what it means to be continuous. To be continuous means the limit from the left-- so the limit as x approaches negative 10 from the left of f of x must equal the limit as x approaches negative 10 from the right of f of x. And the idea is that it's going to be equal to the function value. Now, because this is a piecewise function, we know that f exists at negative 10. So if we take the limit on the left side there, well, it's a quadratic. So we can just evaluate. And if we evaluate that, we get 10, and I'm going to simplify some of this-- 10 minus 10b plus c. So the limit from the left on the quadratic is 10 minus 10b plus c. The limit on the right is, again, where you can evaluate that because it is a linear function. And that value is 5. Now, we're going to rearrange this to say that c equals 10b minus 5. Now, that does not appear to help us on the surface. But we're going to combine this with the fact that it is going to be differentiable. So our function is continuous. And then we'll go ahead and look at it being differentiable. So being differentiable implies that the limit exists of the difference quotient. So I'll go ahead and write that as f of x minus f of negative 10 over x plus 10 because it's negative there should be equal to the limit as x approaches negative 10 from the-- let's go ahead and make that the left on this side and the right over here-- f of x minus f of negative 10 over x plus 10. So if we evaluate each of those limits-- so the limit on the left there is going to be 1/10. I have to keep my limit. x approaches negative 10 from the left-- is 1/10 x squared plus bx plus 10b minus 10. Now, you might be saying, where is that coming from? One, I'm evaluating it at negative 10. And also, I'm replacing the value of c, replacing the value of c with 10b minus 5. And that is over x plus 10. Clearing the fractions there-- we'll do that so we can factor this, possibly. X squared plus 10bx plus 100b minus 10 over 10x plus 10-- and if we take the limit from the left, notice we have to look at the limit from the left and the right because this is piecewise. That's an important thing. Now, this actually factors, factoring by grouping, into x plus 10 and x minus 10 plus 10b over 10x plus 10, keeping our limit. Now, the x plus 10s cancel. Now, if we then evaluate that at negative 10, we actually get something along the lines of b minus 2. So first, these two cancel. We evaluate it at negative 10 and then divide by 10-- b minus 2. Now, the limit from the right-- it's very similar. Evaluating that, I'm going to have equals the limit as x approaches negative 10 from the right. That is 1/4 or negative 1/4 x plus 5 over 2 minus 5, evaluating that, x plus 10. Clearing our fractions, we get negative x-- multiplying by 4 there-- so plus 10 minus 20 over x plus 10. And that will be a 10. So if we factor out-- oh, I need to multiply by a 4 there. So if I factor out a negative from the top part, that will be x plus 10 over 4 x plus 10. And you can see there that the limit is negative 1/4. So let's move this over here. Those have to be equal, which makes b equal to 7/4 if we add 2 to both sides. Now, to find c, we'll go back here. c is 10b minus 5. So c is 25 over 2. And those are the values of b and c that would make this function continuous and differentiable at the value of negative 10. So look at each part separately. Continuity from both directions, differentiability from both directions, and some things-- well, they connect, no pun intended. Let's next look at example 6. We are trying to find f double prime. We're finding the second derivative, which means we take the derivative and then we take it again. So f prime of x is-- of the limit as h approaches 0 of f of x plus h-- so 2x plus h squared minus 3x plus h plus 1 minus f of x 2x squared minus 3x plus 1 divided by h. So we'll have a 2x squared, which will cancel out, a 4hx plus 2h squared minus 3x minus 3h plus 1 minus 2x squared plus 3x minus 1 all divided by h. Now, several terms cancel-- 2x squared, the 3x and the negative 3x, the 1 and the 1. Factoring an h out, we get 4x plus 2h minus 3. That cancels. And as h goes to 0, that means this is going to be 4x minus 3. So that is f prime of x. So to find f double prime of x, we're going to start with f prime of x, that function, and do the same idea. So the limit as h goes to 0 of f of x plus h-- that is 4x plus h minus 3 minus 4x minus 3 over h. Well, that'll be a 4x and a 4x. Those cancel out. So we get a 4h. And actually, the 3 cancels out. 4h over h-- and so our limit is going to be, once those cancel out, 4. So f prime of x equals 4. Now, that should make some sense because once we have the function 4x minus 3, the slope of that function is 4 everywhere because it's a linear function. Let's move on to another. Find f double prime of x squared. Now, we actually found f prime previously. It was at the very beginning of this. And that function was 2x. So let's just go ahead and use that. So f double prime is the limit as h approaches 0 of f of x plus h-- so 2x plus h minus f of x over h. Well, 2xs cancel out. So we get a 2h over h. And that slope will be 2. So f double prime of x equals 2. Now, it's worth noting that there are lots of ways to write this. So for instance, f prime of x is the same as dy dx. So f double prime of x is d squared y over dx squared. That indicates the second derivative. And there are actually several other ways to denote derivatives in physics. There's one particular notation with dots. But we're not going to go into those. But be aware that is-- what's going on? If you see a dy dx, that's what we're looking at. Number 8-- the position of a particle along a coordinate axis at time t is given by s of t equals 3t squared minus 4t plus 1. Find the function that describes the acceleration at time t. Well, acceleration-- if we think of s of t being position, because it is, then the derivative of that is velocity. And the derivative of that is acceleration. So this is s prime of t, which makes this s double prime of t. So really, we're being asked to find the second derivative of the function we are given there. That's what it comes down to. So the limit as h goes to 0-- this is s prime of t-- of s of t plus h-- so that's t plus h squared minus 4t plus h plus 1 minus s of t 3t squared minus 4t plus 1, all divided by h. Multiplying that out, that is a 3t squared, which will cancel out there, a 6th-- that'd be 2 of those to 6-- plus 3h squared minus 4t minus 4h plus 1 minus 3t squared plus 4t minus 1, all divided by h. Several terms cancel out, as they should-- 3t squared, the 4t term, the plus 1, minus 1. And we can go ahead and factor out an h. 6t plus 3h minus 4-- our h. So that limit as we evaluate h going to 0 and cancel those two h's-- we get 6t minus 4. That is our velocity function. Now, we can sort of use a shortcut here because this function's linear. So the acceleration is going to be 6 because that's the slope of that line. Now, of course, we can go ahead and say a prime-- let's go ahead and write this. a of t equals s double prime of t equals the limit as h goes to 0 of 6t plus h minus 4 minus 6t minus 4 over h. Keep this in mind. This ought to be our answer. Well, our 6ts cancel out, as do our 4's. So we get a 6h over h, which is a limit of 6. Therefore, a of t equals 6. And I believe that is the last-- yep, that is the last question in this section over our derivative functions. So keep that in mind. These are functions that tell us the slope at any given point. Section 3.2--