We have:

You also provided:

If they are to equal zero simultaneously, then it is a requirement that:

Let's pretend for a second that these were variables we could manipulate:

If you did the math with each individual equation, you would find that this is true (Keep in mind, you will not be able to treat the partials like this every time). Now, if x equals y, the only way for them to equal zero simultaneously in this equation would be and .

There you go.