Stony Brook MAT 122 Fall 2017
Lecture 21: Maxima and Minima
October 16, 2017

Start   No? You're all able to do the homework?
There's an exam coming up in a couple weeks.
Mostly going to be derivatives. We'll see how you do on that.
Same room as last time.
Alright we are going to now spend a reasonable amount of time on critical values, first derivatives, max, mins, etc.
0:32I'm moving a little slowly today because I tweaked something in my back.
I'm also probably just a little bit dopey from all the painkillers.
But that's the fun part. You say oh good I can take some double dose of aspirin.
Um nobody has any questions?
It's coming through okay, Shannon? Yeah.
Alright um so we talked about taking all these derivatives.
The good news is you're not really going to have a lot of complex derivatives to do once you get into the applications.
1:03But you need to be able to find the complex derivatives because otherwise what would I test you on?
How would I come up with ways to lower your grade?
When we use the derivatives, I talked a tiny bit about this last time, you can use a derivative to hep you figure out what is going on with the function.
When it's increasing, when it's decreasing.
And increasing and decreasing are useful in that it can help you figure out the maximum or minimum.
So if it increases and then at some point it decreases then in the middle there, assuming it's continuous, it stopped and you get a top and then it's got a bottom.
1:37Why do I say assuming it's continuous? Well it could jump otherwise.
But we're not going to worry about those kinds of things.
So let's just start with an easy example.
So let's say we have a nice easy function like x^3 -6x^2 +8.
2:06And I just want to explore this function a little bit.
So I want to figure out when is this increasing and when is it decreasing?
So the first derivative tells me that.
The first derivative tells me when a function is going up, so that's a positive first derivative, and when it's going down, that's a negative first derivative.
So you take the derivative.
And you get 3x^2 -12x.
2:33You say okay now that I have the derivative I want to figure out when is this derivative positive and when is this derivative negative?
So I could factor out 3x.
And set it equal to 0.
Why would I set it equal to 0?
Once I know where the 0's are then I can figure out where it's going up and where it's going down.
3:00Because it'll be positive on one side of the zero and negative on the other side of the zero.
If you think about a smooth function that goes through the x-axis, the x-axis is where you're 0, and below the x-axis you'll have negative values so you look. It's negative, it's negative, it's negative, it's positive. Somewhere in between the negative and the positive it must have been 0.
That would be true as long as it's a continuous function.
So we can set this equal to 0 and we get x=0 or x=4.
3:34And then what you do is what they call sign testing.
So you make a little number line.
And you put the zero's of the derivative on the number line.
And this will then help you figure out where the function is increasing or decreasing.
Now pick a test value.
So pick a value less than 0 that's in this region, a value between 0 and 4 that's in this region, and a value greater than 4 that's in this region.
4:05So let's start with say -1.
But plug -1 into the first derivative.
I get -3 * -5 so that's a positive number because the two negatives multiply together.
So that tells me that in this region the curve is going up.
And I'd only have to do one test value because it'd be true for any value less than 0.
4:33Try a bunch of them and see. You only need to do one.
Now pick a number between 0 to 4 so positive 1.
If I plug in 1 here I get 3, 3 * -4 is -12. That's a negative value so the function is now going down.
Anywhere between 0 and 4 because remember it's 0 at 0 and 0 at 4.
And if it turned around somewhere here and it switched from negative to positive we'd have to have another 0 in there.
5:04So it can't because it has to always be the same.
So I'll pick a number bigger than 4 like 5.
And you plug in 5 and you get 15 * 1, that's positive.
So the curve is going back up again.
In fact if you were to graph this you know that at 0 it hits a high and at 4 it hits a low.
5:32So it's going up until it gets to 0 then it's going down till it gets to 4 then it goes up again.
But we don't actually know the y value, we don't actually know that those are the y values.
How would we figure out what the y values are?
For the maximum and the minimum?
I have the x coordinates. These are the x coordinates, 0 and 4. How do I find the y coordinates?
6:01Plug x into what?
That's correct into which equation?
Well you have 2 options.
The first equation or the second equation.
Okay so if I plug 0 into this equation, the second equation, I'm going to get 0.
If I plug in 4 I'm going to get 0 because that's why I found them.
Okay also the original equation is the y equation.
The second equation is the derivative of y.
So I want to plug them back into the original equation.
6:33So if I do that I get f(0) =8.
And f(4) is a little more work. 64- 96 is -32 +8 is -24.
And actually the graph has that shape but the y values aren't quite there.
7:02It's more like about there. So that's (0,8).
(4, -24).
You don't have to draw the graph if you don't want to.
But the graph will sort of help you see it.
So again let's go back and look at this in the beginning.
So I have a function and I want to find out where is it increasing, where is it decreasing.
So I take the first derivative. Where the first derivative is positive the function is increasing.
Where the first derivative is negative the function is decreasing.
7:33And where it's 0 it's either a maximum or a minimum or what's called a point of inflection.
We'll get to that in a few minutes.
Or maybe not today, but we'll get to that.
But where it's 0 or 4 these are called critical values.
8:00A critical value is a place where the derivative is 0.
And that is a place where you could have a maximum or a minimum.
So I take the first derivative.
And I solve and I get it's 0 at 0 and it's 0 at 4.
Now I sign test it so I make a number line and I plug in x=0 and I plug in x=4.
When I plug x=0 it tells me I have three zones. I have a zone less than 0, one between 0 and 4, and one greater than 4.
8:38And I want to know in which zone is it increasing and which zone is it decreasing?
So I pick a number less than 0 like -1 and I plug into the derivative and I get a positive value.
That tells me the function is going up.
Until I get to 0 then it stops going up and goes down so it must be a maximum.
I pick a number between 0 and 4 like 1 and I got a negative so I knew it was going down there.
9:01And I pick another number greater than 4 and it's going up again.
So that tells me the function goes up, stops, comes down, stops, and goes up again so something like this.
And then to get the y coordinates I plug 0 and 4 back into the original function.
Everybody got the idea?
Let's test some more of these.
9:44Also notice we call this a maximum value.
But that's not really the maximum value. This function goes up forever.
It's just sort of a maximum value in that zone.
10:03But long term there is no maximum value in this function.
It goes up to infinity and then goes down to negative infinity so that's not really a minimum either.
So these are called either a local maximum or a relative maximum.
Okay? Either one.
And similarly this is a local minimum.
10:35Or a relative minimum.
Because we mean in the zone, in the area.
In that location it's a maximum or a minimum, but it's not necessarily the maximum of the whole function.
Now sometimes you do have a maximum or a minimum like when you have a parabola that is the minimum value.
11:00That's called an absolute minimum.
But here this isn't really the minimum because the function goes down forever.
But if I restricted it somehow or if I only cared about a certain part of the curve then it's actually a minimum or it's actually a maximum.
Alright so let's try another example.
How about
11:44Okay so would you guys like to try it on your own first or should we do it as a group?
Who votes for group?
Who votes for on your own?
The rest of you didn't vote.
This is why America is in the shape it's in today.
12:03Since 3 of you voted yes and none of you voted no then I guess we'll do it as a group.
Majority wins.
So this is our function. So we want to figure out kind of what this function looks like.
It's kind of the same shape as that one.
Where it has a maximum, where it has a minimum.
Where it's increasing, where it's decreasing.
As I said why is this important? Well suppose I said suppose this is your profit equation.
You want to know when your profits are increasing and then you want to know your maximum profit.
12:33Did they define this in some way? Nah.
So first step: take the derivative.
Not a hard derivative. We could all do those.
Set it equal to 0.
13:05I'll give you some calculus advice. If you're not sure what to do on a problem on the exam take the derivative and set it equal to 0.
See what happens. You'll probably get some partial points.
I can't guarantee it but it'll help.
So do we want to factor that?
How about we divide everything by 6 first.
Now you could use the quadratic formula.
13:32Or you could factor it. Figure if I give it to you it's factorable.
Our only options are 5 and 1.
So how about we make this -5 and +1.
-5 +2 is -3. Perfect.
Okay so that's 0 at x= 5/2 and -1.
14:02So those are the critical values.
If this were an exam question, part a, find the derivative.
Part b, find the critical values.
Why is it x+1 not +3? Because 5*1.
This part has to be 2 right? That part has to come out 5 and then this and this have to combine to give you 3.
14:30So you get -5 here you get +2 there.
I know it's been years since you guys have done that stuff.
And you've been using your calculator.
I wish you could use your calculator but you can't.
I mean you can you just can't use it on the exam.
Alright so those are the critical values. Those are the possible maximum minimum points.
Now let's make a sign chart.
Also known as a number line.
15:01Now we're going to take a value in each of the 3 zones and plug it into the derivative.
The easiest place to plug in is here.
In the factored equation. And you only care if it's positive or negative. You don't care about the value.
So in other words let's take a number like -2.
If you plug -2 in here you get 2(-2) -5. That'll be negative.
And -2+1, that will be negative so you put them together you get a positive.
15:39See what I did? I don't actually care what that comes out. The value doesn't really mean anything.
Alright now pick a number between -1 and 5/2.
I always use 0 if you can.
1 works but the reason you use 0 is because it's really easy to plug in.
So if you plug in 0 you get -5*1 is negative so it's a negative here.
16:07And then I pick a number bigger than 5/2.
5/2 is 2.5 so I'll do 3.
Or a billion. It doesn't really matter.
Because I want to find out if this is positive.
So 2(3) -5 is positive.
And 3+1 is positive. Two positives makes a positive.
16:32So now I know that the function first was going up.
Then it was going down then it was going up again just like the last one. Same shape.
It's because there's families of curves.
Now I want to graph this.
So in order to graph it, I know the general shape I just need to know the actual coordinates of the maximum and the minimum.
17:06So I know -1 is a maximum.
Okay so I can plug in -1 into the original equation.
And I get -4-9 is -13 +30 is 17 plus 25 makes 42.
17:44I plug the x-coordinate into the y equation. Feel free to check my arithmetic.
Now 5/2 is more entertaining.
18:02Let's see I get 4 * (5/2)^3 -9(5/2)^2 -30(5/2) +25 let's see.
That's 125/2.
Minus 150/2 that's -25/2.
Plus 25 is 25/2 minus 225/4.
18:30That's 50/2 so that's -175/4.
Could be wrong. Feel free to check me on a calculator.
I don't really care what the value is. But it's something I have to think about.
We'll give you a relatively easy number. I wouldn't really give you 5/2 and make you do it in your head.
That's too hard. But you could do it on paper by the way.
You should all be able to do that. In theory you got out of 5th grade by being able to do stuff like that.
19:00So this tells me there's a maximum at (-1, 42).
And a minimum at (5/2, -175/4).
So it's something like that.
You just have to sketch.
As they say figure not drawn to scale.
Everybody got the idea?
You can do one on your own now.
19:34That's the best part.
How about you do this.
20:57Alright everybody take a couple minutes.
21:01Find the maximum, find the minimum. There might be more than one maximum or minimum.
Find the critical values, maximums, minimums, graph.
27:38Alright there's enough phones in action now that I figure you've got the problem done.
You know what people did before they had phones? They just slept.
So first thing we want to do we want to find the critical values.
So find the derivative.
The derivative is 4x^3 -12x^2.
28:02The derivative of 2 is 0.
Now we want to find where this is 0.
Because that'll help us find the critical values.
So you could factor out 4x^2 and you'll be left with x-3.
See the critical values are going to be where this is 0.
That's at x=0, x=3.
So far so good? Were we able to factor this successfully?
28:37Now we create a number line.
Put on 0 and 3, pick a point in each of the 3 regions.
Remember I told you it doesn't matter what point you pick you'll always end up getting the sign.
So we pick a point like -1.
This will come out positive because it's squared.
That will be negative so this is negative, the function is going down.
29:05Now pick a value like positive 1.
This is positive, this is negative, so this is still going down.
Which means this is not a maximum or a minimum.
It's just going to be a place where it stops. It's actually going to be a flat spot.
And then if you pick a point bigger than 3 like 4 this will be positive and this will be positive so this goes up again.
29:35So this is not a maximum or a minimum.
This one is a minimum.
So what are the y coordinates?
Let's see when x=0 y is 2.
30:03And when x=3 y is -25.
Everybody agree with me?
To test the values, to test whether it's increasing or decreasing you're going to plug into the derivative.
30:31Because you want to find out the sign of the derivative.
You plug these into the original equation and this gets you y.
The y of the equation, well it says f(x) but y equals.
So what would this look like?
Do a function that's going down and gets to (0, 2) where it's definitely flat because the derivative is 0 but then it keeps going down.
31:06It must do something like that and then at (3, -25) it turns around again.
And when you do second derivative you can figure out a little better idea of its shape.
Like how do I know it does this? How do I know it doesn't do say that?
Well there's some more information we can pick up on the curve.
31:36Alright we'll give you another one. Maybe one that's not as strange.
32:33Okay try that one.
38:03Okay time's up.
Alright so same thing. We want ti find the derivative.
Set the derivative equal to 0 and find the critical values.
Test the regions. Helps you figure out what's a max, what's a min, what's neither, and then graph.
So derivative.
3x^2 -2x- 1.
38:33Factor that.
It factors into 3x and x on the left side, -1 and 1 on the right side.
This is equal to 0.
So either x= -1/3 or x=1.
39:00So one of those is the max and one of those is the min, we hope.
Make a number line.
Pick a number less than -1/3 say -1.
If you plug in -1 this is negative, this is negative. Two negatives make a positive, the function is going up.
Plug in a number between -1/3 and 1, like 0.
39:31When we plug in 0 this is positive, this is negative, so it's going down.
So we have a maximum at -1/3.
x= -1/3.
We have to find the y value in a second.
And now we try bigger than 1 like 2.
That's 7 and 1 those are both positive.
The function is going back up again.
We doing okay on that so far?
Okay now we want to graph that.
40:00So to graph it we're going to need y coordinates.
Oh look this is right here that's handy.
You see these cubics all have the same kind of shape.
So of course I could mess with you by not giving you a cubic equation.
So let's see our maximum is going to be at x= -1/3, y.
And our minimum is going to be there.
40:33So let's see. We take -1/3 and we plug it into the equation we get -27.
(-1/3)^3 - (-1/3)^2 - (-1/3) +2.
That's really annoying let's see.
That's -1/27 -1/9 which is -12/27.
41:14Plus a third which is 9 so that's 1/9? No -1/9 +2. So you get 1 and 1/9 or 10/9.
Is that what you guys got?
Am I wrong? Calculator check?
Or we didn't? Because nobody is speaking.
41:35Did you get 1.111111?
41/27.
You sure you put it in correctly?
You got you minus signs correct?
Well let's see this is -1/27.
This is -1/9.
42:01Plus 1/3 + 2.
So that's -1/27 -3/27 +9/27 +54/27.
Now I got 59/27. Totally different.
42:31So much for doing it in my head.
Can that be correct?
Well somebody can say yeah but that doesn't mean that person is right either.
Okay so sure let's go with 59/27.
It doesn't really matter because as I said on the test I won't give you 1/3 but frankly I expect you to be able to do that.
43:01And then the other one is easy.
1-1 is 0, minus 1 is -1 +2 is 1.
So that is (-1/3, 59/27) which is a little bigger than 2.
And (1, 1).
Okay how'd we do on that?
Alright so we'll do some more fun stuff on Wednesday.