Find the extreme values of the function subject to the constraint .
Let . The constrained critical points are those points that satisfy and at which the gradient vectors and are parallel. So we first compute those gradient vectors:
Using the "determinant trick", these vectors are parallel exactly when the determinant of the matrix with these vectors as its column vanishes. So we compute
So now we need to solve the system of equations
There are various ways we can solve these two equations. For instance, we might solve the second equation for to get , and then substitute that into the first equation to get , which simplifies to , and so either or . Since , both of these cases imply , and so either or . Note that this means we've found four points, namely , and .
To determine the max and min values of , we now simply evaluate at each of these four points. The highest value is the max and the lowest value is the min.