Stony Brook MAT 122 Fall 2017
Lecture 10: The Definition of the Derivative
September 20, 2017

Start   I know you've been very excited so far. It's going to get even more exciting today as we start to really focus on actual calculus.
Okay I can see the enthusiasm there.
I'm being sarcastic. Okay just wanted to make sure you knew.
We have an exam in a couple of weeks.
As I said I wouldn't worry too much right now.
I'll make sure you guys all see all the material that's on the exam before the exam.
In fact we're a little ahead on the syllabus, which is good.
0:32And I follow by the forecasts. Did you hear about the storm today? That's kinda sad.
There's another one coming so cross your fingers it won't be like the last one.
I hope everyone in Puerto Rico is okay.
Years from now somebody is going to watch this video and be like "What is he talking about?" Alright so now we're actually going to start doing calculus.
Today we'll sort of be doing calculus and then we really get into it next week.
1:01So some of you already took calculus so a lot of us are gonna know in advance but whatever.
So remember I was talking about the problem of getting closer and closer to something without actually touching it and figuring out how to do mathematically that you're touching it without actually touching it. This sort of contradiction.
And then limits help to solve that because with limits you can pretend that you're so close to touching it that you might as well be actually there.
And that concept turns out to be very important in the creation of calculus.
1:34So this is something that both Issac Newton and somebody like Ed Helm I think figured out simultaneously two different locations in the 1600s.
And they said okay so we want to find the slope of a curve.
So we know how to find the slope of a line.
We have some line and we have some spot and some other spot and the y coordinates.
2:05Now why would we want to find the slope of a curve rather than the slope of a line?
Well this was very important because they were studying- in Newt's case he was studying gravity which is objects falling around the sun, but in general objects are tracing some sort of path.
And the question is how fast is it going?
You could figure out how long it takes to get from here to here
2:32so if you pretend that that was a straight line you would say well that's how fast it's going but you know it's not it's going fast here and it's slowing down when it gets to the top it stops for a second before it turns around and comes down again.
So the question is how could you do that?
The answer is well you would need slope at any instant on the curve.
because you could find overall like say you leave here it's 60 miles to Manhattan and an hour later you're in Manhattan so you could say I went 60 mph.
3:02You say well you averaged 60 mph.
There are places where maybe you got to go 75 (which is illegal) and there are places where you had to slow down to you know 10 or 20 mph.
When you put it all together you've got 60 mph but it's an average because your velocity is going up and down all the time.
So what they did was what they said well first we're going to start with the slop of a line and we're gonna rewrite this a little bit so we're going to change some of these.
3:32So we said instead of a line now we're going to find the slope of a curve. What we can do is we can pretend the slope of that line is the same as the slope of the curve.
And if it's a flat enough curve it's pretty close or you could just take a very small piece of a line.
So instead of here to here you could take say this little piece of the curve which is going to look very much like a line.
So how are we going to find that slope? Well firstly let's change the notation.
4:03So instead of using y's let's use f(x).
So you say why? Well we're math people, we do that.
So when you know that the slope is f(x2)-f(x1)/x2-x1.
So slope of a line that's called a secant line.
4:36The secant line is a line that cuts a curve two different spots.
So like we said the slope is just the difference in y's and difference in x's over difference in x's We're going to narrow the distance between these two points and we'll get closer and closer to matching the slope of the curve.
So then we introduce another change in notation.
5:02So same picture.
And if we do different notation of course it will be easier to work with the problem.
So instead of x going +x2 let's just call this x and the y coordinate is f(x).
And then let's move some distance to the right 'h' units.
So the difference between these two is h units.
Then the y coordinate for here is f(x+h).
5:35So now we have that the slope = f(x+h)- f(x) / x+h-x Okay so still difference in y's over difference in x's.
And then you say but I'm good at algebra wait a second. x + h - x is just h.
6:07Right? Because the x's cancel.
In other words the distance between the two y coordinates over the distance between the two x coordinates.
The difference in the x's is h and the difference in y's is f(x+h)-f(x).
Alright and then the last thing these guys said to themselves was alright now what I want to do is I want to shrink this in as closely as possible.
6:33So I don't want this line, I don't even want this line, I want sorta that line. In fact I want the tangent line.
I don't really want the slope anymore. I don't want the secant line.
I want to find the tangent line. The tangent is- it only touches the curve in one spot.
You say but you can't have a slope if you're only in one spot.
This is the problem.
You have to have two locations to have a slope right? It's difference in y's over difference in x's.
If there's one spot then the difference in x's is 0 and you can't divide by 0.
7:03So if you've got your curve you have to have some difference here.
You can't just say x and x+h is on top of it.
You have to get some tiny little distance here.
For a secant line you can't really have a tangent line.
So mathematically they said what we can do though is we can pretend that the difference between those is so close to 0 that it might as well be 0.
7:32We can just keep shrinking it down and shrinking it down to a point where it no longer matters that it's a 0 in the denominator.
And we can do that mathematically and we use limits for that.
So what we do is we take that formula and then we just shrink h to 0.
Remember I talked about this last time or a couple times with the limits. It's not actually 0.
But it's infinitesimally close to 0.
8:00Okay so if you want to get the slope of this tangent line and if that stands for velocity then what you've done is you've found the velocity at an instant. You've really found the velocity between two moments of time that are infinitesimally close to each other.
So they might as well be the same moment.
And you can show mathematically that it no longer matters about the fact that they're separated by some distance because you just get h is closer and closer to 0, you can make it as small as you want.
8:30And that is the derivative.
So differential calculus which we'll now spend a few weeks on, uses the derivative.
9:04The derivative of f(x) = lim f(x+h)-f(x)/h as h-> 0 That's a slope formula.
And we abbreviate that f'(x). We actually have several different notations.
Because different people in different parts of Europe were doing this at the same time and they came up with their own notations and one of them is this little apostrophe.
It's called 'prime' so f'(x).
9:33And then as I said we can use that formula to now find different slopes.
And as I said before knowing, the slope you know lots of information because you essentially know how something is changing now because you just look at the slopes at different instances.
So if you can have a formula for what the slope of a curve is like then you can just plug in whatever instant in time you want and you get the slope.
Rather than having to guess.
10:02Okay so let's do an example.
Enough theory.
And since some of you have already taken calculus in high school you'll say "I hate this part".
Some of you have taken calculus in high school I presume.
That's why you're smiling.
Let's say we want to find
10:30the derivative, so we want to find the slope of what's going on with x^2 at x=3.
In other words if we have the parabola x^2 and at the point (3,9), what's the slope right there?
So imagine you have a tangent line at exactly that instant, what's the slope?
11:03Now remember as I keep saying it doesn't really make much sense to use the word slope when you have a point you always think of slope as between two points because slope is about change.
But we can now do it at an instant at exactly one point.
When you get higher into math you learn more about this it get's very philosophical.
It's kind of fun. Alright so let's use our formula.
So let's say x=3 so we're going to want to find the derivative at 3
11:34and that's going to be f(3+h) - f(3) / h.
Now we have some messy algebra to do.
12:04The limit as h goes to 0 (3+h)^2 that's so f(x) = x^2 f(3)= 3^2 and f(3+h)= (3+h)^2 So, make sense? Everybody see what I plugged in?
12:30So remember f(x) is x^2 so f(3) is 3^2. f(5) is 5^2.
f(a) is a^2 f(x+h) is (x+h)^2 Remember to square the whole thing.
Okay well we know what 3^2 is.
And how do we do (3+h)^2?
Well, step over here for a second.
(3+h)^2 is (3+h)(3+h)
13:00which is 9+ 3h+ 3h+ h^2 so 9+ 6h+ h^2 ? Alright so let's plug that in here.
So the 3+ h^2 is now 9+ 6h+ h^2.
13:333^2 = 9.
All divided by h.
So you look at this you say okay let's do the limit.
I plug in 0 I get 9, 0, 0, -9 so you get 0 on top.
I get 0 on the bottom. That doesn't make any sense.
You're getting 0/0 that was our problem. You can't have the 0/0 thing.
Because you have 0 in the denominator but let's simplify this some more.
14:00So the 9's cancel and now it's lim h -> 0 is 6h+ h^2/ h And remember h is the limit as h goes to 0.
It's not actually 0.
That means we could factor h out at the top, and cancel because remember you can cancel as long as they're not both 0.
We pretend that they're 0 so we say you're getting this sort of schizoid thing
14:33You say it's 0, but it's not 0, but I'm going to treat it like 0, I'm not going to treat it like 0.
And back and forth but you can treat it like it's not 0 in order to cancel and now we're going to pretend it is 0 when we plug in the limit and now we get 6.
So that says if you drew an accurate y= x^2 and you went to the point where x=3 the scope at that moment is 6.
15:03So far so good?
Bored? I'd be bored. Alright let's do it again.
Instead of doing it at 3 let's do it at, oh I don't know I could pick any number. Ten.
15:44So it's the same set up as before instead this time we're using 10 instead of 3.
For those of you who took calculus already who are saying "Wait, why can't I just use the shortcuts?" Those of you who have never taken calculus say "Ah, there's shortcuts?"
16:03The answer is yes, no you can't, yes there are. We will learn them soon.
There are a couple. But those of you who already know the shortcuts you already know the answer but that's okay. Then you should be able to get it right.
So we're going to do the limit as h goes to 0 so this is going to be f'(10) this time.
And it's going to be (10+h)^2 - 10^2 / h.
16:30So exactly what we had before but this time instead of 3 it's 10.
Alright let's multiply out (10+h).
17:01This is 100+ 20h+ h^2.
That's what you get when you multiple that out.
Okay so let's go back up and plug that in.
17:31100+ 20h+ h^2- 100 / h.
So same as before when you look at that and say we're getting 0/0 If we do a little canceling we won't get 0/0.
So the 100's cancel each other.
18:03Now we can factor h out of the top.
Right? Cancel the h's so we just have the lim h->0 of 20+h
18:31And now when h is 0 we get 20.
So far so good?
So when it was at 3 it's 6, when it was at 10 it's 20, so of course now I'm going to ask you let's do it at x.
So now we don't care about the specific numerical value. We want to find a general formula, that's the whole idea.
19:18Okay so we have lim h->0 of f(x+h), that's our formula.
And that's going to become- so this is f'(x).
19:34Just writing down the formula.
And now at x with f(x) is x^2 This is going to be the lim h->0 of (x+h)^2 -x^2 / h.
So now imagine if you plug in 0 right now you get x^2-x^2 is 0 over 0.
So you can't do that yet.
You have to do some algebra.
To get rid of the problem you basically have to get rid of the h in the denominator.
20:12Okay so let's foil out (x+h).
20:36That's x^2+ 2xh+ h^2.
And you're going to be expect to just do these kinds of foilings, squared, cubed, a couple of those.
Question: "Is the limit always going to be as h is approaching zero?" The limit will always be as h goes to zero.
Because the idea is you want to shrink the points in until they are infinitesimally close to each other so you always want to do it at 0.
21:12So this is now x^2 + 2xh + h^2 - x^2 / h.
So let's do exactly what we did with the numbers. We cancel the x^2's
21:38You get lim h->0 of 2xh + h^2 / h.
You factor h out of the top.
You cancel the h's.
22:05Now when you plug in h as 0 you get 2x.
So that says that the derivative at any point will be 2x.
Which we can check. When we have 10, 2 times 10 is 20, when we have 3, 2 times 3 is 6.
So far not so bad. Some of you will say ah, I knew that one.
Now we'll do a harder one.
22:35Let's do x^3.
23:04f'(x) is going to be the lim h->0 of (x+h)^3 -x^3 / h.
And then you'll have to cube (x+h).
Be happy I'm not making you do to the 5th.
23:36So (x+h)^3 = (x+h)(x+h)(x+h) which is x^3 + 3x^2h +3xh^2 +h^3 You're going to be expected to do these if I put it on the exam.
24:05So I recommend memorizing them.
It makes it easier. There's only two.
I put them up on my Instagram for my other class so you could always go on that and then copy it.
I usually throw a few math things up there for you guys.
Which gets likes from people who aren't interested in the math which I find amusing.
There should be a hate button.
24:31Alright so we plug everything in.
You get x^3 + 3x^2h + 3xh^2 + h^3 - x^3 / h.
25:04So we do what we did last time. Cancel the x^3's.
Then you get lim h-> 0 of 3x^h + 3xh^2 + h^3 / h.
25:33Now pull out an h.
And you get 3x^2+ 3xh + h^2 / h.
Then you cancel the h's.
So here's a clue when you do these kinds of problems.
You have the function on the left and you have the function on the right.
All of the terms in the function on the right have to cancel with the terms on the left.
26:05So we have an x^3 that has to cancel with an x^3 somewhere on the left.
If that doesn't happen you've messed up. Usually it means you messed up a minus sign.
And then after you've done the canceling, everything that's left will have at least on power of h.
So you'll be able to factor h out.
Okay so that's your two things you're looking for. One is you're looking to make sure that all of these terms cancel.
26:33And then after you've canceled you're going to make sure that everything contains h.
Because now we cancel the h's and now when we take the limit as h -> 0 this is 0, this is 0, and you get 3x^2.
That's as if you have the line, the curve, f(x) is x^3.
And you want to know what the slope is at any moment, it's 3x^2.
27:00Good, alright so we'll have you guys do one.
Okay, let's see if you can do that.
32:44So one of the problems people have with these is setting it up.
Well there's two problems. One is setting it up correctly and the other is doing the algebra.
If this is f(x) we're gonna have this thing over h and this is going to be our f(x).
33:05What's f(x+h)? f(x+h) is take the x's and replace them with (x+h)'s.
So it's gonna be 6(x+h)^2 - (x+h).
That's taking each of these and replacing it with x+h.
33:31Remember what that means so if this was f(5) you'd put 5 in both spots.
If this was f(100) you'd put 100 in both spots.
If this was f(x+h) you'd put (x+h) in both spots.
Okay now we have to actually do the algebra.
So people have two places where they have trouble. One is they have trouble setting up the first step.
And the other is they have trouble delivering the algebra.
Now it gets messy. I don't blame you.
34:02And we don't spend that much of the course on it so that's the good news.
But let's see. (x+h)^2 is x^2 + 2xh + h^2.
Then we've got - (x+h) - 6x^2 + x.
Over h. One of the things people do is they mess up the minus sign here. You'll know if you got it right when these two terms will cancel with terms over here.
34:34Okay let's get rid of both of these terms on the right.
Distribute that 6.
Distribute the minus sign.
Whole thing over h.
35:01Okay so first you have to multiple the (x+h)^2 that gets you here.
And you have to multiply through by 6. That gets you to here.
And the rest is just distributing minus signs.
Remember when you had trouble with that in the 7th grade?
This is why you had to learn.
Alright anything cancel?
The 6x^2's cancel. That should be an x, sorry.
The 6x^2's cancel and the x's cancel.
35:38And you're left with the lim h-> 0 12xh + 6h^2 - h / h.
And remember I told you, when you get to here every term in the numerator has to have an h in it.
So you can get rid of the h in the denominator.
36:03Okay I'm going to move up here. So now you get the lim h->0 and you factor the h out of the top.
You get h(12x+6h-1) and some of you have got that.
Cancel the h's.
And now when you plug in h as 0 you get 12x-1.
36:39Good?
Alright let's try one more of these. That'll be enough punishment for today.
37:13Okay let's see you do that one.
41:06Alright let's do this one.
So same formula every time.
As I said those of you who took calculus already, you can get the right answer faster.
But we'll punish you soon. I promise.
41:30Okay so f(x+h) gives you (x+h)^3 + 2(x+h).
And f(x) is x^3 + 2x.
You don't have to use square brackets I just use them to distinguish from parentheses.
There's no special reason.
Okay so that's your set up.
So if this was a question on the exam and it was 10 points you'd get 3 or 4 just for writing that step.
42:05Okay? Makes you happy.
Because first I want to see do you know what you're trying to solve?
And then I want to see if you can solve it.
Okay now we multiply out (x+h)^3.
Which I wrote here.
It's x^3 + 3x^2h + 3xh^2 + h^3.
42:33+ 2x +2h.
That's the whole left thing.
So then the right is -x^3 - 2x.
All over h.
Alright let's do some canceling. x^3's cancel.
43:02The 2x's cancel. Remember I keep saying they have to cancel. If they don't usually you got the minus sign wrong so you added instead of subtracted or subtracted instead of added.
This now becomes the lim h->0 of 3x^2h + 3xh^2 + h^3 +2h over h.
Something else was canceled.
43:35Okay let's take an h out of the numerator.
And you get 3x^2 + 3xh + h^2 + 2.
All over h and cancel.
And now you do the limit, you let h=0 and you get 3x^2 + 2.
44:02So if you haven't taken calculus before and you got down to 3x^2 + 2 you should pat yourself on the back.
Because that's reasonably hard.
Now I can make it harder of course with a cube root. I could do 1 over the cube root of something. You could throw in sin or cos but not in this class.
But that's enough for today so we'll do more on Friday.