Using Lagrange multipliers, we have the Lagrangian

with partial derivatives (set equal to 0)




Substituting the first three equations into the fourth allows us to solve for

:

For each possible value of

, we get two corresponding critical points at

.
At these points, respectively, we get a maximum value of

and a minimum value of

.