Solution (source code)

= Solution

For a differentiable <vector field> in <Cartesian coordinates>, the <divergence> and <curl> are
$$
\nabla\cdot F=\partial_iF_i,\qquad(\nabla\times F)_i=\epsilon_{ijk}\partial_jF_k,
$$
with summation over repeated indices. In components the curl is $(\partial_yF_z-\partial_zF_y,\partial_zF_x-\partial_xF_z,\partial_xF_y-\partial_yF_x)$. The <contraction of two Levi-Civita symbols> and the <product rule> give
$$
\begin{aligned}
[\nabla\times(F\times G)]_i
&=\epsilon_{ijk}\epsilon_{k\ell m}\partial_j(F_\ell G_m)\\
&=(\delta_{i\ell}\delta_{jm}-\delta_{im}\delta_{j\ell})\partial_j(F_\ell G_m)\\
&=G_j\partial_jF_i+F_i\partial_jG_j-G_i\partial_jF_j-F_j\partial_jG_i.
\end{aligned}
$$
Recognizing the <directional derivatives> gives the <curl of a cross product> identity
$$
\nabla\times(F\times G)=(G\cdot\nabla)F-G(\nabla\cdot F)-(F\cdot\nabla)G+F(\nabla\cdot G).
$$