if suppose I have a surface $\mathcal{S} \subset \mathbb{R}^3$, with parameterization $\sigma = \sigma(u,v)$, if
$$ n = \sigma_u \times \sigma_v $$
I want to find a solution of the following problem
$$ \int_{\Omega} (n^T\cdot n_z - \lVert n \rVert)^2 d\Omega = \int_{\Omega} F(u,v,\sigma_u,\sigma_v) d\Omega $$
Where $\Omega = [u_0,u_1]\times [v_0,v_1]$, $n_z = (1,0,0)^T$. It's a bit tricky here to compute the EL equations, but for the Jacobian I ended up having
$$ J_{\sigma_u}(F) = -2 (n^T\cdot e_3 - \lVert n \rVert ) \left[ \sigma_v \times \left(e_3 - \frac{n}{\lVert n \rVert} \right) \right]^T $$
Similarly I got
$$ J_{\sigma_v}(F) = 2 (n^T\cdot e_3 - \lVert n \rVert ) \left[ \sigma_v \times \left(e_3 - \frac{n}{\lVert n \rVert} \right) \right]^T. $$
Here with $J_x$ I denote the jacobian with respect to the variables $x$. Are the equations above correct?
Derivation of $J_{\sigma_u}(F)$
$$ J_{\sigma_u}(F) = J_{\sigma_u}((n^T\cdot n_z - \lVert n \rVert)^2) = J_{n^T\cdot n_z - \lVert n \rVert}((n^T\cdot n_z - \lVert n \rVert)^2) J_{n}(n^T\cdot n_z - \lVert n \rVert) J_{\sigma_u}(n) = \\ 2(n^T \cdot n_z - \lVert n \rVert)\left(e_3^T - \frac{n^T}{\lVert n \rVert} \right)J_{\sigma_u}(n) $$
Since $n = \sigma_u \times \sigma_v = -\widehat{\sigma_v} \sigma_u$ we have
$$ J_{\sigma_u}(-\widehat{\sigma_v} \sigma_u) = -J_{\sigma_u}(\widehat{\sigma_v} \sigma_u) = -\widehat{\sigma_v} $$
where $\widehat{\sigma_v}$ is the skew symmetric matrix associated with the vector product. I can then write
$$ -\left(e_3^T - \frac{n^T}{\lVert n \rVert} \right)\widehat{\sigma_v} = -\left(\widehat{\sigma_v}^T \left(e_3 - \frac{n}{\lVert n \rVert} \right) \right)^T = \left(\sigma_v \times \left(e_3 - \frac{n}{\lVert n \rVert} \right) \right)^T $$
Similarly I can get the other Jacobian, is this derivation correct? (If yes the next step would differentiating respect to $u$ and $v$.