All right everyone and welcome to our lecture on derivatives, and rates of change. This section and next are really going to start to get what calculus is all about, so before we begin, let's motivate what is to follow. Recall, I have a function good old f(x) and I have a point, let's call it x1, and I have another point, let's call it x2. So I put graph these points, I evaluate the function at these points here's f(x), and here I have f(x2). I am interested after I draw two lines I want to connect these values. I want to relate these values in a linear way, and this is a line good old u = mx + b. And with any line one of the most important features most important properties of this line, remember since it connects two distinct points, we call it the secant line, again not related to the trigonometric function. So with the secant line I am interested in the slope of the secant, and we've covered this before, so I'm going to move a little quickly. The credit is the rise over run, changing y over the change of x, we can write this as f(x), there should be 2, f(x2)- f(x1), all over x2- x1, good old rise over run. The problem that we ran into when we started off for this material was that what happens if I move x2 closer to my original value of x1? In that case, let's say I pick the little intermediate point right in the middle, if I drew a line that would have a new value, that's fine. If you drew another line as you get closer, you keep getting different secant lines, and the formula for slope works every single time, not a problem, but it breaks down at one particular moment. And with any fraction as let's call because we're super close over here, with any fraction, if I get the point when the denominator is 0, then I have a problem and that happens in our case if we move x2 so close to x1, that they become basically the same. I can't find the slope of the line, when I have the two points really considered as one, so let me draw this graph again, and the issue is that's kind of a problem if you think about it. So let's just call this point x, why is it a problem? So at this point there is certainly a line, that goes right through this point, they call this the tangent line now that I'm only considering one point. This is the tangent line, and of course the problem that we saw before was the formula for slope breaks down. The formula for slope has a 0 in the denominator, and that is bad and it's upsetting. So, you have this good line, you don't know how to find the slope of it, it turns out this line is actually pretty useful lots of applications, so we want to fix that, so how do we do that? What we do instead of calling a separate point x2, is we measure the distance away from the original point, and we call that h. So we're going to call a second point out here x + h and h you could think of is the distance away. So h is this distance away, and whatever our second point is, this now becomes f(x) + h. H is some value, h is positive everything is fine, so I want to talk about the slope of the line between two points. Now my slope of the secant line becomes, as always, my change of y over the change of x, it becomes f of the point on the right, which we are now calling x + h- f(x). Divided by, f(x) + h- x, so change of y values over the change of x values. There isn't much you can do with these two expressions, the only thing that cancels out these Xs downstairs, and you get has a final expression f(x) + h,- f(x) all over h. We've seen this before, this has a name, this expression, given a function, is called the difference quotient. So as promised the difference quotient is coming back, difference quotient. This has a name, the difference quotient, and now here's the beauty we're going to tie it all together, this is where algebra sort of fails us. When h is 0, when that's that describes the case we talked about above, when h is 0, I can't evaluate this difference quotient. So again, the question what happens when x2 becomes x1 in the original one can now be rephrased that what happens when h is 0? When h is 0 and you run into problems because I can't divide by h when the distance between my 2.0 actually have just one point. So how do we get around evaluation problem, As we take limits, this is the beauty of limits. So instead, we will take a limit as h goes to 0, of the expression of the difference quotient expression, divided by h. This simple idea, only it's not so simple maybe, but the ability to take a limit of which we have lots of techniques, and tools and theorems. This ability is going to allow us, to find the slope of the tangent line. And it's going to allow us to keep going in math, and not be stuck by my algebra that got us in trouble. So this is what we will define as the slope of the tangent line, and so that's almost the definition. Let me squeeze it in down here for a second. So definition we will call the tangent line to a curve. This is how I'm defining the tangent line. So think of a curve is the graph of any function, of y= f(x). At a point x=a, to have this slope. Defined by the limit as h goes to 0 of f (x) + x, and we're going to evaluate it at, x=a. This is the tangent line. I don't want to give a picture, and say see the picture that I drew here. This is the tangent line No. We're going to the tangent line, given a curve and specific point. So you give me a function, you give me a parabola, cubic, whatever you give me that curve. You pick a point on the line, and I will then use limits, and the difference quotients to find for you the line because I can find the slope using limits. Brilliant, I'll do one in a second. And I have a point ,and then we can do the point slope formula. As with all definitions, there a little abstract. A little worry, let's do a specific example to see it in motion. So this is our new goal now is to find tangent lines, okay? So to find tangent lines, we'll find the equation of a tangent line. Find the equation of this tangent line to the parabola. And let's say 4x- 3x squared. And let's do it at x= 1 okay? So I have this parabola 4x- 3x squared is parabola points down. So this parabola goes through the origin of 0, and then some other point out here, so it's going to be a downward facing parabola. Something like this, give or take and an x=1. If I plug into the function f(1), this is just 4- 3, so that is of course 1 as well. So let's pick a point, now let's draw at this point. And it's somewhere, I guess, a little bit to the right of the vertex give or take so 1,1 somewhere there. Okay, so there's parabola, there's a point I gave you a function, I gave you a point. So you can imagine a tangent line just going through that point, just touch it once here. And this is the tangent line. Nice straight line touching the point just once, and I'd like to find its slope. And given the information that I have, algebra alone won't do this, so I have to use limits. So the slope of the tangent line is found by taking the limit as h goes to 0 of, I'm going to write the definition just so we get used to seeing it. Eventually will plug in the pieces that we want. Let's use a since I have a number since x=a, so I have the limit as h goes to 0 of f(a+ x) -f(a) /h. This is the definition, memorize this. Know this definition we're going to use it a ton. What do we have going on here? Reminder the function f(x) is 4x- 3x squared. My value that I'm interested is a = 1 and h is my variable. Now h is the thing that's going to go to 0. So I'm doing a limit problem, and I haven't evaluate the limit, so I'm going to write the limit every time. Now I have to evaluate the function at a + h. We know how to do this. Remember where every CNX plug in a+h, a is 1. So we're just going to plug in 1 + h. So the function plugged in at 1 + h becomes 4 (1 + h)- 3( 1+h squared)- the function, all over h. Keep going, let's clean this up a little bit. The numerator screams to be cleaned up. This becomes 4 + 4h- 3 parentheses 1 + 2h plus h squared- 1, all over h. Keep going, because I hope you see what I see. There's some stuff that's going to cancel. I have 4 + 4h- 3- 6h minus 3h squared, all minus 1. That's the numerator. The whole thing is divided by h. Right, and again, I'm writing the limit every time. Well, do I have to write limit every time? Yes, you have to write the limit every time. 4- 3- 1 is 0, those cancel, and I'm left with, so the constants all cancel, and I'm left with 4h- 6h- 3h squared. Then every term in the numerator has an h, so I'm going to factor that out as I write it so it becomes 4- 6. Which of course, I could have combined those two to get -2- 3h over h. So 4- 6- or 2 -3h, the h's cancel, the h's cancel. And I can finally plug in my h. And when I do that, so you only write overtime, so the limit as h goes to 0 of 4- 6, that's -2- 3h. This is a polynomial in terms of h I can just plug in. This goes to 0, and you're left with -2. So final answer for the slope is -2. Now remember, they didn't want the slope, although there will be some questions that just ask for the slope. But this takes a bit of work to find this, and without the other information, there's no other way to do this. What's nice about this now is that, well, I guess we can remind ourselves, how do we find equations of lines given a point? So it's our point that we're talking about here. Our point that we're talking about is 1,1, and we have a slope m, that's -2, and so I have a point. I have a slope, and I want to find the equation of a line. There's something called the point slope formula. We should know this. A friendly reminder, it's y- y1 is mx -x1, so we have y- 1 equals our slope we found after much work to be -2 and then x- 1. You can leave your answer in this form if you really want. You can write it as -2x. This would be +2 and then +1. So if you're a y equals mx kind of b kind of person, it'd be y = -2x + 3. And a quick check, I know it's hard to see from the graph. But this slope is negative, the -2, and that's what we would expect based on our picture. I know just least negative the 2 is a little hard to see. But something like this. So this is the equation of our tangent line, and I know it's a lot. We're going to do a lot of these, so just to get used to it, but here's our first example of finding equation line using limits. The big takeaway here is that you're going to want to memorize the formula. We're going to do it so many times that you will memorize it. But a lot of students, when they see this at first, couple things just to watch out for, writing the limit every single time, there's a lot to write here. It's going to fill up a page, I know. But you have to write the limit. Oherwise you're missing the entire point of the question, this is taking limits, using limits, applying our ability to take limits. And then always write the formula in the beginning just in case something goes wrong with the algebra, and at at least like, hey, I know the formula. I tried to get some pity points, everyone was happy. But write the formula down, and remember, this is for the equation of a tangent line. If you just give me two points, two separate points, sure, use good old slope formula for a single point of a function. Now you don't need another point. You can find the tangent line to that curve. Okay, we will do lots more examples in the videos to follow, but go through this one. Make sure you understand it before you move on. Okay, see you next time.