 Hi, I'm Zor. Welcome to Unisor Education. Today I would like to continue talking about partial derivatives and what exactly the usage of them in researching the behavior of the functions. This lecture is part of the course of advanced mathematics for teenagers and high school students. It's presented on Unisor.com. And if you are watching this lecture from any other source, like from YouTube directly for instance, I do suggest you to switch to Unisor because it actually has the link exactly to the same lecture. But at the same time, you will have notes for every lecture, very detailed notes can be used as a textbook. And for certain topics, there are exams, so if you would like to be challenged, just do the exams. The site is free, by the way, and there are no even advertisements, so you're completely free with one-on-one with the studying. Alright, so now before talking about partial derivatives, let me just remind you one of the probably the main usage of the regular derivatives. Now you remember that if you have something like a local extreme maximum in this particular case or minimum, then the tangential line is parallel to the x-axis in this particular case. Which means that the first derivative of this function, well considering the function, is smooth enough. So the first derivative of this function in this particular point is equal to zero. And then we're using the second derivative to differentiate between maximum, where the second derivative is negative, because the angle is decreasing. Or in case it's a minimum, the angle is increasing, and that's why at this point, well the first derivative is also equal to zero, but the second derivative is positive. And then if the second derivative is negative, well we can deal with something like this. Remember, y is equal to x-cube. At this point, the first derivative is 3x square, and it's equal to zero, but it's not a minimum, not a maximum, right? It's an inflection point, that's how it's called. Now, I just reminded you this, because in case of the functions of two variables, we have exactly the same situation, but instead of regular derivatives, we will use part-shots. So, let me draw something, and I have to apologize for not being a good artist. So, let me try. Okay, let's consider we have a three-dimensional space to have representation of the function of two arguments, right? So, these are x and y, and this is z. And we're talking about some kind of a function which has, well let's talk about maximum in this particular case. And the way how I will represent it is something like this. So, I hope I have drawn a graph of the function which has a maximum at this particular point. Now, if this is the point of the maximum on the surface, and obviously I'm talking about local maximum, right? So, maybe somewhere else it goes, doesn't matter where, but in this particular point, it's a local maximum, which means everything from this point in its immediate neighborhood, maybe small neighborhood, whatever, is lower. The function has a smaller values than in this particular point. So, this is the point which, let's say, a and b. So, the point a and b function is f of x, y. And what I'm saying is that the point a, b is a local maximum, which means f of a, b is greater, well actually strictly greater. It's a real maximum. Greater than f of x, y, where x, y is some kind of neighborhood of a, b. So, if this is a, b, this is some kind of a neighborhood around a, b. And around this neighborhood, for any point x, y within this neighborhood, the value of the function would be less than the value at point a, b. So, this is the point of local maximum. Now, let's talk about partial derivatives. And again, we're assuming the function is smooth enough so partial derivative exists and they are continuous, etc., whatever is necessary. So, let's investigate the behavior, let's say, of the partial derivative of function f of x, y by x. Let's call it g of x, y. Because it's a function, right? Where partial derivative by one of the arguments is still the function of two arguments. So, how actually visualize the partial derivative by x? Well, we are holding y constant, right? So, we are holding y constant at point b in this particular case, that's what we need. And we are cutting our image of our function by a plane which is cutting through this, this is the plane. And the intersection will be one of these functions. Okay, one of these lines. So, let's assume that this is an intersection. This plane, which goes like this basically. Okay, it cuts our graph and this is the intersection. Now, the line which is parallel to x, y plane in this case at this particular point. Will obviously be a tangential line. And since this is the maximum point, right? Because everything we can consider out right now within this plane. And we are talking about only the function of one argument. And obviously, since this is a maximum point for an entire surface, it will be a maximum point within the section, within this plane. So, I have exactly the same situation as in case of the function of one argument. Which means my tangential line should be parallel to this line. Or basically the whole plane doesn't really matter, right? And it implies that my first derivative which is actually a tangent of this line should be equal to zero, right? Now, how can I prove it a little bit more rigorously? Well, that's actually very easy because what is a derivative? It's a limit of what? f of a plus delta x, y minus f of ay divided by delta x. As delta x goes to zero, right? That's with my partial derivative by x at this particular point. At point where I'm actually looking for this maximum point, right? Now, this is always negative, right? In the neighborhood of point AB. Why? Because, well, actually I can put y is equal to b in this case. Because we're looking about, we're looking at the partial derivative at point AB, right? So, y is equal to b, it's fixed. And from a, we go slightly by delta x. And we have this difference between the values of the function divided by difference in argument. Now, this is negative because f of AB is the maximum point. So, if we step from the left to the left or to the right by x, which means here or here, within this line. If we will step from the point A, we will only decrease the value of the function. So, this is negative. Now, this is, if we go to the left, would be negative. If we go to the right, would be positive. So, the ratio will be either negative on the left or positive on the right. Which means it should reach zero exactly at point AB. Now, similarly, we can fix the x and have the function h of x, y is a partial derivative by y at point AB. Now, what is that? Well, this is a limit f of A now is fixed, but B is incremented. Exactly the same thing, f of AB is the maximum within the neighborhood of A and B. Which means this would be smaller, so this is negative. And delta x, well, actually, I probably should put delta y. Not that it matters, but since it's incremented by y axis. So, my neighborhood around AB will have the point at AB is the maximum, so this is negative. And delta y, as it goes to zero, delta y, in this particular case, we are going along this from B to the left or to the right. So, from the left, I will have, this is, from the left, left means it's negative, right? So, this is negative and this is negative, so the function would be, the ratio would be positive. And if I switch to the right, the function will be, on top, I will have exactly the same negative. And on the right, I will have positive, so it changes the sign. So, this thing is changing the sign around point AB. Which means at point AB, it must be equal to zero. We are, again, we are considering that the function is smooth enough and the first derivative by y or by x, they are all continuous, right? So, if a continuous function is negative on the left and positive on the right, it should be zero in the middle, right? Okay, so basically that's a more rigorous proof. But from the purely geometrical standpoint, it's also obvious that partial derivatives which represent a tangential line parallel to one of two axis is supposed to be equal to zero. Tangential line is supposed to be parallel, so the partial derivative is supposed to be equal to zero. So, that's basically the kind of analogous situation to the function of one argument. Over there, we have one single derivative which is equal to zero at the point of maximum or minimum or inflection. And in this particular case, as I have just demonstrated with the maximum and it can be absolutely the same way demonstrated with the minimum, both partial derivatives are equal to zero. Now, let me now talk about necessary and sufficient conditions. Again, as in the case with functions of one argument, equality of the first derivative to zero is not a sufficient condition for maximum or minimum. Because as I was saying before, it can be an inflection point like y is equal to x cubed where the derivative is equal to zero at this point. Same thing in this case, in the case of functions of two arguments, it's a necessary condition. So, if the function is reaching its maximum, then the partial derivatives are equal to zero. Or if it's minimum, it's also, but it's not a sufficient condition for either of those because there might be mixed cases when the function has something which we call a saddle point. So, let me just explain what saddle point is. It's an equivalent of inflection for functions of one argument, but now we have two arguments. And again, I should really apologize for my artistic representation of the saddle point. It's really not easy, but if you can imagine how the saddle really looks. Okay, so let me talk about the saddle. Well, let's consider that we have a horse. Oh, this is the horse. Does it look like a horse? Okay, that's not the case. The case is a saddle on it. Saddle has very interesting property. It goes around the horse, right? So, it goes here and on that side of the horse. But whenever we want to sit, we have a little bit raising here and here, right? But if we look from the top, then the situation will be like this. If this is the horse body, then my surface goes like this around the horse, but like this for the person to sit on it, right? So, it's not a maximum or minimum because in this direction, I mean, if I will cut it this way, I will have the maximum point. But if I will cut it this way, I will have minimum point. So, this is basically a combination of this, if I can say so. So, in the vertical section perpendicular to this direction, I will have the maximum, but if I will have the section parallel to horse body, I will have this. So, that's what saddle actually is. And this is a very interesting surface because it has actually both partial derivatives equal to zero, exactly equivalently as the inflection point in case of function of one argument. And there are many examples of this and one of the examples which I have will be exactly like this. So, now the next question is minimum or maximum or a saddle point. I mean, how can they differentiate? Now, you remember that with the functions of one argument, we were using the second derivative. If my second derivative was positive and the first, obviously, we are talking about first derivative is equal to zero at point x is equal to a. So, in this case, we are talking about minimum. If my first derivative is zero at x is equal to a, but the second derivative is positive, then we are talking about maximum. Because again, here, in case of a minimum, our tangential line is, in case of minimum, it's like this, right? So, tangential line is increasing the angle, but in case of maximum, tangential line decreasing. So, this is monotonically increasing and that's why the second, this function is monotonically increasing and that's why the second derivative is positive. In this case, the first derivative is monotonically decreasing. Maximum is this. Maximum is this and minimum is, no, vice versa. So, again, my first derivative is equal to zero at this point, but around this point, since it's a maximum, it's decreasing the angle. If it's a decreasing function, then the second derivative is negative. In this case, my minimum is, so it reaches the zero at point of the minimum, but the angle is increasing. For increasing function, my second derivative is positive. Now, there is an equivalent of this type of research done with the help of the second derivative. There is an equivalent for functions of two arguments and here it is. And unfortunately, I cannot really prove it because it's rather involved, but it's a criteria. Let's put it this way. It's a very important criteria. Well, let's calculate the following thing. I will use the same symbol, delta, but it's not the same as before when I was incrementing the arguments. Now it's just basically an expression which I'm going to present to you. Okay, here it is. It's a second derivative by x times second derivative by y minus mixed derivative. So, this is much more complicated expression. Now in this case, just second derivative. In this case, since we have two variables, we have two different second derivatives, and this expression which combines together all second derivatives. Second derivative by x, second derivative by y. I should have put here. And second derivative by a mixture, first by x and then by y, or first by y and then by x. It doesn't really matter, right? So, whenever you are calculating this particular expression, you can use it to differentiate between minimum and maximum and saddle point. And here is the criteria. Now if this delta is less than zero, it's a saddle point. If this is greater than zero, it's max or minimum. Now how to differentiate between max and minimum? This. If my second derivative by x is greater than zero, it's minimum. If it's less than zero, it's maximum. So, why x and not y? Well, actually it doesn't really matter because they have the same sign. Otherwise, if they have different signs, then this thing is definitely negative, right? Because this will be negative and this minus of positive because it's a square, so it will be negative. So if this is positive, it means they have the same sign. Second derivative by x and second derivative by y. Either of them can serve in this particular case. I can put dx2 or dy2. It's the same thing. Both of them are simultaneously greater or simultaneously less than zero to make delta positive. So these are the criteria. And again, I'm sorry I cannot prove that this is exactly the valid criteria, but I can illustrate it with examples. Let me go to examples. So I have two examples. One of them has maximum and another has a settle point. So my function is, okay, let's start from interpreting this graphically. Now, obviously, whenever x and y, they are both squares, so it's always positive, which means that the minimum value of this of the denominator would be when both of them are zero. And if they are growing, then denominator growing. Now, since it's a denominator, the whole fraction would do in reverse. So at x and y equal to zero, we will have maximum. And as x and y go to infinity, then we will have the whole function growing to zero. So basically, it looks like this. It's like a hat, basically, right? With smooth lines. Now, obviously, this is the point of a maximum. So let's check if our criteria are basically do whatever we are saying they're supposed to do. Well, first of all, derivatives. Now, the first derivative by x is equal to, now, this is, y is fixed, x is a variable. So this is one over something. So it would be minus this something square, right? And then, inner function would be derivative of this, which is 2x. So that's my first derivative. Now, my first derivative by y is equal to absolutely similarly. Okay, when are they equal to zero? Well, the denominator is not equal to zero at all, so it's always positive. So the only value is x is equal to zero and y is equal to zero. That's the point where my both partial derivatives are equal to zero. Now, let's talk about second derivative. Well, actually, not just second derivative, but second derivatives. We need all the second derivatives. So we need second derivative by x square, which is derivative of this by x. All right? So what I will do is I consider it as a product of minus 2x and one over. So as a product, I have to put 2x times derivative of this thing. One over this expression square. Now, that would be minus one over this expression to the force times derivative of the inner function times, now this is the square of something. So it's 2 times this times derivative of what's inside. I'm using chain rule again and again and again, times 2x. So what do we have as a result? Well, this is plus 6x square and this would be 1 plus x square plus y square to the third, right? Am I right? I'm not sure. Did I do it right? Let me just think again. This is x times, okay, that's correct. Now, and then I have to add to this whatever I have here, times the derivative of this. So it would be minus 2 divided by 1 plus x square plus y square. So again, let me just explain what I did. How to differentiate this? I consider it minus 2x times one over this thing square. It's like a product, which means it's first times derivative of the second plus second times derivative of the first, right? So the first component minus 2x times derivative of one over this thing square, which is minus to the fourth degree times derivative of the inner, which is 2 this, and times derivative of inner this, which means this. And plus, I have to have derivative of this one multiplied by one over this thing square. So derivative of the 2x would be minus 2, and this remains the same. Now, if I will use the common denominator, so I have to multiply this by 1 plus x square plus y square, it would be 6x square minus 2 minus 2x square minus 2y square, divided by 1 plus x square plus y square to the third. Is that right? I have slightly different result. Oh, that's 8, that's why. It's not 6, it's 8, because it's 2, 2 and 2. So now I have 6, 8 instead of 6, or 6x square minus 2y square minus 2 divided by 1 plus x square plus y square. Okay, now this corresponds to whatever I have now. That's good. So let me write it down here. 6x square minus 2y square minus 2 divided by 1 plus x square plus y square to the power of 3. Okay, now let's do the second derivative by y. Well, now here I will cheat a little bit, because they are kind of symmetrical. Instead of x, I should substitute y, and then this will be changed into this. So I will do exactly the same thing. It's 6y square minus 2x square minus 2 divided by this. It's not much of a cheating, actually, because it's obvious, since if we are just substituting instead of xy instead of yx, x square plus y square will be exactly the same, but in this I will have this, or from this I will have this. So that's why I symmetrically changed x to y and got exactly the same thing. And the third component we have to calculate is second derivative by a mixture. So I have to differentiate, let's say, this by y or this by x doesn't really matter. Now, if I will differentiate this by y, for instance, minus 2x is a constant, right? So it's remained without change. And then I have to calculate basically the derivative by y of this thing, which is 1 over this thing to the fourth with a minus sign, right? Times, times, inner function would be 2 times 1 plus x square plus y square times 2y, which is equal to minus and minus plus 2, 2 and 2 is 8xy divided by 1 plus x square plus y square. This is fourth and this is one, this is numerator, this is denominator, so it's 3. That's it. So I have all three second derivatives. By the way, again, this is symmetrical relative to x and y, as it's supposed to be, right? Because d2 by dx dy should be equal to d2 by dy dx. And since we have a function which is symmetrical in the very beginning, then we should have it symmetrical as well, because it's by x and by y. Okay, so these three components. Now, what should we do? We have to do multiply this by this and minus this square, right? So what will that be? At point x is equal to 0 and y is equal to 0, right? So now we can just substitute x0 and y0 and what do we have? Well, we have minus 2. Everything else is 0, minus 2, because everything else is 0 and 0. If x and y is equal to 0. So it's multiplication of this by this, which is minus 2 times minus 2, minus square of this, which is 0 square, which is equal to 4. It's positive. And since it's positive, as we have just told before, we have either minimum or maximum, but not the saddle point. If it's negative, it's a saddle point. But if it's positive, it's minimum or maximum. Now, what is it, minimum or maximum? And the recipe says, pay attention to the sign of the second derivative by one of the arguments, this or this. And it's negative. And since the second derivative is negative, then we are talking about maximum as we had on the picture. So that's it. That's the whole research using the second derivatives. So again, my first derivative is used to find out where exactly is a stationary point. Stationary point is where my both derivatives are equal to 0. I don't remember if I told you this terminology, stationary point. That's where both derivatives are equal to 0. Okay, second is about the saddle point, actually. So my function is x times y. Now, I don't dare even to start drawing this thing. It's kind of complicated, the saddle. It looks very simple, but it's really kind of difficult to draw. But on unizor.com in the notes, I have actually all the pictures. Maximum, minimum, saddle point, and in particular this function is also graphed over there. So let's do it basically using the apparatus of calculus. My first derivative, but in this case, it's much easier than the previous. My first derivative by x is equal to y. My first derivative by y is equal to x. Now, when are they both equal to 0? Well, again, obviously at point 0, 0. Now, we need the second derivatives to find out what exactly this is. Now, the second derivative is this by x is equal to 0. Because by x, and this is the constant, y is supposed to be constant. Same thing, df by dy square. Because this is x, we are differentiating by y. So it's also 0. And the mixture, oh, that's not the mixture. This is the mixture. So first by y, we get x, and then by x, we get 1. Or vice versa. First by x, we get y, and then by y, we get 1 again. As usually, they are supposed to be the same. And now, this time, this minus this square. So 0 times 0 minus 1 square, which is equal to minus 1. Negative, this delta is negative, which signifies that this guy, this function, has a saddle point at 0. And it's kind of understood, because if you will look at this function from both x and y positive, you will have that it obviously grows this way. And let's say you're going along x, y, z. So if you go along this line, so at this point, it's equal to 0. Now, along this way, if you're increasing both x and y positive, function is increasing, so function would be growing. Now, if you continue this bisector to both negative, when both negative, it will also grow, so it will go to this. So if you will cut it along the plane, which is bisecting this angle between x and y and going through the z axis. So going through the z axis and dissect the x, y angle, you will get this type of things. Now, if you go in a perpendicular direction along this plane, so it's going, the plane goes through z, but it bisecting a different angle between positive y and negative x. Well, if one of them positive and other is negative, then the result will be negative. And the more absolute value the further we go along this particular thing, it will go down. So it goes up here and down there. So that's what actually explains the saddle point. And again, it's a saddle point based on these calculations as well. Okay, so that's it. I do recommend you to take a look at the Unisor.com. This particular lecture, it has nice pictures, which I have borrowed, obviously, from the web. And it makes actually your understanding of all these concepts a little bit better. Now, what I didn't really do and I kind of feel sorry about this, I did not prove that this time, this minus square of this gives you a good indication of whether it's a maximum or minimum or saddle point and how to use the second derivative to differentiate between maximum and minimum. Well, I will check again. Maybe I will present this particular proof in writing in one of the... But you can probably always find it on the Internet anyway. All right, so that's it for today. Thank you very much and good luck.