Welcome everybody to our lecture on maximums and minimum values. Now we've turned a corner in our study of calculus. There's no more rules to memorize to find derivatives of the functions that we know. There's no magic or unknown operation, multi subtraction or something I can make up, where you don't know how to solve. You have all the rules to use to find derivatives, and we're pretty good at finding derivatives at this point. But now the idea is, we have our tools, what do we go do with them? If you can imagine a comparison like you're a carpenter, you're training, someone explained to you with a hammer is, and the wrench, and a screwdriver, and went through the whole toolbox, and now, of course, you're not done, it's just beginning. So the goal is we have these wonderful tools, we want to use the derivative and not just find them and show how they're useful. One of the main uses, if not the most important use you guys are going to use throughout your math career, is about optimization. Here's a beautiful mountain range, a picture that I did not take. I completely found this on a free stock photo, but it is my metaphor, my analogy of what we're doing. When we optimize, this is something that we try to do in everyday life. Optimization seeks the most efficient way to complete a task. Whatever that task may be, whatever class you're doing, you want to do it the best. What is the fastest algorithm for computer science? What is the maximum way to form a profit? What's the maximum profit we can get? What's the minimal cost that we can do that at? As we balance our day-to-day lives were so busy, how do we make sure we put in just the right amount of input so we get the maximum amount of output. These are things that we always want to do. It affects the most mundane small tasks worth pennies or seconds, where you can make millions in the stock market or something like that, or something of years of effort. Something that we're going to do, we're going to go for an advanced degree, and it's going take a long time. What is the way to optimize that experience? When we have functions, and we have these graphs, these are going to be the peaks and valleys of the function, the high parts and the low parts. The key to all of this is that this is where the tangent line is going to be zero. When you have a peak or valley, the tangent line has slope zero. It's a horizontal line. It's either horizontal or it's possible that it doesn't exist, and we'll see examples of both. But in this way, the study of optimization completely relies on the slope of tangent lines, which is of course related to the derivative. It's going to build on these ideas and tools that we developed prior. We're going to find exactly what these maximum and minimum values of the functions are. So we're going to find these peaks, we're going to find these valleys. So here, that's going to you way up there. if you're trying to maximize something. Then for those of us who would less risk would be down there doing things a little safer. So off we go. Let's begin. Let's c be a number in the domain of f of x. Here are some definitions for us. Then f of c is an absolute maximum value. If f of c is greater than or equal to f of x for all x, and it's a minimum value, absolute min, if it is less than or equal to f of x for all f. These definitions are a little where you can think about this as what's the highest point and what is the lowest point. Local mins. Very similar definition. We're going to say though for x near c, some point c, and for x near c, if it is a local minimum. So I'm less than that point. A picture is worth 1,000 words. Let's do a little of a picture here. I have some function, and it goes up, and it goes down, and maybe it does something else, I don't know, but we have some function here. So what is for this function, the absolute max, what's the highest value of this point? Well, the output, remember this is the output here, this is your absolute max, the peak of the mountain. Then down here, the smallest that the function ever gets, this is your absolute minimum. Like any point, has an x and a y value, usually when you talk about the maximum of the function, you talk about the y value, but you can certainly talk about what x-value gives you that. Functions can have more than one absolute max. If this function had another mountain that was the same exact height, then you can have more than one as well. So this is the idea, the mathematical definition of these values, sometimes called the extreme values. We put that down here, so these are your global extreme values. Global is the synonym for absolute. They just both mean that the highest it ever gets, and the lowest the function ever get. So we can look for these definitions. Of real life examples, when do we use these things? Peaks and valleys or mountain ranges, of course. Just go with my analogy, Mt. Everest, the absolute highest mountain on Earth. It's in the Himalayas there. It is, as we all remember, about 29,000 ft. Never been, but maybe someone's been. That would be the equivalent of the global maximum on earth, the highest point on earth. Sometimes we don't always want the absolute highest point on earth. Maybe we're just the hiker, and we're going in the United States. If we just restrict to North Carolina, what's the highest mountain in North Carolina? Well, in the Appalachian mountain ranges, Mount Mitchell, and that's a little 6,000 feet. That would be something our local max, when you restrict to a certain area and say what's the highest point in that area. What is the absolute maximum function, that can be very different than the local max or the local min of a function. Again, the output is identified as the extreme value, but sometimes they request both, so our goal is to find both. Let's do an example. Let's start with an example of a graph that's given where you don't know the function, you don't know the formula. We're just trying to just identify these points. What I want is, what is the global or also known as the absolute, what are the global and absolute max and min of the entire function of f of x. This will be my function f of x. Here we go. Let's find the absolute max. Stare at this graph. Where does this graph, get it's absolute max on its domain? The domain of this function, see the little arrows that they go up on this function, its domain is all reals. Where's the highest point? Now if you stare at this and say, "Wait a minute, there is no highest point, because this thing goes up and up and up to infinity forever." Then you're absolutely fine. That's right. Not every function has an absolute max. Let's ask the course the related question, what is the absolute min? Where's the lowest point on this graph? You scan the graph, you're looking for the absolute lowest point. We can label it over here. It's this little lowest point here on the valley at minus one and one. This is truly a little bit of a visual exercise. I don't give you the function and you just scanning the graph for the highest point and the lowest point, so I'll give you both coordinates here at minus one, minus one. Great, so that is on its domain. Now what if I want to restrict our view to only North Carolina to just some restricted region. What if I change the question a little bit? What I if restricted the domain to be minus two to eight? So I have a closed domain from minus two to eight, and I've tried to call out the values of the function here. At eight it's 10, and at minus two it is one, positive one. Now look at the graph. Imagine that the function did not go past, anything past these dots, the start and end point. Let me ask you the same question. What is the absolute max and what is the absolute min? Stare at the graph, think of what is the absolute highest point we could find and what is the lowest one. Now all of a sudden I have an absolute max. The highest the function gets on this restricted domain is at the value, eight comma 10. The absolute max, we would say happens at eight comma 10. The output is 10, so this thing does have an absolute max now. The absolute min however, has not changed, that is still at minus one. I want to point out what can happen here. The domain you define, the set that the function is defined on, plays a vital role in determining the global maximum, minimum values. They may change depending on the D, the domain you pick. It doesn't have to produce different results, but it can and that's something you should be aware of. Let's do one more example just to reinforce this. Here's another picture of a graph, its behavior as x goes to negative infinity, is that it goes to negative infinity as well, and as x gets large, it also goes to negative infinity. Its domain is all real numbers of a nice continuous graph. I'm not intentionally giving you the function yet. Just stare at this thing. What are the absolute or global, same thing, max or min of this function on its domain, on all reals? Stare at the function what's the highest and what's the lowest point. Hopefully, you can see very quickly since the arrows are indicating that it goes down forever, there is no absolute min. This thing gets lower and lower and lower, no matter what number you pick its going to surpass that, so there's no absolute min. There's none, and that's perfectly fine. You got lots of functions, don't have an absolute. What about an absolute max? Is there a highest point that this function reaches? This one actually has two. There are two little highest points here, and they occur at minus one, five and they also occur here at four comma five. Now it has two. You just list as many as they have because it's going to have more than one. The key here is that it's still possible to have no min, but you can have more than one max. That's perfectly fine. This is on its entire domain, on all reals. Now let's switch gears and do the same thing we did last time. Let's restrict the domain a little bit, so now let's set the domain to be this artificially restricted minus two to say six. Maybe it's a word problem where it doesn't make sense to have domain all reals. Let's just restrict from minus two to six. On your mind, you should imagine only seeing the graph over the domain from minus two to six. Let's ask the same questions again. Is there an absolute min? Is there a lowest point, lower than any other point in the graph, keeping in mind there may be more than one? In this case, there is. It's right at six. We're at six comma. Didn't really give you a y value, but let's make it minus five. Six comma minus five, is there an absolute max? Again, there is, and they don't change minus one comma five and four comma. So they could change, but they certainly do not have. In this example, we see once again that if you look and change the domain of the function, an absolute max or min may occur, whereas it didn't in the first example. So this leads us to our first theorem in this section called the extreme value theorem. So every function that we've considered so far has had both a global max and a global min on some given set, on some given dome. However, not every function on every set attains a global max and a global min. In fact, some have none, some have one, some have more than one. You just don't know. However, there are certain conditions when you can guarantee that global max and global mins will exist. This is the theorem that does that, it's called the extreme value theorem. So here it goes. If f of x is continuous on the closed interval from A to B, then f of x attains an absolute maximum value, f of c and an absolute minimum value f of d for some C and D on the closed interval A to B. This is the extreme value theorem, of course like the amount due theorem. It is like you need a guitar rift and some skateboarder to go by. It's like it's extreme. Then of course, the extreme is coming from the fact that they use extrema to represent max and mins. But realize when these conditions occur, if I have a continuous function. So that's the first thing you absolutely need to happen. You, can't have any jumps or asymptotes or holes in the graph. Nice continuous function. It's got to be on a close interval. You have to include your endpoints. Then f of x attains an absolute maximum value and an absolute minimum value. So here's my challenge to you just to see this theorem in action. Draw whatever you want, but without picking up your pencil. Draw some function starting at point A somewhere and going to point B. It doesn't matter where you go. Point B, above, below. Connect these two points some way, somehow. The only rule is you got to be a function so you can't double back on yourself. You have to pass the vertical line test. So if you draw something, whatever you want and try to draw it so that you don't have a max or a min. The idea is you can't, there's no way that you can. You will always have some high point. You will always have some low point. You may have more than one. That's perfectly fine. But it'll always happen as long as you don't pick up a pencil. If you start removing some of these conditions, you can break this. So for example, if you remove the fact that the function is continuous, let's put a hole in the graph at the maximum. Now I have a discontinuous function. I picked up my pencil, and I have a discontinuous function. So this graph now has no max because I defined it to be undefined. I drew a circle and a graph here, so the continuity requirement is absolutely needed. The other requirement that it's close prevents you from drawing the asymptote behavior. So what if I didn't include the end points? What if I got close to it but didn't touch. Maybe I have an asymptote at A and B. You can think of a graph, tangent or something where you get close, but you don't touch the close, [inaudible]. There's no max here and there's no min even just due to the behavior on the other side. So there's no max and there's no min, and that's because the function is defined on the open interval from A to B. So you absolutely need closure. Be careful these, especially in my true-false questions, they like to remove one or both of these conditions. So this theorem, this extreme value theorem, sometimes abbreviated as EVT for short, it is both incredibly useful and incredibly unhelpful. So on one hand, it's very powerful because it guarantees the existence of global extrema for large functions, just as it belongs on continuous, not a closed interval, then I'm great. But it does not tell you how to find these values. That's where it's super unhelpful. So we have to go off and do something else to find these things. As we develop an analytic approach, a systematic way to find these things, we need a little observation that's called Fermat's theorem. Fermat was a French mathematician. So put on your best French pronunciation here. Fermat's theorem, and it says the following; if a function has a local max or min at a value, so if you're trying to find something and if the function is differentiable, then the derivative has to be zero. You have some function with a hill and a valley, maybe more than one or whatever, and the function is doing it's thing. The observation, the link to calculus. This is why this gets a name, it's so important. Is if you look at the highest point and the lowest point, where there's local max or absolute max doesn't matter. These two are local because they are points lower and points higher. But for these two examples, if you consider the tangent line to these things, it is a horizontal line. The only point where the tangent line is horizontal with slope zero is where this function is a max, where this thing is zero. If I have a local max and the function is differentiable, then the derivative must be zero F prime of this point. Here's your first and your second C_1, C_2, F prime of C_1 is zero and F prime of C_2. This little observation, this connection to all the things that we've been studying is called Fermat's theorem and it starts to say where the derivative is equal to zero are places that we should look. They're so important, they get their own definition. They're called critical numbers. Here's the definition for you. A critical number of a function is an input C in the domain of F, such that either the derivative at C is equal to zero or the derivative at C does not exist. These numbers are critical, they're important. They tell us where to look. Let's do an example where we find these things and see how they're useful. First and foremost, let's keep things moving without the actual equation. We'll get there in a second. Let me give you a function here without an equation just so we can build our intuition of these things. Here's some functions defined on all reals, has lots of hills and lots of valleys. Here's the thing, here's the task for you. Find all critical numbers. Let me give you some values so we can do this. Let's say this is at minus one, this is at one, this is two. I'm labeling the x-axis here. Let's get it going a little further and we'll say this is 10. Critical numbers, remember the definition of critical numbers in the prior slide. It is where the function has derivative equal to zero, or the input produces the derivative that does not exist, something that's discontinuous, something that has a cusp. One of these two conditions. If you imagine the tangent line sliding around the local maxes and local mins by Fermat's theorem, we'll have horizontal tangent lines, which means their slope is in fact zero. There are one two three four critical numbers on this graph corresponding to, remember they're the critical numbers of the inputs. We have C equals minus one, we have C equals two, C equals four, and then C equals 10. The inputs give you the critical. Not every function has to have a derivative to find at all cases. If we mix this up and I give you a graph that's discontinuous or has a cusp, you have to look for something else. What if I gave you a graph with a cusp maybe and then a jump, now's a piecewise graph. Now the same question, what are the critical numbers? It's the same idea. You just have to remember that the definition. It's where the derivative is equal to zero or it's undefined. Derivative is this over the tangent line. Do you see any local maxes or mins? Are there any hills or valleys? In this case, no. However, there are two spots, let's give the zero one and two, label our x-axis here. There are two spots where the derivative is undefined. The derivative at zero is a cusp, so C equals zero is a critical point. Its derivative is undefined, and then C equals two is the other one. Here, the function is not differential because it's not continuous. I have two critical points here coming from the other condition, and of course you could have combinations of these things which you'll see as well. This is the graphical representation of the derivative. We'd like to now determine how to find critical numbers from the derivative. Let's do another example analytically. Let me give you a function here. Let's find all the critical points of a new function, X over X plus one. Find the critical points. Remember the definition of critical points, where is the derivative zero? Or where is it undefined? Of course step one is find the derivative. We can do quotient here, so we have bottom times the derivative of the top minus the top times the derivative of the bottom, all over the bottom squared. We can clean up the numerator or a little bit. Now it's in our interest to clean this up as I want to actually do something with it and try to use this to solve, so we'll get X plus one minus X all over X plus one squared. Of course the Xs cancel and you get one over X plus one quantity squared. We're looking for critical points. We want to ask ourself, where is this thing equal to zero? Or undefined? A fraction is zero when its numerator is zero. Let me ask you this. When is the number 1 equal to zero? The answer, of course is never. This has no solutions to zeros. There are no solutions here. This fraction is never zero. However, it does have spots where it's undefined. Where is a fraction undefined? Well, where its denominator equal zero. You could set the denominator equal to zero , but this one's simple enough, I think you can just solve it. This is at x equals minus one. The critical point for this particular function is only at x equals minus one. When you have a function on a closed interval. Say some closed interval D and will give the endpoints names a and b, it is extremely important that if you have some function, you realize through the examples you saw in this video that you can have a max or min at these end points. The problem is calculus is really bad at checking this, because it doesn't know that you artificially restricted the function to these points. Calculus can't read your mind or doesn't know how to read the question. It doesn't know to check if the end points a and b are in fact global extreme values. Let's do an example where we test this. F of x equals 2x cubed minus 3x squared minus 36x. You're going to have to be a little bit of a human here and not a math calculus robot and check this thing manually. This involves a little bit of a manual check. It's not hard to do, but you just have to remember to do it. We have the function 2x cubed minus 3x squared minus 36x on the interval minus three to two. It's a continuous function, it's a closed interval. The extreme value theorem guarantees that f of x will have a global max and a global min. Don't come back and be like, "Nope, there are none, sorry." Then you just negated a theorem there, that is not true. We need to go through the process to find the steps to do this. Step one, of course find the derivative. Let's find some critical points. If I take a derivative, I think this is simple enough. We could do 6x squared minus 6x minus 36. We want to set this equal to zero. We're trying to find our thing. There's no points where this is undefined. The critical points I'm looking for or only one is equal to zero. You can divide by 6x squared minus x minus 6 is zero. You can stare at this long enough, this factors is x plus 2, x minus 3. Solve for x, you get minus 2 and positive. Now we have to do a little bit of a check. Remember I only care about my domain from minus three to two. If I care about my domain, I have minus three to two. Well, guess what? We just found a value minus two, that says we should look at that thing for sure that's a good critical point. Three is beyond where I care about. It is not in the region I'm looking at, so we just throw it away. It's a perfectly good one of ours is considering all reals. But since I'm on the restricted domain, minus three to two, then we throw it away. We discard it from consideration. Now that's fine, we have our critical point at x equals minus two. The last thing to do is we have to find the max and mins for this example, global max and global mins. To find the global max and global mins, we're going to make ourselves a little table. We're going to have the x value and then we're going to have the y value or the output of the function. You always include the critical points, at least the ones that are in your domain. That's fine. If you plug in minus two, you can check me on this. You get 44. You also want to plug in your end points. This is the key thing to remember. This is where if you notice calculus never told you, "Hey check minus three, hey check positive two." You have to remember to check these manually. It is the end points of a function and because maybe it's a phrase in a word problem or modeling some specific behavior, you're restricting the domain. Calculus doesn't know to do that for you. If you plug in, you get minus three. F of minus three is 27 and f of two is minus 68. You can check all those numbers. We examined the outputs and we of course pick the largest and the smallest value as the global extrema. The largest one I see here of course is 44. That is my global or my absolute. Do you want to call it max? The smallest one I see is at minus 68. Remember you're always measuring the output. This is my global or absolute min. Most common mistake in this section is to not remember that critical points are also where the derivative is undefined. That's common mistake number 1. Common mistake number 2 is to not check endpoints if the domain is restricted, sometimes they call this the closed interval. Look for those two things. You know they're going to be on question to see who's paying attention. Watch out for those as you go through and find your global max and mins, your top of the mountain and bottom of the valley. Good job on this section. See you next time.