Completed worked example We will see how to decide which of the two functions it is in general by examiningsecond derivatives. For this exercise, we need to observe a few examples of sumsand differences of squares: x2+y2 and y2−x2. If we know that we can place a function as the sum of squares, for example, we willbe able to complete the task. So let us try to express this as the square ofsomething; well, the main problem is with this 2xy term. But observe that we knowsomething that starts with x squared minus 2xy; in fact it is actually the square ofsomething else. Let us try and do that. The first two terms are x minus y squared and y squared. To find the remainingterms, we must add two more y squared values and also add 2x minus 2y. It is stillnot easy enough. Now what follows is a derivation of the equation? First, we have 2xminus 2y, which can be restated as twice x minus y. This might seem like it will bedifficult to modify into a square, but if we recall that 2 times any number is equal to 2times that number minus 1, then you will see that if we multiply both sides by 2, weobtain another square. In fact, we can simplify this expression further. We can remove the plus sign andmove the 1 outside the parentheses. Doing so gives us x minus y squared plus 2xminus y. We have this minus 1 here, and I still have my 2y squared. This is the same functionas that one. So again, if I expand x minus y + 1 squared, I get x – y2 + 2xy + 1. But Iwill have –1 that will cancel out. And then I have +2y2.Now we know that this is the sum of two squares minus 1, and the critical point (x, y)= (–1, 0); that's when these are both 0, so that's the smallest value. These arealways greater than or equal to zero, same with those ones, so those are always atleast –1 , and –1 happens to be the value at the critical point. So it's a minimum. One generally could not expect things to simplify that much. In fact, we started from
that basis, we expanded on it, and then that's how we got my example. But do youknow our method will be a bit different but still involve completing squares? There'sjust more to it than what we've seen. How do we know that the function f(x, y) is greater than or equal to negative 1? Well,(x, y) is being squared in the expression of f(x, y). Squaring a number always yieldsa positive value. Thus, the expression as written will always result in a positivenumber.Similarly, y squared is always not negative. So if you add something that's at least 0plus something that's at least 0 and you subtract 1, you always get at least -1. In fact,the only way to get -1 is if both of these guys are 0 at the same time.