Change of variables for functions with constraints

88 Views Asked by At

I want to find critical points of say

\begin{equation} F = (x_1-x_2) + (y_1^2-y_2^3) + (z_1^2-z_2^3) \end{equation}

with constraints

\begin{align} x_1^1 + y_1^2 + z_1^2 -1 &= 0 \\ x_2^1 + y_2^2 + z_2^2 -1 &= 0 \end{align}

I can do this by finding critical points of

\begin{equation} F_1 = F + \lambda_1*(x_1^1 + y_1^2 + z_1^2 -1) + \lambda_2*(x_2^1 + y_2^2 + z_2^2 -1) \end{equation} i.e., solving $\nabla F_1(x_1,y_1,z_1,x_2,y_2,z_2,\lambda_1,\lambda_2) = 0$.

However, since these are spherical constraints, it is easier (in some sense) to go to the spherical coordinate system. I can do this by replacing, in the original F,

\begin{align} x_i &= \sin \phi_i \cos \theta_i \\ y_i &= \sin \phi_i \sin \theta_i \\ z_i &= \cos \phi_i \end{align}

for $i = 1,2$, with $\phi_i \in [0,2\pi)$ and $\theta_i \in [0,\pi]$. Once I do that, I get from $F$ to say $F_{sp}$. I no longer need to add any further constraints as the spherical constraints. However, I don't know how exactly the change of variables affects the gradient equations, i.e., does it go like

\begin{equation} grad F_{sp} (\phi_1, \theta_1, \phi_2, \theta_2) = J \nabla F_1(x_1,y_1,z_1,x_2,y_2,z_2,\lambda_1,\lambda_2) \end{equation}

where $J$ is the Jacobian matrix?

And what is the precise $J$ in this case? I know the Jacobian matrix from Cartesian to spherical ones. But I don't know what to add in the Jacobian due to lambdas.

In other words, what $J$ should use so that $\nabla F_{sp} \implies \nabla F_1 = 0$, and vice versa?

I am just confused due to the presence of the spherical constraints in the original $F$. If there was no such constraints on $F$, then the change of variables was straightforward. Or am I just confusing myself here?