Flash and JavaScript are required for this feature.

Download the video from iTunes U or the Internet Archive.

**Topics covered:** Max-min problems

**Instructor:** Prof. David Jerison

Lecture 11: Max-min

## Related Resources

Lecture Notes (PDF - 1.1MB)

The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To make a donation, or to view additional materials from hundreds of MIT courses, visit MIT OpenCourseWare at ocw.mit.edu.

PROFESSOR: OK, we're ready to start the eleventh lecture. We're still in the middle of sketching. And, indeed, one of the reasons why we did not talk about hyperbolic functions is that we're running just a little bit behind. And we'll catch up a tiny bit today. And I hope all the way on Tuesday of next week. So let me pick up where we left off, with sketching. So this is a continuation. I want to give you one more example of how to sketch things. And then we'll go through it systematically. So the second example that we did as one example last time, is this. The function is (x+1)/(x+2). And I'm going to save you the time right now. This is very typical of me, especially if you're in a hurry on an exam, I'll just tell you what the derivative is. So in this case, it's 1 / (x+2)^2. Now, the reason why I'm bringing this example up, even though it'll turn out to be a relatively simple one to sketch, is that it's easy to fall into a black hole with this problem.

So let me just show you. This is not equal to 0. It's never equal to 0. So that means there are no critical points. At this point, students, many students who have been trained like monkeys to do exactly what they've been told, suddenly freeze and give up. Because there's nothing to do. So this is the one thing that I have to train out of you. You can't just give up at this point. So what would you suggest? Can anybody get us out of this jam? Yeah.

STUDENT: [INAUDIBLE]

PROFESSOR: Right. So the suggestion was to find the x-values where f(x) is undefined. In fact, so now that's a fairly sophisticated way of putting the point that I want to make, which is that what we want to do is go back to our precalculus skills. And just plot points. So instead, you go back to precalculus and you just plot some points. It's a perfectly reasonable thing. Now, it turns out that the most important point to plot is the one that's not there. Namely, the value of x = -2. Which is just what was suggested. Namely, we plot the points where the function is not defined. So how do we do that? Well, you have to think about it for a second and I'll introduce some new notation when I do it. If I evaluate 2 at this place, actually I can't do it. I have to do it from the left and the right. So if I plug in -2 on the positive side, from the right, that's going to be equal to -2 + 1 divided by -2, a little bit more than -2, plus 2. Which is -1 divided by - now, this denominator is -2, a little more than that, plus 2. So it's a little more than 0. And that is, well we'll fill that in in a second. Everybody's puzzled. Yes.

STUDENT: [INAUDIBLE]

PROFESSOR: No, that's the function. I'm plotting points, I'm not differentiating. I've already differentiated it. I've already got something that's a little puzzling. Now I'm focusing on the weird spot. Yes, another question.

STUDENT: Wouldn't it be a little less than 0?

PROFESSOR: Wouldn't it be a little less than 0? OK, that's a very good point and this is a matter of notation here. And a matter of parentheses. So wouldn't this be a little less than 2. Well, if the parentheses were this way; that is, 2+ , with a minus after I did the 2+ , then it would be less. But it's this way. OK. So the notation is, you have a number and you take the plus part of it. That's the part which is a little bit bigger than it. And so this is what I mean. And if you like, here I can put in those parentheses too. Yeah, another question.

STUDENT: [INAUDIBLE]

PROFESSOR: Why doesn't the top one have a plus? The only reason why the top one doesn't have a plus is that I don't need it to evaluate this. And when I take the limit, I can just plug in the value. Whereas here, I'm still uncertain. Because it's going to be 0. And I want to know which side of 0 it's on. Whether it's on the positive side or the negative side. So this one, I could have written here a parentheses 2+, but then it would have just simplified to -1. In the limit. So now, I've got a negative number divided by a tiny positive number. And so, somebody want to tell me what that is? Negative infinity. So, we just evaluated this function from one side. And if you follow through the other side, so this one here, you get something very similar, except that this should be-- whoops, what did I do wrong? I meant this. I wanted -2, the same base point, but I want to go from the left. So that's going to be -2 + 1, same numerator. And then this -2 on the left, plus 2, and that's going to come out to be -1 / 0-, -, which is plus infinity. Or just plain infinity, we don't have to put the plus sign in.

So this is the first part of the problem. And the second piece, to get ourselves started, you could evaluate this function at any point. This is just the most interesting point, alright? This is just the most interesting place to evaluate it. Now, the next thing that I'd like to do is to pay attention to the ends. And I haven't really said what the ends are. So the ends are just all the way to the left and all the way to the right. So that means x going to plus or minus infinity. So that's the second thing I want to pay attention to. Again, this is a little bit like a video screen here. And we're about to discover something that's really off the screen, in both cases. We're taking care of what's happening way to the left, way to the right, here. And up above, we just took care what happens way up and way down.

So on these ends, I need to do some more analysis. Which is related to a precalculus skill which is evaluating limits. And here, the way to do it is to divide by x the numerator and denominator. Write it as (1 + 1/x) / (1 + 2/x). And then you can see what happens as x goes to plus or minus infinity. It just goes to 1. So, no matter whether x is positive or negative. When it gets huge, these two extra numbers here go to 0. And so, this tends to 1. So if you like, you could abbreviate this as f plus or minus infinity is equal to 1. So now, I get to draw this. And we draw this using asymptotes. So there's a level which is y = 1. And then there's another line to draw. Which is x = -2.

And now, what information do I have so far? Well, the information that I have so far is that when we're coming in from the right, that's to -2, it plunges down to minus infinity. So that's down like this. And I also know that it goes up to infinity on the other side of the asymptote. And over here, I know it's going out to the level 1. And here it's also going to the level 1. Now, there's an issue. I can almost finish this graph now. I almost have enough information to finish it. But there's one thing which is making me hesitate a little bit. And that is, I don't know, for instance, over here, whether it's going to maybe dip below and come back up. Or not. So what does it do here? Can anybody see? Yeah.

STUDENT: [INAUDIBLE]

PROFESSOR: It can't dip below because there are no critical points. What a precisely correct answer. So that's exactly right. The point here is that because f' is not 0, it can't double back on itself. Because there can't be any of these horizontal tangents. It can't double back, so it can't backtrack. So sorry, if f' is not 0, f can't backtrack. And so that means that it doesn't look like this. It just goes like this. So that's basically it. And it's practically the end of the problem. Goes like this. Now you can decorate your thing, right? You may notice that maybe it crosses here, the axes, you can actually evaluate these places. And so forth.

We're looking right now for qualitative behavior. In fact, you can see where these places hit. And it's actually a little higher up than I drew. Maybe I'll draw it accurately. As we'll see in a second. So that's what happens to this function. Now, let's just take a look in a little bit more detail, by double checking. So we're just going to double check what happens to the sign of the derivative. And in the meantime, I'm going to explain to you what the derivative is and also talk about the second derivative.

So first of all, the trick for evaluating the derivative is an algebraic one. I mean, obviously you can do this by the quotient rule. But I just point out that this is the same thing as this. And now it has, whoops, that should be a 2 in the denominator. And so, now this has the form 1 - 1/(x+2). So this makes it easy to see what the derivative is. Because the derivative of a constant is 0, right? So this is, derivative, is just going to be, switch the sign. This is what I wrote before. And that explains it. But incidentally, it also shows you that that this is a hyperbola. These are just two curves of a hyperbola.

So now, let's check the sign. It's already totally obvious to us that this is just a double check. We didn't actually even have to pay any attention to this. It had better be true. This is just going to check our arithmetic. Namely, it's increasing here. It's increasing there. That's got to be true. And, sure enough, this is positive, as you can see it's 1 over a square. So it is increasing. So we checked it. But now, there's one more thing that I want to just have you watch out about. So this means that f is increasing. On the interval minus infinity < x < -2. And also from -2 all the way out to infinity. So I just want to warn you, you cannot say, don't say f is increasing on (minus infinity, infinity), or all x. OK, this is just not true. I've written it on the board, but it's wrong. I'd better get rid of it. There it is. Get rid of it. And the reason is, so first of all it's totally obvious. It's going up here. But then it went zooming back down there. And here this was true, but only if x is not -2. So there's a break. And you've got to pay attention to the break.

So basically, the moral here is that if you ignore this place, it's like ignoring Mount Everest, or the Grand Canyon. You're ignoring the most important feature of this function here. If you're going to be figuring out where things are going up and down, which is basically all we're doing, you'd better pay attention to these kinds of places. So don't ignore them. So that's the first remark. And now there's just a little bit of decoration as well. Which is the role of the second derivative.

So we've written down the first derivative here. The second derivative is now -2 / (x + 2)^3, right? So I get that from differentiating this formula up here for the first derivative. And now, of course, that's also, only works for x not equal to -2. And now, we can see that this is going to be negative, let's see, where is it negative? When this is a positive quantity, so when -2 < x < infinity, it's negative. And this is where this thing is concave. Let's see. Did I say that right? Negative, right? This is concave down. Right. And similarly, if I look at this expression, the numerator is always negative but the denominator becomes negative as well when x < -2. So this becomes positive. So this case, it was negative over positive. In this case it was negative divided by negative. So here, this is in the range minus infinity < x < -2 And here it's concave up.

Now, again, this is just consistent with what we're already guessing. Of course we already know it in this case if we know that this is a hyperbola. That it's going to be concave down to the right of the vertical line, dotted vertical line. And concave up to the left. So what extra piece of information is it that this is giving us? Did I say this backwards? No. That's OK. So what extra piece of information is this giving us? It looks like it's giving us hardly anything. And it really is giving us hardly anything. But it is giving us something that's a little aesthetic. It's ruling out the possibility of a wiggle. There isn't anything like that in the curve. It can't shift from curving this way to curving that way to curving this way. That doesn't happen. So these properties say there's no wiggle in the graph of that. Alright. So. Question.

STUDENT: Do we define the increasing and decreasing based purely on the derivative, or the sort of more general definition of picking any two points and seeing. Because sometimes there can be an inconsistency between the two definitions.

PROFESSOR: OK, so the question is, in this course, are we going to define positive derivative as being the same thing as increasing. And the answer is no. We'll try to use these terms separately. What's always true is that if f' is positive, then f is increasing. But the reverse is not necessarily true. It could be very flat, the derivative can be 0 and still the function can be increasing. OK, the derivative can be 0 at a few places. For instance, like some cubics. Other questions? So that's as much as I need to say in general. I mean, in a specific case. But I want to get you a general scheme and I want to go through a more complicated example that gets all the features of this kind of thing.

So let's talk about a general strategy for sketching. So the first part of this strategy, if you like, let's see. I have it all plotted out here. So I'm going to make sure I get it exactly the way I wanted you to see. So I have, it's plotting. The plot thickens. Here we go. So plot, what is it that you should plot first? Before you even think about derivatives, you should plot discontinuities. Especially the infinite ones. That's the first thing you should do. And then, you should plot end points, for ends. For x going to plus or minus infinity if there don't happen to be any finite ends to the problem. And the third thing you can do is plot any easy points. This is optional. At your discretion. You might, for instance, on this example, plot the places where the graph crosses the axis. If you want to. So that's the first part. And again, this is all precalculus.

So now, in the second part we're going to solve this equation and we're going to plot the critical points and values. In the problem which we just discussed, there weren't any. So this part was empty.

So the third step is to decide whether f', sorry, whether, f' is positive or negative on each interval. Between critical points, discontinuities. The direction of the sign, in this case it doesn't change. It goes up here and it also goes up here. But it could go up here and then come back down. So the direction can change at every critical point. It can change at every discontinuity. And you don't know. However, this particular step has to be consistent with 1 and 2, with steps 1 and 2. In fact, it will never, if you can succeed in doing steps 1 and 2, you'll never need step 3. All it's doing is double-checking. So if you made an arithmetic mistake somewhere, you'll be able to see it. So that's maybe the most important thing. And it's actually the most frustrating thing for me when I see people working on problems, is they start step 3, they get it wrong, and then they start trying to draw the graph and it doesn't work. Because it's inconsistent. And the reason is some arithmetic error with the derivative or something like that or some other misinterpretation. And then there's a total mess. If you start with these two steps, then you're going to know when you get to this step that you're making mistakes. People don't generally make as many mistakes in the first two steps.

Anyway, in fact you can skip this step if you want. But that's at risk of not double-checking your work. So what's the fourth step? Well, we take a look at whether f'' is positive or negative. And so we're deciding on things like whether it's concave up or down. And we have these points, f''(x) = 0, which are called inflection points. And the last step is just to combine everything. So this is this the scheme, the general scheme. And let's just carry it out in a particular case.

So here's the function that I'm going to use as an example. I'll use f(x) = x / ln x. And because the logarithm-- yeah, question. Yeah.

STUDENT: [INAUDIBLE]

PROFESSOR: The question is, is this optional. So that's a good question. Is this optional.

STUDENT: [INAUDIBLE]

PROFESSOR: OK, the question is is this optional, this kind of question. And the answer is, it's more than just-- so, in many instances, I'm not going to ask you to. I strongly recommend that if I don't ask you to do it, that you not try. Because it's usually awful to find the second derivative. Any time you can get away without computing a second derivative, you're better off. So in many, many instances. On the other hand, if I ask you to do it it's because I want you to have the work to do it. But basically, if nobody forces you to, I would say never do step 4 here. Other questions. All right.

So we're going to force ourselves to do step 4, however, in this instance. But maybe this will be one of the few times. So here we go, just for illustrative purposes. OK, now. So here's the function that I want to discuss. And the range has to be x positive, because the logarithm is not defined for negative values. So the first thing that I'm going to do is, I'd like to follow the scheme here. Because if I don't follow the scheme, I'm going to get a little mixed up. So the first part is to find the singularities. That is, the places where f is infinite. And that's when the logarithm, the denominator, vanishes. So that's f(1+), if you like. So that's 1 / ln(1+), which is 1 / 0, with a little bit of positiveness to it. Which is infinity. And second, we do it the other way. And not surprisingly, this comes out to be negative infinity.

Now, the next thing I want to do is the ends. So I call these the ends. And there are two of them. One of them is f(0) from the right. f(0+). So that is 0+ / ln(0+), which is 0+ divided by, well, ln(0+) is actually minus infinity. That's what happens to the logarithm, goes to minus infinity. So this is 0 over infinity, which is definitely 0, there's no problem about what happens to this. The other side, so this is the end, this is the first end. The range is this. And I just did the left endpoint. And so now I have to do the right endpoint, I have to let x go to infinity. So if I let x go to infinity, I'm just going to have to think about it a little bit by plugging in a very large number. I'll plug in 10^10, to see what happens. So if I plug in 10^10 into x / ln x, I get 10^10 / ln(10^10). Which is 10^10 / (10 ln(10)).

So the denominator, this number here, is about 2 point something. 2.3 or so. So this is maybe 230 in the denominator, and this is a number with ten 0's after it. So it's very, very large. I claim it's big. And that gives us the clue that what's happening is that this thing is infinite. So, in other words, our conclusion is that f of infinity is infinity. So what do we have so far for our function?

We're just trying to build the scaffolding of the function. And we're doing it by taking the most important points. And from a mathematician's point of view, the most important points are the ones which are sort of infinitely obvious. For the ends of the problem. So that's where we're heading. We have a vertical asymptote, which is at x = 1. So this gives us x = 1. And we have a value which is that it's 0 here. And we also know that when we come in from the-- sorry, so we come in from the left, that's f, the one from the left, we get negative infinity. So it's diving down. It's going down like this. And, furthermore, on the other side we know it's climbing up. So it's going up like this. Just start a little higher. Right, so. So far, this is what we know. Oh, and there's one other thing that we know. When we go to plus infinity, it's going back up. So, so far we have this.

Now, already it should be pretty obvious what's going to happen to this function. So there shouldn't be many surprises. It's going to come down like this. Go like this, it's going to turn around and go back up. That's what we expect. So we don't know that yet, but we're pretty sure. So at this point, we can start looking at the critical points. We can do our step 2 here - we need a little bit more room here - and see what's happening with this function. So I have to differentiate it. And it's, this is the quotient rule. So remember the function is up here, x / ln x. So I have a (ln x)^2 in the denominator. And I get here the derivative of x is 1, so we get 1 * ln x minus x times the derivative of ln x, which is 1/x. So all told, that's (ln x - 1) / (ln x)^2. So here's our derivative.

And now, if I set this equal to 0, at least in the numerator, the numerator is 0 when x = e. The log of e is 1. So here's our critical point. And we have a critical value, which is f(e). And that's going to be e / ln e. Which is e, again. Because ln e = 1. So now I can also plot the critical point, which is down here. And there's only one of them, and it's at (e, e). That's kind of not to scale here, because my blackboard isn't quite tall enough. It should be over here and then, it's slope 1. But I dipped it down. So this is not to scale, and indeed that's one of the things that we're not going to attempt to do with these pictures, is to make them to scale. So the scale's a little squashed. So, so far I have this critical point. And, in fact, I'm going to label it with a C. Whenever I have a critical point I'll just make sure that I remember that that's what it is. And since there's only one, the rest of this picture is now correct. That's the same mechanism that we used for the hyperbola. Namely, we know there's only one place where the derivative is 0. So that means there no more horizontals, so there's no more backtracking. It has to come down to here. Get to there. This is the only place it can turn around. Goes back up. It has to start here and it has to go down to there. It can't go above 0. Do not pass go, do not get positive. It has to head down here. So that's great. That means that this picture is almost completely correct now. And the rest is more or less decoration. We're pretty much done with the way it looks, at least schematically.

However, I am going to punish you, because I warned you. We are going to go over here and do this step 4 and fix up the concavity. And we're also going to do a little bit of that double-checking. So now, let's again-- just, I want to emphasize-- We're going to do a double-check. This is part 3. But in advance, I already have, based on this picture I already know what has to be true. That f is decreasing on 0 to 1. f is also decreasing on 1 to e. And f is increasing on e to infinity. So, already, because we plotted a bunch of points and we know that there aren't any places where the derivative vanishes, we already know it goes down, down, up. That's what it's got to do. Now, we'll just make sure that we didn't make any arithmetic mistakes, now. By actually computing the derivative, or staring at it, anyway. And making sure that it's correct.

So first of all, we just take a look at the numerator. So f', remember, was (ln x - 1) / (ln x)^2. So the denominator is positive. So let's just take a look at the three ranges. So we have 0 < x < 1. And on that range, the logarithm is negative, so this is negative divided by positive, which is negative. That's decreasing, that's good. And in fact, that also works on the next range. 1 < x < e, it's negative divided by positive. And the only reason why we skipped 1, again, is that it's undefined there. And there's something dramatic happening there. And then, at the last range, when x is bigger than e, that means the logarithm is already bigger than 1. So the numerator is now positive, and the denominator's still positive, so it's increasing. So we've just double-checked something that we already knew.

Alright, so that's pretty much all there is to say about step 3. So this is checking the positivity and negativity. And now, step 4. There is one small point which I want to make before we go on. Which is that sometimes, you can't evaluate the function or its derivative particularly well. So sometimes you can't plot the points very well. And if you can't plot the points very well, then you might have to do 3 first, to figure out what's going on a little bit. You might have to skip.

So now we're going to go on to the second derivative. But first, I want to use an algebraic trick to rearrange the terms. And I want to notice one more little point. Which I-- as I say, this is decoration for the graph. So I want to rewrite the formula. Maybe I'll do it right over here. Another way of writing this is 1/(ln x) - 1/(ln x)^2. So that's another way of writing the derivative. And that allows me to notice something that I missed, before. When I solved the equation ln x - 1 - this is equal to 0 here, this equation here. I missed a possibility. I missed the possibility that the denominator could be infinity. So actually, if the denominator's infinity, as you can see from the other expression there, it actually is true that the derivative is 0. So also when x = 0+, the slope is going to be 0. Let me just emphasize that again. If you evaluate using this other formula over here, this is 1/(ln(0+)) - 1/(ln(0+))^2. That's 1 over -infinity - minus 1 over infinity, if you like, squared. Anyway, it's 0. So this is 0. The slope is 0 there. That is a little piece of decoration on our graph. It's telling us, going back to our graph here, it's telling us this is coming in with slope horizontal. So we're starting out this way. That's just a little start here to the graph. It's a horizontal slope.

So there really were two places where the slope was horizontal. Now, with the help of this second formula I can also differentiate a second time. So it's a little bit easier to do that if I differentiate 1 over the log, that's -(ln x)^(-2) 1/x + 2 (ln x)^(-3) 1/x. And that, if I put it over a common denominator, is x (ln x)^3 times, let's see here, I guess I'll have to take the 2 - ln x. So I've now rewritten the formula for the second derivative as a ratio. Now, to decide the sign, you see there are two places where the sign flips. The numerator crosses when the logarithm is 2, that's going to be when x = e^2. And the denominator flips when x = 1, that's when the log flips from positive to negative.

So we have a couple of ranges here. So, first of all, we have the range from 0 to 1. And then we have the range from 1 to e^2. And then we have the range from e^2 all the way out to infinity. So between 0 and 1, the numerator is, well this is a negative number and this, so minus a negative number is positive, so the numerator is positive. And the denominator is negative, because the log is negative and it's taken to the third power. So this is a negative number, so it's positive divided by negative, which is less than 0. That means it's concave down. So this is a concave down part. And that's a good thing, because over here this was concave down. So there are no wiggles. It goes straight down, like this. And then the other two pieces are f'' is equal to, well it's going to switch here. The denominator becomes positive. So it's positive over positive. So this is concave up. And that's going over here. But notice that it's not the bottom where it turns around, it's somewhere else. So there's another transition here. This is e^2. This is e.

So what happens at the end is, again, the sign flips again. Because the numerator, now, when x > e^2, becomes negative. And this is negative divided by positive, which is negative. And this is concave down. And so we didn't quite draw the graph right. There's an inflection point right here, which I'll label with an I. And it makes a turn the other way at that point. So there was a wiggle. There's the wiggle. Still going up, still going to infinity. But kind of the slope of a mountain, right? It's going the other way. This point happens to be (e^2, e^2 / 2). So that's as detailed as we'll ever get. And indeed, the next game is going to be avoid being-- is to avoid being this detailed. So let me introduce the next subject. Which is maxima and minima.

OK, now, maxima and minima, maximum and minimum problems can be described graphically in the following ways. Suppose you have a function, right, here it is. OK? Now, find the maximum. And find the minimum. OK. So this problem is done. The point being, that it is easy to find max and the min with the sketch. It's very easy. The goal, the problem, is that the sketch is a lot of work. We just spent 20 minutes sketching something. We would not like to spend all that time every single time we want to find a maximum and minimum. So the goal is to do it with-- so our goal is to use shortcuts. And, indeed, as I said earlier, we certainly never want to use the second derivative if we can avoid it. And we don't want to decorate the graph and do all of these elaborate, subtle, things which make the graph look nicer and really, or aesthetically appropriate. But are totally unnecessary to see whether the graph is up or down.

So essentially, this whole business is out, which is a good thing. And, unfortunately, those early parts are the parts that people tend to ignore. Which are typically, often, very important. So let me first tell you the main point here. So the key idea. Key to finding maximum. So the key point is, we only need to look at critical points. Well, that's actually what it seems like in many calculus classes. But that's not true. This is not the end of the sentence. And, end points, and points of discontinuity. So you must watch out for those. If you look at the example that I just drew here, which is the one that I carried out, you can see that there are actually five extreme points on this picture. So let's switch. So we'll take a look. There are five places where the max or the min might be. There's this important point. This is, as I say, the scaffolding of the function. There's this point, there down at minus infinity. There's this, there's this, and there's this. Only one out of five is a critical point. So there's more that you have to pay attention to on the function. And you always have to keep the schema, the picture of the function, in the back of your head. Even though this may be the most interesting point, and the one that you're going to be looking at. So we'll do a few examples of that next time.

## Free Downloads

### Free Streaming

### Video

- iTunes U (MP4 - 109MB)
- Internet Archive (MP4 - 109MB)

### Caption

- English-US (SRT)

## Welcome!

This is one of over 2,200 courses on OCW. Find materials for this course in the pages linked along the left.

**MIT OpenCourseWare** is a free & open publication of material from thousands of MIT courses, covering the entire MIT curriculum.

**No enrollment or registration.** Freely browse and use OCW materials at your own pace. There's no signup, and no start or end dates.

**Knowledge is your reward.** Use OCW to guide your own life-long learning, or to teach others. We don't offer credit or certification for using OCW.

**Made for sharing**. Download files for later. Send to friends and colleagues. Modify, remix, and reuse (just remember to cite OCW as the source.)

Learn more at Get Started with MIT OpenCourseWare