I'm investigating optimal solutions to equations of the form:

Subject to the constraint:

and are also constrained independently of to keep the expression real, but I don't think this is important.

This gives the Lagrangian:

So taking the derivative with respect to gives:

Is this correct so far? Because it doesn't seem like this series of equations has a solution in general.

Oddly, it also seems like making the change of variables does give a solution. Following the above method, the equations are:

Which can be solved by setting all but one to 0, and the remaining one to 1.

Am I making some mistake here?