We're minimizing

subject to

. Using Lagrange multipliers, we have the Lagrangian

with partial derivatives

Set each partial derivative equal to 0:

Subtracting the second equation from the first, we find

Similarly, we can determine that

and

by taking any two of the first three equations. So if

determines a critical point, then

So the smallest value for the sum of squares is

when

.