AI Assistant
Transcript
00:07:30Paolo Guiotto: So today, we start, completing an exercise, we, indeed, they estimate?
00:19:980Paolo Guiotto: It's always something which is not working, dear.
00:23:570Paolo Guiotto: Okay, so we were, studying this problem. We have this function of three variables, XYZ. We computed limit at infinity. We proved that the limit is plus infinity. We determined the stationary points, so point… question 2.
00:41:420Paolo Guiotto: After a long discussion, we found that the station… well, we had not yet completed, in fact. We missed just one part of this. So, at the end, let me quickly review. So, when we write the condition gradient F equals zero, we get the system.
01:01:450Paolo Guiotto: We split it into two cases, X equals 0,
01:05:810Paolo Guiotto: From which, basically, we get a unique solution, which is, the solution 000.
01:11:970Paolo Guiotto: And X different from 0.
01:15:370Paolo Guiotto: For which we get a longer discussion that,
01:20:470Paolo Guiotto: yields, at the end, 4 alternatives, 2 comes from there, and we found points 1 over 12, 1 over 12, 1 over 12, and minus, minus
01:29:940Paolo Guiotto: Plus, and from this one.
01:32:940Paolo Guiotto: Here, we still should solve X different from 0, Y is equal to minus X. Since X is different from 0, we cancel that factor, and therefore we have two possibilities. One is, so, X different from 0.
01:48:90Paolo Guiotto: Y equal minus X, then Z equal X. We plug this into the last line, we get 3X squared.
01:58:770Paolo Guiotto: Equala, minus X divided 4.
02:04:350Paolo Guiotto: or another sub-case, which is X different from 0, Y equal to minus X, and then we have this, Z is minus X.
02:16:330Paolo Guiotto: And plugging this into the last line, we get still 3X squared equal minus Z, which is minus X or plus X, divided 4.
02:27:400Paolo Guiotto: So, since X is different from 0, we can simplify this X with this, so we get here…
02:35:510Paolo Guiotto: Paul Inter.
02:37:250Paolo Guiotto: X equals minus 1 over 12.
02:40:660Paolo Guiotto: Then Y is minus Z, so 1 over 12, and Z is X minus 1 over 12.
02:47:810Paolo Guiotto: Which seems to be new, yes?
02:50:210Paolo Guiotto: And from the last case, similarly, we simplify by X because it is different from 0, so we get here x equals 1 over 12, Y is minus X, so minus 1 over 12, and Z is minus X as well, so minus 1 over 12.
03:06:180Paolo Guiotto: So, at the end, we have these 4 points, plus
03:10:760Paolo Guiotto: the point 000. Okay, so these are the stationary points of F. It remains to discuss the last question.
03:20:50Paolo Guiotto: So that is a determined minimum-maximum
03:24:460Paolo Guiotto: Minimum maximum of F on R3. What can be said?
03:28:430Paolo Guiotto: So now we have to combine the, what we have done in the first two points. So we say that, here we have this information, so since
03:41:830Paolo Guiotto: limit
03:44:250Paolo Guiotto: at infinity of F is plus infinity, definitely there cannot be a maximum for F on a tree.
03:55:440Paolo Guiotto: But… By the same reason, And, because…
04:06:320Paolo Guiotto: But I think you're showing me that.
04:08:270Paolo Guiotto: In any case, okay.
04:10:290Paolo Guiotto: Yeah, but you are here, Juanita, I don't know if those who are away.
04:14:320Paolo Guiotto: So because, where is it?
04:20:140Paolo Guiotto: And because F is continuous on R3,
04:24:930Paolo Guiotto: Which is, closed, And, unbounded, plus…
04:36:750Paolo Guiotto: the limit, plus this, we have that there exists the minimum of F on R3.
04:46:50Paolo Guiotto: So, let XYZ be a minimum point.
04:56:500Paolo Guiotto: Now, here we are in the case that necessarily this point belongs to the interior of the domain, because the domain is open, no? So, this belongs to the interior of a tree, because this set coincides with a tree.
05:10:980Paolo Guiotto: IF3 is also open, not only closed.
05:17:70Paolo Guiotto: So, necessarily… recite that, I think.
05:24:350Paolo Guiotto: that the function f is differentiable on R3, no? So Fermat theorem applies, so… since… F is…
05:36:560Paolo Guiotto: differentiable on… 3… Belmont.
05:45:470Paolo Guiotto: theorem applies.
05:51:150Paolo Guiotto: And, necessarily, this says that gradient of F at this point is zero.
05:57:830Paolo Guiotto: So it means that this point must be one of the stationary points. So it's one of those points, and therefore we have to evaluate the function to see what happens.
06:08:460Paolo Guiotto: So, we have that F at 000 is easy because it is equal to 0.
06:15:570Paolo Guiotto: At, well, let's see, the function is…
06:23:810Paolo Guiotto: Is this, huh?
06:26:280Paolo Guiotto: We have to evaluate at those points plus, minus 1 over 12. Well, you may notice that there are always two components with minus, and one with plus, or three components with plus.
06:38:940Paolo Guiotto: This is important because the plus-minus, you don't fill the plus-minus into these squares, into the first part, so it's always the same value.
06:49:730Paolo Guiotto: While in that 3-point product, XYZ, it depends, you know, if you have plus-minus, but since you have always 2 minus and 1 plus, or T plus, this is always the same value, you see? Because minus, minus is plus. So, for all those points.
07:08:890Paolo Guiotto: F, let's say, other points.
07:12:430Paolo Guiotto: I don't want to write the definition, but, you know, these are these four points, is… so, we have 1 over 12 squared.
07:23:590Paolo Guiotto: plus 1 over 12 squared, etc, 3 times, so 3 over 12. This is squared minus X times Y times Z, which is always equal to 1 over 12.
07:34:590Paolo Guiotto: So we have 1 over 12 cubed, therefore we have 9 over 12 to power 4 minus 1 over 12 to power 3, that I can write 12 over 12 to power 4, so it is minus 3
07:48:820Paolo Guiotto: Over 12 to power 4, which is definitely negative, and therefore the value is less than this 1.
07:56:230Paolo Guiotto: So since the minimum is one of these points, we conclude that all points Boyants…
08:05:470Paolo Guiotto: 1 over 12, 1 over 12, 1 over 12… And, company.
08:14:150Paolo Guiotto: R… global… Minimum.
08:19:370Paolo Guiotto: points.
08:21:320Paolo Guiotto: 4F… on Artel.
08:26:390Paolo Guiotto: Well, there is actually a lot… I don't know if in this problem… let me check…
08:36:720Paolo Guiotto: Where is it.
08:42:200Paolo Guiotto: That is perhaps a last question.
08:45:820Paolo Guiotto: Yes, determine the image of our tree.
08:49:900Paolo Guiotto: So, let's tell just a few words about this. What is F of R3?
08:56:240Paolo Guiotto: Well, in general, F of a set stands for the image of that set to the map F. So this is…
09:04:500Paolo Guiotto: the set of values FXYZ taken by F when XYZ belongs to… R3.
09:16:690Paolo Guiotto: Of course, we cannot determine all these values, but there is an important property
09:21:630Paolo Guiotto: I hope that you have done this little pattern connected set that says, since this is a connected set.
09:30:210Paolo Guiotto: Connected… set. Connected means made of one single piece, no?
09:38:70Paolo Guiotto: So it's not a union of disjoint sets of R3. In this case, it is the full space, so it cannot be.
09:47:740Paolo Guiotto: So, there is an important fact that says that if F is a continuous function, and R3 and domain D is connected.
09:57:490Paolo Guiotto: made of one single piece. Also, the image of this is connected.
10:07:180Paolo Guiotto: So, made of one single piece.
10:09:650Paolo Guiotto: In R, sets made of one single piece are only of one type.
10:15:220Paolo Guiotto: So, clearly, an interval is a set of… made of one single piece, but only an interval can be of this type. So, necessarily, if F is real value, this set is
10:29:750Paolo Guiotto: And… interval.
10:35:240Paolo Guiotto: So you know that this is an interval. At what interval?
10:39:520Paolo Guiotto: So, in our case, F at 3 is an interval.
10:43:60Paolo Guiotto: And this, takes all possible values of F, so if you have a minimum.
10:47:820Paolo Guiotto: it will start from the minimum to the maximum, if you have the maximum. In this case, we do not have a maximum, and that can take values up to plus infinity, so we have to consider that the right end point will be plus infinity.
11:03:740Paolo Guiotto: And about the left-hand point, we have the value of the function at the minimum point included, because this value is achieved by F. It is exactly minus 3 over 12 to power 4, so that's the minimum value, and that's the image of the interval. So this is just to give you a feedback on this question.
11:24:340Paolo Guiotto: Okay.
11:26:120Paolo Guiotto: So, the next two problems involves the,
11:33:390Paolo Guiotto: A question concerning the classification of stationary points, which is the topic we are going to see today. So let's now switch to the new
11:42:80Paolo Guiotto: slide, so let's,
11:46:790Paolo Guiotto: talk about this. So, let's start…
11:51:670Paolo Guiotto: from, this remark. So, we say that
12:01:330Paolo Guiotto: that, Let's say that if, X star is… Annie.
12:10:670Paolo Guiotto: Minimum.
12:13:80Paolo Guiotto: or maximum.
12:15:130Paolo Guiotto: point.
12:16:880Paolo Guiotto: for F… in the interior of a domain DE, In interior.
12:26:270Paolo Guiotto: of the… And F is differentiable, of course.
12:33:30Paolo Guiotto: The Fermat theorem says that gradient F is equal, at that point, X, Is equal to zero.
12:43:580Paolo Guiotto: But we say that this condition
12:46:390Paolo Guiotto: does not characterize minimum, does not distinguish between minimum and maximum. You may have that gradient is zero, but the point is not the minimum, it's not the maximum. We have seen examples, and moreover, if we are not in the interior, the gradient could be even different from zero, okay?
13:04:990Paolo Guiotto: So, what… what is the message is that, however, Well, let's say, in general.
13:18:250Paolo Guiotto: In general, condition Gradient F.
13:25:800Paolo Guiotto: At X star equals zero, that's not…
13:36:210Paolo Guiotto: Ensure… That… X star is… a minimum.
13:47:280Paolo Guiotto: Or a maximum.
13:49:200Paolo Guiotto: Well, this type of conditioning applications of mathematics are called first or the… condition.
14:02:870Paolo Guiotto: First order, because there is the first derivative, that's why.
14:06:570Paolo Guiotto: So it would be nice to understand under which circumstances, when you have gradient of F equals 0, you have found a maximum or a minimum.
14:16:970Paolo Guiotto: And there is a special important case that I will introduce with the figure.
14:21:720Paolo Guiotto: And this figure will be made for a function of one single variable. So even for a function of one single variable, derivative equals zero does not imply that you have found a minimum or a maximum, no?
14:33:620Paolo Guiotto: for a function of one PL variable, you could have derivative equals zero here, so tangent horizontal. You could have derivative equals zero here, again.
14:45:360Paolo Guiotto: But you could have also derivative equals zero in points like this, where the function is flat, but it's not a minimal-maximum point.
14:55:990Paolo Guiotto: However, if you have a function like this.
15:02:550Paolo Guiotto: When the tangent is zero, it's exactly at the maximum point. While, when you have a function like this.
15:11:210Paolo Guiotto: When tangent is 0, it's exactly at minimum point.
15:15:280Paolo Guiotto: So what this function have spatial here?
15:18:690Paolo Guiotto: Well, this type of functions are functions where the concavity has a precise form. We say that this function at left is concave.
15:31:340Paolo Guiotto: And this function is convex.
15:35:610Paolo Guiotto: Okay? Now, you may remember that, in practice, to say if a function is conca-convex for functions of one real variable, you look at
15:46:250Paolo Guiotto: The second derivative.
15:47:820Paolo Guiotto: So you have to expect that here we are going to introduce the second derivative of our function. But before we do that, let's start giving a definition for what could be a concave function. Now, we need,
16:02:590Paolo Guiotto: definition. So, there are several definitions, depending on what kind of generality you want to
16:08:30Paolo Guiotto: have. So, the definition I'm now giving here is not perhaps the most gen… it's not definitely the most general definition, but it is the most useful for our, for our consideration. So, you see what characterizes the concavity
16:27:670Paolo Guiotto: Is that if you pick any generic point on the function, and you suppose that there is a tangent, so the function is differentiable.
16:38:430Paolo Guiotto: you may say the tangent is increasing. That's not the case, because if you take point here, the tangent here is decreasing.
16:46:560Paolo Guiotto: But what characterizes, geometically, this property is that the tangent is a line that cuts the plane in two parts.
16:54:220Paolo Guiotto: And the graph of the function is, in this case, always below the tangent.
17:00:50Paolo Guiotto: While for the right case, for the convex caser, if you do the same, and you take the tangent at different points, you see that the tangent
17:11:140Paolo Guiotto: The graph of the function is above the tangent, so that's what distinguished it
17:16:950Paolo Guiotto: A way that we could distinguish the two functions. Okay? So, 4 and F…
17:27:10Paolo Guiotto: function of one real variable. So here we are on an interval AB of the real line, just to be clear that this is a function of one single variable.
17:37:730Paolo Guiotto: we… However… That, huh?
17:44:430Paolo Guiotto: So, the function F, Ease.
17:48:40Paolo Guiotto: concave.
17:51:620Paolo Guiotto: If… And only if… well, let's write in words, then we'll write a condition, analytical condition, F…
18:02:70Paolo Guiotto: ease.
18:04:480Paolo Guiotto: Below… Each… off.
18:10:860Paolo Guiotto: It's… tangents.
18:20:640Paolo Guiotto: Or maybe we… Writing read this.
18:26:530Paolo Guiotto: And, F is… convex… If and only if… F is above.
18:42:110Paolo Guiotto: each… Off.
18:45:530Paolo Guiotto: It's… tangents.
18:50:200Paolo Guiotto: Okay? Now, how do we write this thing?
18:53:640Paolo Guiotto: remind that it's written each, okay? That's very important, because,
18:58:680Paolo Guiotto: So, let's say that let's write one tangent, then we take each. So, this means that, let's help with the epider. This is the function. I take a point, a generic, let's call X0,
19:13:920Paolo Guiotto: I want to say that the function f It's always below the tangent at point X0,
19:22:890Paolo Guiotto: Well, this has an equation, this has equation y equal f prime X0 times X minus X0 plus FX0.
19:36:220Paolo Guiotto: That's the equation, the Cartesian equation of the tangent line to the graph of the function f.
19:44:730Paolo Guiotto: Yeah, I know that this does not look to be too much standard, but however, you understand?
19:49:680Paolo Guiotto: By point X0, no? So this is point X0, FX0, and that's the equation of the dot.
19:56:850Paolo Guiotto: So how do you say that the function is below? You say that F of X at the generic point X
20:04:380Paolo Guiotto: well, maybe you see better here. F of X here, this is the value f of x.
20:10:360Paolo Guiotto: is smaller than the value you have here on the blue line. So F of X is less or equal than f prime, X0,
20:19:310Paolo Guiotto: times X minus X0, plus FX0.
20:25:540Paolo Guiotto: This must be for every act, sir.
20:28:500Paolo Guiotto: Where you have the domain, huh?
20:31:670Paolo Guiotto: And this is saying that function f is below this particular tangent, the tangent by point X0. If I want to say
20:40:890Paolo Guiotto: is below each of its tangents. This is 1.
20:45:500Paolo Guiotto: tangent. It's not…
20:47:310Paolo Guiotto: every tangent. I have to say, 4 also for every X0 in D, because this means that you change X0, you change the tangent, but you still keep the function below the tangent, okay?
20:59:710Paolo Guiotto: So, we have this definition. We can now say definition.
21:05:260Paolo Guiotto: So if I have a function F,
21:07:280Paolo Guiotto: Function of variable X, defined on domain B, real value.
21:12:870Paolo Guiotto: This is a real… domain.
21:15:950Paolo Guiotto: differentiable.
21:18:540Paolo Guiotto: on V… So, F is concave, on the… If…
21:34:600Paolo Guiotto: this condition holds. F of X
21:38:530Paolo Guiotto: is less or equal than F prime at zero.
21:42:410Paolo Guiotto: times X minus X0, plus F at point X0. This, for every X and X0 in domain D.
21:53:870Paolo Guiotto: Now, for every X means the function is below. For every X0 means for every tangent. They have, apparently different meaning.
22:03:460Paolo Guiotto: And similarly, we will say that F is convex.
22:14:210Paolo Guiotto: Well, if the opposite happens. So, if the function is above, it will be greater or equal.
22:20:10Paolo Guiotto: If F of X is greater or equal than f prime X0 times X minus 0 plus FX0, that's for every Xx0 in T.
22:36:920Paolo Guiotto: Okay, now we are ready to export this definition, that is a definition for functions of one DM variable to functions which are functions of vector variable.
22:47:890Paolo Guiotto: So, we now extend… Extend.
22:55:750Paolo Guiotto: this.
22:57:470Paolo Guiotto: definition to the case, F is a function of vector variable, of course, still numerical.
23:10:60Paolo Guiotto: Because, of course, you cannot expect that I can say f of x greater or equal if f of x is vector.
23:15:430Paolo Guiotto: So the definition is literally the same. Of course, we have to replace F prime with the gradient
23:23:100Paolo Guiotto: And remind that X, X0 here will be vectors. So we have a function F, function of vector X, defined on domain D, which is now a subset of a multidimensional space, RD, real-valued.
23:40:570Paolo Guiotto: F, differentiable, on D.
23:45:780Paolo Guiotto: We say, That… F.
23:54:220Paolo Guiotto: is concave.
23:58:350Paolo Guiotto: on.
24:00:740Paolo Guiotto: If… Though.
24:03:220Paolo Guiotto: Look, we take this, f of x less or equal, so we start writing the same thing.
24:09:810Paolo Guiotto: only now X, the variable for F, is a vector.
24:14:260Paolo Guiotto: less or equal than… instead of F prime x0, I will write a gradient of F, at point X0.
24:24:770Paolo Guiotto: Now, this is no more an algebraic product. This… here, F prime times X minus X0 is the product between number F prime and number X minus X0.
24:35:450Paolo Guiotto: We know that F… gradient F is a vector now, and X minus X0 is a vector as well, no?
24:41:290Paolo Guiotto: And, so what is the interpretation of this? Exactly as in the definition of differentiability. That's a product, line vector times column vector, one line times one column. If you want, this could be identified with the scalar product between the two vectors.
24:57:00Paolo Guiotto: Plus, plus F of, X0.
25:02:880Paolo Guiotto: And this solves for every X.
25:05:510Paolo Guiotto: for every X0 in domain D.
25:09:600Paolo Guiotto: And, F is convex.
25:15:870Paolo Guiotto: on D if we'll write the dual definition. F of X will be greater or equal than gradient of F at point X0,
25:27:950Paolo Guiotto: times.
25:29:460Paolo Guiotto: X minus 0, line by column, plus F of X0.
25:36:900Paolo Guiotto: Again, for every X, index 0.
25:40:780Paolo Guiotto: in domain B.
25:44:220Paolo Guiotto: Now, the interesting fact is that if the function is concave on a domain, and you have a point, a stationary point of F, then necessarily that point is the maximum point, exactly as expected from these figures. We say that
26:00:790Paolo Guiotto: For a concave function, left figure here, at the point where the gradient is zero, you have exactly a maximum. You do not have anything else than this.
26:09:950Paolo Guiotto: Okay? Now, this happens to be true also for this definition, so we have this proposition.
26:20:190Paolo Guiotto: So, if F equal F of X, is differentiable.
26:27:910Paolo Guiotto: And… concave.
26:36:140Paolo Guiotto: on D… Stationary.
26:43:120Paolo Guiotto: point.
26:44:860Paolo Guiotto: Poor.
26:46:370Paolo Guiotto: F… is necessarily
26:54:540Paolo Guiotto: a global Maximum… for… F on D.
27:04:780Paolo Guiotto: So in this case, if you know that the function is concave.
27:09:80Paolo Guiotto: Solving gradient F equals 0 is exactly the maximum point.
27:14:660Paolo Guiotto: And in fact, if gradient of F equals 0, in that case, you could also prove that there is only one solution, so you have a unit maximum, not just…
27:24:280Paolo Guiotto: You say, you have seen, even today, you know, we have done an exercise where we found that there are, for example, 4 minimum points.
27:35:700Paolo Guiotto: Which is not strange, no, the function can have several minimums, several maximum. But if it is concave or convex, this reduces a lot the number of maximum. Let's see if it's a one-line proofing factor.
27:50:170Paolo Guiotto: Because, if you take the concavity, which is this property here.
27:59:620Paolo Guiotto: and you write the concavity property at point X0, which is a stationary point for F, you get this. So, let…
28:09:880Paolo Guiotto: X0, be a stationary point
28:15:680Paolo Guiotto: for F. So, gradient F at point X0 is 0.
28:23:440Paolo Guiotto: Then, by… concavity, We know that the function f is below
28:33:100Paolo Guiotto: each of its tangents according to this condition. So we have that, right in the concavity exactly at that point X0, we would have f of x is less or equal than gradient of F at point x0,
28:48:590Paolo Guiotto: times X minus X0, plus… F of X0.
28:56:260Paolo Guiotto: And this would be for every X. I do not write for every x0, because X0 is a well-precise point, a point where gradient is 0.
29:05:40Paolo Guiotto: But since this is 0, what is the result of the action vector gradient times vector X minus X0? You are multiplying zero line by column, by something. The product will be 0.
29:18:150Paolo Guiotto: all this will be equal to zero. So from this, you read that F of X
29:24:750Paolo Guiotto: is less or equal than f of x0, whatever is X in the domain D. And what does it mean, this?
29:33:960Paolo Guiotto: It means precisely that that point X0 is the maximum for the function, because at point x0, you take the biggest possible value of F.
29:45:10Paolo Guiotto: And similarly, you will have a dual statement if the function is convex.
29:51:530Paolo Guiotto: At point where gradient is zero, you have a minimum.
29:54:800Paolo Guiotto: Okay?
29:55:920Paolo Guiotto: Now, this is… let's say that if you… if you study a bit of applications, a bit of problems that you have in economics, where you have all ways to optimize some profit, some wealth, or something like this.
30:12:50Paolo Guiotto: They always have, because of certain economical principle, concave functions, because the idea is that the value of money is not the same
30:22:540Paolo Guiotto: It depends on… on how much money you have, because if you are poor, one single dollar makes… if you have nothing, let's say, one single dollar makes the difference between eating nothing and eating something.
30:36:260Paolo Guiotto: If you are a billionaire, one single dollar won't change your life, you see. So that's why the utility of money is a function, well, you see in this way, is a function of this type, because the larger is the amount of money you have, the smaller will be the net increase of utility of that money.
30:56:660Paolo Guiotto: So it's… in these problems, concavity is… in economics, in general, concavity is,
31:03:840Paolo Guiotto: Very important, it's a key concept. And that's why you will see always reading, for example, scientific papers where they solve optimization problems, they never care about checking if you are in these conditions, because they just say maximum found by solving this equation.
31:23:410Paolo Guiotto: Now, in general, this is not correct. We said that solving this equation won't give you maximum points, and perhaps the maximum is not even a point for which this is verified. But, if the function is concave, this becomes true. And that's why it's so important in this kind of problems.
31:43:900Paolo Guiotto: Okay, so now the point is, how do we determine if a function is concave? You may imagine that probably
31:52:740Paolo Guiotto: we won't use this condition to verify if a function is concave, because it's practically impossible that you proceed that way. And that's exactly as you have for functions of one variable. If this is the condition, you never check in this way that
32:09:840Paolo Guiotto: the function is concave or convex. But you know that there is, another test.
32:17:320Paolo Guiotto: That works if you have supplementary information. So, this test is still suggested by the figure. So look at the left figure, we have a concave function. Look at the slope of the tangent line.
32:32:650Paolo Guiotto: The slope means look at the angular coefficient, which is the value of the derivative. For example, you see that at the left here, derivative is positive. When you move to the right, the tangent is like rotating on the graph.
32:48:810Paolo Guiotto: You see that here it is still positive, but with a value which is smaller than the previous one. At this point, you have tangent equals zero, then it starts to be negative, and when you move to the right, the slope is going to become bigger negatively, okay?
33:07:770Paolo Guiotto: So, this suggests that the angular coefficient, the derivative, is a decreasing function. And for the right figure, you have the opposite. The derivative, the tangent, is an increasing function.
33:20:440Paolo Guiotto: And since you know that there is a test to check monotonicity, which is,
33:26:480Paolo Guiotto: Taking the derivative of that quantity and checking the sign.
33:30:530Paolo Guiotto: You could say that the function is concave, basically, if the derivative of not F, but f prime, which is called the second derivative, is positive, concave, sorry, is negative, and convex is positive. So you needed to introduce this second derivative.
33:47:350Paolo Guiotto: So that's now what we want to do here, so…
33:51:430Paolo Guiotto: The question is, how… to… Check.
33:58:950Paolo Guiotto: concavity.
34:03:820Paolo Guiotto: or convexity.
34:09:170Paolo Guiotto: Well, let's refresh that, if F is a numerical function, f of x, with X real, F…
34:21:870Paolo Guiotto: twice.
34:23:880Paolo Guiotto: differentiable.
34:25:800Paolo Guiotto: This means that there exists the derivative of the derivative.
34:31:340Paolo Guiotto: What we call the second derivative, that we usually write with this.
34:37:900Paolo Guiotto: Then we have this, test, then, on intervals.
34:46:60Paolo Guiotto: So, on domains, which are intervals. F is concave.
34:53:580Paolo Guiotto: If, and only if the second derivative is negative, F is convex.
35:01:80Paolo Guiotto: If and only if the second derivative is positive.
35:05:870Paolo Guiotto: Okay? Now, we want to do something similar, and so the first thing is we need to understand what should be the secondary.
35:14:690Paolo Guiotto: We… Want to… to extend.
35:24:170Paolo Guiotto: this.
35:25:930Paolo Guiotto: idea.
35:29:510Paolo Guiotto: two functions F equal F of vector variable X.
35:35:300Paolo Guiotto: The first step is to understand what is the second derivative, what kind of object it is. It's a question that makes sense, because we have seen that the first derivative
35:46:760Paolo Guiotto: is what? If we have a numerical function, the first derivative is a vector, it's the gradient. If we have a function which is vector value, the derivative is a matrix, the Jacobian matrix. So, it makes sense to understand what kind of object should be the second derivative.
36:03:40Paolo Guiotto: So, the first step is,
36:13:540Paolo Guiotto: steps.
36:16:280Paolo Guiotto: what is… F second at point X.
36:24:860Paolo Guiotto: Well, let's imagine a function, F,
36:28:250Paolo Guiotto: Here, function of vector variable X,
36:32:870Paolo Guiotto: X belongs to some domain D of RD,
36:39:70Paolo Guiotto: Since the second derivative will be the derivative of the first derivative, we have to assume, first of all, that there is a derivative of this cell.
36:47:940Paolo Guiotto: F differentiable, on the… So…
36:53:730Paolo Guiotto: the derivative is well-defined, and what kind of object it is? Well, we know that derivative is the gradient of F,
37:00:990Paolo Guiotto: Which is, as function of X, is a function defined on D, contained in RD, to what?
37:11:250Paolo Guiotto: Hmm?
37:14:420Paolo Guiotto: 2?
37:15:650Paolo Guiotto: R… are what?
37:20:980Paolo Guiotto: What kind of object is the gradient is?
37:26:140Paolo Guiotto: YM? What is M? So I have a function of two variables. What is the gradient? Is… Awesome.
37:36:470Paolo Guiotto: I want to know what kind of object is.
37:40:190Paolo Guiotto: What is the nature of this?
37:43:20Paolo Guiotto: Ease,
37:45:900Paolo Guiotto: That's a function of three variables. The gradient is an array of three components.
37:53:620Paolo Guiotto: Okay? So, it has the same number of components as the number of variables, so it's a vector of RD.
38:02:460Paolo Guiotto: Okay? If we want to see precisely, gradient F at point x is a vector made by…
38:10:30Paolo Guiotto: The partial derivative of F with respect to the first variable, evaluated at point X. Second.
38:16:530Paolo Guiotto: The partial derivative of X with respect to the second variable, still evaluated at point X, and so on, until you finish the variables. The last one is the T variable, so the partial derivative with respect to XD, let's call it.
38:30:830Paolo Guiotto: of F evaluated at point X, no?
38:35:190Paolo Guiotto: So the gradient is a function that's, we can say, from RD to RD.
38:42:540Paolo Guiotto: So now, imagine that, so let's use a notation. I do not use the letter F, again, because this is now used for F, so let's call G this function. So definitely, this is a function of vector variable X, but it's no more a numerical function, this one.
39:01:930Paolo Guiotto: This is a function of, where the values are vectors.
39:07:170Paolo Guiotto: So now you understand why we need to have the derivative of these type of functions from NRD to NRN, because when I take the derivative, the gradient, this is a function from RD to RD, so its derivative
39:22:380Paolo Guiotto: The derivative of this thing is the derivative of a function of this type, and what is the derivative of this?
39:28:990Paolo Guiotto: Now, if… Gradient F… Ease.
39:35:460Paolo Guiotto: differentiable, So there existed the derivative of the gradient. The derivative is no more a vector. Is…
39:47:160Paolo Guiotto: What kind of object is the derivative of that G?
39:51:790Paolo Guiotto: is a matrix. What kind of matrix?
39:56:290Paolo Guiotto: Yeah, that's the name, and it's called Jack Obiometics, but how many lines, how many columns?
40:05:830Paolo Guiotto: It's a D by D matrix. In particular, it's a square matrix.
40:10:00Paolo Guiotto: Then, each derivative.
40:17:820Paolo Guiotto: will be a Jacobian matrix.
40:22:180Paolo Guiotto: Jacobian metrics.
40:27:840Paolo Guiotto: is a D by D matrix.
40:35:160Paolo Guiotto: Okay? So, made how… let's refresh this.
40:41:320Paolo Guiotto: If G… If I average it, so forget for a moment of the gradient. If I average it.
40:47:250Paolo Guiotto: function of array X.
40:51:470Paolo Guiotto: That is defined on domain D of RD.
40:55:940Paolo Guiotto: with values in RD,
41:00:90Paolo Guiotto: How do I compute the Jacobian matrix? I need the complex of this G. So now, since G of X is an array.
41:08:610Paolo Guiotto: It will have…
41:10:340Paolo Guiotto: exactly this number of components, so there will be a G1X, a G2X, a G3X, etc. There are D components, so there will be D functions of X.
41:26:460Paolo Guiotto: So if these are the components, the Jacobian matrix of this G, so what we call the G prime of X,
41:35:170Paolo Guiotto: is a D by D matrix, so D lines, D columns, where? How is the line of this matrix?
41:43:760Paolo Guiotto: The first line is you take G1, and you compute all partial derivatives of G1 with respect to all the variables. There are D variables, so you have D1, G1,
41:55:710Paolo Guiotto: the 2G1.
41:58:420Paolo Guiotto: Gee, what?
42:00:90Paolo Guiotto: et cetera, until you finish DDG1.
42:03:940Paolo Guiotto: Then, you take the second component, G2, and you compute all the partial derivatives of G2. So, you have D1, G2.
42:13:410Paolo Guiotto: D2G2.
42:15:440Paolo Guiotto: D3G2, D, D…
42:17:860Paolo Guiotto: G2, etc, until you finish the components. Last one is GD. So you start D1GD, D2GD, and so on, D, D, G, D.
42:31:980Paolo Guiotto: And you have your Jacobian metrics.
42:37:980Paolo Guiotto: I wanted to say something here, but I missed.
42:43:80Paolo Guiotto: Okay, now let's apply this to this particular… Yes, what I want to say is that you may notice that this line is…
42:54:520Paolo Guiotto: Is exactly the gradient of…
42:57:800Paolo Guiotto: Yes, that's a convenient way to set this Jacobian matrix. So if you have the components G1, G2, GD of this function, capital G,
43:07:940Paolo Guiotto: The lines of this matrix are big gradients of the components. So you see here, first line, gradient of G1, second line, gradient of G2, etc. Last line, gradient of GD.
43:21:310Paolo Guiotto: So this is a way to write the Jacobian matrix a bit, say, compact with respect to this one.
43:28:990Paolo Guiotto: Now, let's plug into this thing, into this mess, let's say, this, this is our G.
43:36:360Paolo Guiotto: So the components you see there, where they are, are these ones, okay? So if now…
43:43:580Paolo Guiotto: G is the array made of
43:48:630Paolo Guiotto: is the array made of the gradient of F?
43:52:230Paolo Guiotto: at point X, so you have derivative with respect to X1 of F, evaluated at point X, etc. Derivative with respect to X2 of F, etc. Derivative with respect to XT of F. So these are the G1, G2, G, D,
44:12:10Paolo Guiotto: Now, you plug this into that box, and you get that…
44:17:560Paolo Guiotto: this. So, DG is what? Is now the derivative of the gradient, which is the derivative of F. So, this is what we will call second derivative.
44:27:740Paolo Guiotto: Okay? Of F. You see the point? I start from F, I compute its derivative, this is the gradient. Now I am doing the derivative of the gradient, and this is the second derivative of F. At least it is what we will call second derivative, and we use this notation.
44:44:750Paolo Guiotto: We use gradient square of F, at point X, huh?
44:52:810Paolo Guiotto: So it's a D by D matrix.
44:56:400Paolo Guiotto: What are the entries? Look, the first line, I have to do the derivatives of G1. You see, there is always the same G1 here, here, here. Who is G1? It is this.
45:08:950Paolo Guiotto: So you have to take the partial derivative of F with respect to the first variable, and compute all the partial derivatives with respect to the variables. So you will have derivative with respect to the variable X1 of what? Of D1F.
45:28:270Paolo Guiotto: Then you have derivative with respect to variable X2 of what? Still of D1F.
45:34:380Paolo Guiotto: et cetera, until you finish. DD of D1F.
45:40:190Paolo Guiotto: Second line, you take the second component, which is this one. The partial derivative with respect to X2, and you compute all the partial derivatives. So you will have D1 of D2F,
45:52:840Paolo Guiotto: D2 off D2F.
45:56:210Paolo Guiotto: etc. DD of D2F. And you continue like that until you finish. Last line, you have D1 of DDF,
46:07:140Paolo Guiotto: D2 of DDF, D, B of DDF.
46:17:290Paolo Guiotto: So that's the second derivative.
46:21:570Paolo Guiotto: Now, it's better if we start simplifying a bit the notations. So what is the generic element that you find in this table here?
46:30:330Paolo Guiotto: At the line, say… Then let me… so line I and column J.
46:39:80Paolo Guiotto: So this element here is… so the… since you are taking line I, you see that this corresponds to the inside derivative. So I take DIF, and I do the DJ of this DIF.
46:54:510Paolo Guiotto: Okay, we give a name to this.
46:57:290Paolo Guiotto: Well, actually, the double dot means that we are defining this. We call this a second derivative, second partial derivative.
47:07:680Paolo Guiotto: Look, first I do… if you have to compute this, you have to take your F, the first thing you do is compute this derivative. So you do the partial derivative goes back to Xi.
47:20:100Paolo Guiotto: Once you have done this, you take what you get and you differentiate the respect to X.
47:25:440Paolo Guiotto: So, the order is…
47:27:590Paolo Guiotto: Let's say you first do the derivative with respect to Xi, and then you do the derivative with respect to XJ of F.
47:37:600Paolo Guiotto: The order is, for the moment, important.
47:41:180Paolo Guiotto: So, switching the two, in principle, does not give the same value, okay? Actually, for nice functions, it will be the same. We will see in a moment, okay? And we call this second…
47:57:670Paolo Guiotto: partial.
48:01:490Paolo Guiotto: derivative.
48:05:130Paolo Guiotto: Sometimes you see these notations, Rod, the… notations…
48:14:330Paolo Guiotto: For example, in engineering, in physics, you often use this D2F with respect to something DXJDXI, something like this. So if you see, this symbol is exactly what we are doing.
48:31:930Paolo Guiotto: Okay, so let's see an example. Take a simple example just to, to have a little bit of confidence with this concept. Let's take a simple function, fxy equal… I just write a random expression, XY squared plus Y.
48:49:890Paolo Guiotto: Okay?
48:50:990Paolo Guiotto: So, let's check that it is twice differentiable, so there exists a second derivative.
48:57:460Paolo Guiotto: Let's check.
49:02:960Paolo Guiotto: That.
49:05:360Paolo Guiotto: F… ease.
49:07:940Paolo Guiotto: Twice.
49:09:380Paolo Guiotto: differentiable.
49:11:930Paolo Guiotto: And, computer.
49:17:100Paolo Guiotto: this second derivative of F at the genetic point X1.
49:22:780Paolo Guiotto: Now, the first step is that I need the first derivative, so the gradient.
49:27:900Paolo Guiotto: So, we start computing the gradient.
49:31:240Paolo Guiotto: To compute the gradient of F, I need to compute the two partial derivatives with respect to X and with respect to Y. Here, of course, as usual, since there are just two variables.
49:41:170Paolo Guiotto: It's not a good idea to use indexes, you just use two different electors. Well, dx of F is, what, Y squared? DYF is 2XY plus 1.
49:56:710Paolo Guiotto: From this, you see that they are both continuous functions, so F is differentiable.
50:04:300Paolo Guiotto: Okay?
50:05:770Paolo Guiotto: Now I have to compute the derivative of the gradient. So look at the gradient as a new function, no? And you want to compute its Jacobian matrix of this.
50:15:360Paolo Guiotto: So, the gradient of F is now, as function of XY, is this. First component is Y squared, second component, 2XY plus 1.
50:27:130Paolo Guiotto: Okay, so call… I am using denotation, so I use the bova just to show you what we have done in, in general in this particular case.
50:40:210Paolo Guiotto: Now, this function is a function defined on R2. You take point XY, and it gives you a vector with two components, so a vector of R2.
50:53:260Paolo Guiotto: Now, to check differentiability, what we do is we compute partial derivatives of G1, G2, we check that they are continuous, and then we will have differentiability, and finally, we compute the Jacobian matrix, okay? So, I start with G1,
51:12:250Paolo Guiotto: G1 has two derivatives. There is the derivative… the derivative with respect to X of G1, and the derivative with respect to Y of G1.
51:21:100Paolo Guiotto: Remind that,
51:23:250Paolo Guiotto: By the way, that this… what we are doing here is the DX of G1. Who is G1?
51:29:580Paolo Guiotto: G1 is this one, it's the first component of the vector, so it is the DX of F. So what we are doing is the dx of dx of F.
51:39:910Paolo Guiotto: That's what we are doing. And that's precisely exactly the first entry of this matrix.
51:45:870Paolo Guiotto: You derive twice with respect to the first variable.
51:49:270Paolo Guiotto: Now, this is… if we do the derivative with respect to X, we get 0. If we do derivative with respect to Y, we get 2Y.
51:57:680Paolo Guiotto: Okay? And clearly, they are both continuous. Then I start with G2, I have DX of G2, DY of G2.
52:08:230Paolo Guiotto: G2 is this, so the DX of this is 2Y, the DY is 2X.
52:14:910Paolo Guiotto: They are both continuous.
52:17:140Paolo Guiotto: So, all the partial derivatives of all the components of this function, gradient, are continuous, so by the differentiability test, I conclude that the gradient of F is differentiable.
52:32:910Paolo Guiotto: And its derivative is the second derivative of F,
52:38:270Paolo Guiotto: Is the matrix, which is a 2x2 matrix, two lines, two columns, because
52:44:620Paolo Guiotto: This is the situation I have. So, in the first line, I have these two entries, the two derivatives of G1. So, 0, 2Y, and in the second line, I have the two derivatives of G2. So, 2Y2X.
53:02:920Paolo Guiotto: And here you see the second derivative.
53:05:420Paolo Guiotto: It's a 2x2 matrix.
53:08:660Paolo Guiotto: Okay.
53:11:70Paolo Guiotto: What are these entries? So, remind that.
53:15:510Paolo Guiotto: This one is… what is this, dx of G1, which is DX, DX, F?
53:23:450Paolo Guiotto: So it is what we call the DXXF.
53:27:300Paolo Guiotto: The second one, the 2Y, is… is… this one comes from this, so it is the DY of G1. G1 is the DX of F, this is the DY
53:38:800Paolo Guiotto: XF, so we do first derivative. Let's, you should read this in this way. This is the first derivative, this is the second. This is the order of the two operations.
53:49:770Paolo Guiotto: Which is different from the other you see here. I know that you see the same output, 2Y, but this 2Y is this one. This 2Y here is this.
54:01:370Paolo Guiotto: which is the X of G2. G2 is DY of F. So that's the opposite, DYXF, and this is DYYF.
54:13:770Paolo Guiotto: Okay.
54:16:500Paolo Guiotto: So let's do another example. What if I have a function of three variables, F, X, Y, Z? Let's see if we can do a little bit faster, this calculation.
54:28:330Paolo Guiotto: So… Let's say that I… let's do X times Y plus Z square E toy.
54:39:350Paolo Guiotto: That's who it is.
54:41:30Paolo Guiotto: Now…
54:42:30Paolo Guiotto: Let's start computing the gradient of F, which is here a vector made of three components. There is DXF, DYF, DZF.
54:52:770Paolo Guiotto: So these are… DXF…
54:56:870Paolo Guiotto: is… derivative with respect to X is Y, derivative with respect to Y is X plus Z squared e to y, and derivative with respect to Z is equal to 2Z E2Y.
55:14:670Paolo Guiotto: These are the three derivatives, from which you see that they are continuous, so F, is differentiable.
55:24:690Paolo Guiotto: They are continuous everywhere, so yeah, it's differentiable on R3.
55:32:300Paolo Guiotto: Now, instead of passing to the gradient and then treating that as a function R3 to R3, because you see, the gradient is now this thing, is the array YX plus Z squared e to y.
55:46:800Paolo Guiotto: and 2Z E2Y, I'm not checking time. Okay, let's finish this, then we take… I'm black.
55:55:310Paolo Guiotto: Now, this is the… you see that you have a function, R3 to R3.
56:00:310Paolo Guiotto: So this is to say, once again, those functions are not just an invention of mathematicians just to waste time, but they are important because they arise naturally when you do calculations like this one.
56:13:230Paolo Guiotto: And even more complicated functions are used in engineering. For example, you have tensors, which are functions that have a representation depending on the system of coordinates, so it's a very complicated
56:24:110Paolo Guiotto: objects from the mathematical point of view. These are just to drink a glass of water, so…
56:30:880Paolo Guiotto: Now, what is the second derivative? Instead of computing the Jacobian matrix of that, treating this as a function at 3 to a 3, I will do directly the calculation
56:45:830Paolo Guiotto: from the shape of this matrix. So what is the first line? The first line is made by
56:52:660Paolo Guiotto: The derivatives with respect to all the variables of the first partial derivative.
56:58:660Paolo Guiotto: So you take the DX,
57:01:480Paolo Guiotto: So you look only at this, and you compute the gradient of this, no? So this is gradient of DXF, this is the gradient of the second component, DYF, and this is the gradient of the third component, DZF. Let's see what is… what are these gradients.
57:20:900Paolo Guiotto: So… So look at this. Derivative with respect to X is… Is…
57:30:770Paolo Guiotto: 0. Divivity with respect to Y,
57:34:290Paolo Guiotto: 1, derivative with respect to Z.
57:37:700Paolo Guiotto: Zero. Second component, now let's look at this.
57:42:110Paolo Guiotto: Derivative with respect to X, Respect to why…
57:51:480Paolo Guiotto: No? Because Z squared is a coefficient, no? It's like a constant. There is Z squared e to y. Derivative with respect to Z,
58:01:960Paolo Guiotto: 2Z2a.
58:03:950Paolo Guiotto: Finally, the third component. Now, let's do all the derivatives. Respect to X,
58:10:220Paolo Guiotto: you know, with respect to Y, 2Z E2Y.
58:15:930Paolo Guiotto: And with respect to Zed, To Iva.
58:21:380Paolo Guiotto: Okay, as you can see, at the end, we can also say at the end that since all the entries clearly are continuous.
58:29:40Paolo Guiotto: These are all continuous. So, the gradient is differentiable.
58:37:40Paolo Guiotto: And the second derivative is this one. So, this is just to formally put in the right context these things. Okay, let's take a short break, 5 minutes, and then we start from this point with a remark.