How do I show that an energy minimising magnetic field subject to constraints is force-free? I want to use the fact that a magnetic field can be written in the form
$$ \textbf{B} = \pmb{\nabla}u \times \pmb{\nabla}v $$
to show that if $\textbf{B}$ minimises the magnetic energy
$$ E = \int_V\mathrm{d}^3r \ \frac{B^2}{8\pi} $$
under the constraint that $u$ and $v$ are fixed on $\partial V$, then $\textbf{B}$ is force-free (i.e $\pmb{\nabla} \times \textbf{B}$ is proportional to $\textbf{B}$).
By using the variational principle, I have been able to obtain the following conditions for $u$ and $v$ so that the field is energy minimising:
$$ \pmb{\nabla}\cdot((\pmb{\nabla}u\cdot\pmb{\nabla}v)\pmb{\nabla}v) - \pmb{\nabla}\cdot((\pmb{\nabla}v\cdot\pmb{\nabla}v)\pmb{\nabla}u) = 0$$
$$ \pmb{\nabla}\cdot((\pmb{\nabla}u\cdot\pmb{\nabla}v)\pmb{\nabla}u) - \pmb{\nabla}\cdot((\pmb{\nabla}u\cdot\pmb{\nabla}u)\pmb{\nabla}v) = 0$$
but how do I use these to show that the field must be force-free?
EDIT: I had + instead of - in the above two equations before but this was a typo on my part - thanks to TEF for pointing out my sign mistake.
 A: I don't think your conditions for $u$ and $v$ are correct. The Clebsch potentials are defined by
$$ \mathbf{B} = \nabla u \times \nabla v$$
so we need to minimise the integral
$$\int_V d^3r\, \left( \nabla u \times \nabla v \right)^2 = \int_V d^3r\, \underbrace{(\nabla u)^2(\nabla v)^2 - (\nabla u \cdot \nabla v)^2}_{:=\mathcal{L}}.$$
The Euler-Lagrange equation for the $u$ field is
$$ \nabla \cdot\frac{\partial \mathcal{L}}{\partial(\nabla u)} = \underbrace{\frac{\partial \mathcal{L}}{\partial u}}_{=0} $$
$$\implies \nabla \cdot \left[ \nabla u\, (\nabla v)^2 - \nabla v\, (\nabla u \cdot \nabla v) \right] = 0 $$
and there is a similar equation for $v$. These equations are the same as yours but with a different sign. The vector identity for $\mathbf{a}\times(\mathbf{b}\times \mathbf{c})$ lets us write them as
$$\nabla \cdot \left[ \nabla v \times (\nabla u \times \nabla v) \right] = \nabla \cdot ( \nabla v \times \mathbf{B} ) = 0$$
$$\nabla \cdot \left[ \nabla u \times (\nabla u \times \nabla v) \right] = \nabla \cdot ( \nabla u \times \mathbf{B} ) = 0.$$
Then, the formula for the divergence of a cross product tells us these are equivalent to
$$ \nabla v \cdot (\nabla \times \mathbf{B}) = 0 $$
$$ \nabla u \cdot (\nabla \times \mathbf{B}) = 0. $$
Finally,
$$ \mathbf{B}\times\mathbf{J} \propto (\nabla u \times \nabla v) \times (\nabla \times \mathbf{B}) =  \nabla v\, [\nabla u \cdot (\nabla \times \mathbf{B})] - \nabla u\, [\nabla v \cdot (\nabla \times \mathbf{B})] = 0. $$
If $ \mathbf{B}\times\mathbf{J} = 0 $ then the equilibrium is force-free as the Lorentz force is zero everywhere.
