Hi everyone. Welcome. Before we begin with some new content, let's start with a warm-up, why not? I'd like to use our new notation in this question. Let's find ddx of the absolute value of x. Remember ddx is Leibniz's notation for the derivative. I want to do this using the limit definition, using limits. Last time, I argued, proof by graph, I said, "Hey, the slope of the line going this way is one and so the other one is negative one." I didn't work out the limits, but let's do that now. The derivative of the absolute value function, so f prime of x is going to be the limit as h approaches zero of f of x plus h minus f of x all over h. There's our derivative definition that we know and love. Let's plug in using our function. Remember, the function in question that we are studying here is the good old absolute value, the V, of this graph. I have to write limit every time so let's do that. The function x plus h, what does that become? It's the absolute value of x plus h minus the absolute value of the function all over h. Now, here we get a little stuck because there isn't too much that we can do in terms of Algebra, and that's related to the fact that this's the piecewise function. We can't foil, or factor, or simplify things too much. What I want to do is split it up into two cases. I want to think of the right side of the graph, if x is positive. If x is greater than or equal to zero, let's say. In that case, where x is greater, the absolute value function is just zero. When I have that, the absolute value sorry is positive, it doesn't do anything, it returns x. If I have that, I can write the limit as h approaches zero then whenever I have a point x and I have another point x plus h, you think of it as x is approaching zero from the right. So x is also positive, so h and x are positive. If I add two positive numbers, h and x, the absolute value does nothing so you can almost remove them. They don't really need to be there, returns itself. You get x plus h minus x. The absolute value symbols go away, the x is canceled and you get the limit as h approaches zero from the right of h over h, they cancel as well and you just get one. That makes sense. That was my argument last time about the proof. You got the line on the right side of this graph as y equals x, its slope is one. I can only do this and get rid of the absolute values if x is positive. But there's also something you can do here if x is negative. If x is negative, then the limit becomes negative. When I have an absolute value, how does it handle? We can still approach x from the right, it doesn't matter. But we're going to come in and you have x plus h. This will all be negative now. H is really small, almost like zero but x is negative. If I take something really negative and add a little bit to it, it's still negative. The absolute value of a negative number is removed when you put a negative in front. To make a negative number positive, you negate the negative, and same thing over here. I'm going to replace the absolute value of x with a minus x all over h. Let's clean this up algebraically. Get to zero. What do we have? We have minus x minus h plus x over h. The x's cancel as before, and the h's cancel as before but now I'm left with a minus one. You can see this happening. You have to treat this in two separate things because the function treats positives and negatives differently. It makes sense that the derivative in the limit should as well. That's what I argued last time. This is the graph on the left side of the y-axis, y equals minus x. Its slope is minus one and the derivative is picking that up when you're a linear function, the tangent line is yourself. The one part I left out is what happens if x is zero? I have positive numbers, negative numbers, what if it's zero? In that case, the limit is h equals to 0 of the absolute value of h minus zero over h. All the x's go away, this's just zero. This graph, we've actually seen this before. If you remember this function, maybe you don't remember it, but if the graph is not defined as zero, but that's okay, and the limit, you can still talk about limits, it's an open circle at zero and then it's one for positive numbers. If h is positive, the absolute value goes away and you just get one. If h is negative, you replace the absolute value of h with a negative and you get negative one. You can plug in some numbers. This graph, maybe you remember this before. But the point is as I approach zero from the right, the limit is one and from the left limit is negative one. It's two different one-sided limits. This limit does not exist. This limit does not exist because the total limit, the two one-sided limits are different. This is the graph as promised before. You can think of the derivative as a function, as a piecewise function. So 1 if x is positive, negative 1 if x is negative, and then just completely undefined for 0 and the graph. But there's a cute way, just like absolute value, is a cute way to write it altogether. You can summarize that using actually this expression over here for the case of 0. This is the absolute value of x over x. It gives you the same exact answer, and you can see that now it really is undefined at 0. This is a nice little derivative to know when. Once you work it out once, you don't have to work on it again, you put in the catalog of things to know, and off it goes. How can a function fail to be differentiable? It turns out there's a couple ways. The first one that we just saw is where the limit as a function f' of x has a limit. I'll give you version two just because, why not? F of x minus f of a over x minus a, and I'll even write it in fancy Leibniz's notation. Df, dx, this doesn't exist. The limit DNE fails to exist. As an example, the cusp on the absolute value graph is our, usually prototype, but in any function with any cusp. So at x equals 0 is not differentiable. No cusps. No sharp corners. The general thinking that if you can run your hand over the graph of the curve and you don't hurt your hand like a nice smooth sine curve, a nice smooth cosine curve, then the function is differentiable. Differentiability in terms of its geometric properties means the function's smooth, nice and smooth parabolas, cubic functions, all those things. Another way that a function can fail to be differentiable is by the theorem that we had where we saw that if I'm differentiable, then I'm continuous. So the counterpart to that would be, so like therefore, if you're not continuous, they call this the contrapositive. If you're not continuous, then you're not differentiable. So anything that's not continuous, the takeaway here is if I'm not continuous, I'm not differentiable. Let's draw some nice piecewise function that is not continuous. I don't know. How about something like this? Then there's a jump discontinuity, why not? It goes off that way, and we'll put it right at one. Here, I'm not continuous at x equals 1, so we would not talk about differentiability. The function fails to be differentiable. Therefore, f prime of 1 is not a thing. This wouldn't work. In an absolute value graph, I am continuous, so this rule number two here doesn't apply. But if I have to jump discontinuity or a hole in the graph of this sort of thing, if I'm discontinuous, I cannot be differentiable. Another one is, comes from the geometric understanding of what the derivative is. Remember, the derivative at the end of the day is the slope of the tangent line, and somewhere along the way you learned about different kinds of slopes. Your teacher probably drew like this picture on the board. So pre-calculus concept we always like to say like if we have a little skier, he's going up the mountain, he's doing positive work, slope is positive, and here you have a little skier going down the mountain, then it's negative. If you're a cross-country skiing, it's no fun, so that's 0, and if you're on a cliff, then the skier will fall and crash and be horribly hurt, and that's not allowed. We don't want to hurt any skiers, so we say this is undefined. At the end of the day, if the derivative is the slope and there is a case when the slope is undefined, you have to be careful that there aren't functions that have these vertical lines, and there actually are functions that do this. So you can have a vertical tangent. Imagine some function. Let's try to draw this well, like it's doing its thing, and then there's like a steep drop-off, and at some specific point, maybe like right about here is where we got the tangent line gets completely vertical. Therefore, the slope at this point, it would be undefined, just at this point. At the other points, there's certainly fine tangent lines here at the top or bottom, whatever. But right at that moment, it's undefined. These are the three big ways that a function can fail to be differentiable, and they are three distinct cases so watch out for these. The point is, it's okay to have a function that's defined. In all three cases, let's say I define the function at 1, display a piecewise to be there, I can have the function defined at a point, but then I can have the derivative fail to exist at that point. So that's something that you just have to understand happens and happens often, and we'll talk more about that. That gets into the domain of the function just being different than the domain of the derivative. Moving on, higher derivatives. This is going to blow your mind. If you have f of x, if f of x is a function, it is quite a natural thing to do, to find the derivative. We saw lots of ways to do this. We did lots of examples. F prime of x is a new function. What do we do with functions? We find domains, we find ranges, we find graphs, we find derivatives. So you can take the derivative of the derivative. You can find, and that'll turn out to be useful as well, to find derivatives of derivatives, The fun doesn't end. We call this the second derivative. If I take the derivative, and take its derivative, usually I write it as f double-prime of x, this is the second derivative. It is just another function. It contains information about the derivative, which contains information about the original function. In physics, if the first function is the position function, the derivative is the velocity, and then the second derivative is the acceleration. They have this. You can do this all day. You can have fun with this. You can take the second derivative and take the third derivative. Oh my gosh, the madness of it all. You can take third derivative, you can take the fourth derivative. Now, here's where notation gets a little messy. It gets annoying to write tallies like one to the fifth. This is where Newton's notation with the little primes and slashes are good for first and second, and maybe third, but they get gross at the end of the day. If you wanted to write more, what they end up doing, is they write a little parentheses, like the fourth derivative, they put the number up here. Fifth derivative, it's not raised to the power, they have to do this. But this notation gets a little gross. If you wanted the second derivative using Leibniz notation, you put d squared of the function dx squared. This one generalizes a little better. Notice the power in the numerator, the derivative that you're doing is on the d for derivative upstairs, and then on the variable, downstairs. If the function was of Theta, you'd obviously replace x with Theta or T or something like that, and it goes on forever and ever. There's no stopping to how much fun you can have when doing these things. Let's just pick one as an easy example. This is where you really want to develop some shortcuts, and not want to have to do the limit definition every single time. But right now, let's pick an easy example just to see this. If my function is the parabola called x squared, we've done this one, so I'm comfortable just writing this out. The derivative, if you don't remember, you can check, or go back to your notes, is 2x as a function. Good times, right? We have the nice parabola, pretty, pretty, pretty, we have the function 2x, so here's y equals f, we have the function y equals f prime, and then you can take a second derivative. You can have a second derivative. 2x is a line, the derivative of a line is the slope of that line, the slope is just two. You can also work that out if you want, but you can do that as two. Because derivatives are so much fun and so awesome, you can keep going. Why not? The third derivative, I'll stick with my tallies here, if I have the line y equals two, let's graph that for a second. The line y equals two. Remember, if you're a line, the derivative is your slope. What is the slope of a flat line? How much fun is cross-country skiing? We say zero. So I remember that, zero. We have another one. Then, the world is your oyster, you can keep going if you want. Why not? Although it gets boring and doesn't really tell you much information, but there's nothing stopping you. If I were to graph the line y equals zero, that's just the x-axis. What's the slope? It's just another horizontal line. What is the slope of that line? It's also zero, and off we go. Just to mix it up, if I wanted the fifth derivative of this function, I don't know why I would, but just to prove a point that you can keep going, you would just keep getting back zero. For this one, the derivatives are just zero, zero, zero forever and whenever. They're not very useful, but if you look at a kill, rainy afternoon, you can definitely do more of these things. Here's higher derivatives. Their interpretations, as you get up in other courses, will mean different things depending on what the original function is, but just know that we're going to ask for lots of derivatives in this class, and just finding one derivative is one thing we can do, and it's pretty natural to start asking for more. Get used to the notation, and get comfortable with the idea of taking lots of derivatives. See you next time.