Solution (source code)

= Solution

Work in a <Cartesian coordinate system>, write $\partial_j=\partial/\partial x_j$, and use the <Einstein summation convention>. For a twice continuously differentiable <vector field>, the contraction of two <Levi-Civita symbols> gives
$$
\begin{aligned}
[\nabla\times(\nabla\times u)]_i&=\epsilon_{ijk}\epsilon_{klm}\partial_j\partial_lu_m\\
&=(\delta_{il}\delta_{jm}-\delta_{im}\delta_{jl})\partial_j\partial_lu_m\\
&=\partial_i(\partial_ju_j)-\partial_j\partial_ju_i.
\end{aligned}
$$
Here the <Kronecker deltas> select components, and equality of mixed <partial derivatives> gives the <curl of the curl identity>
$$
\boxed{\nabla\times(\nabla\times u)=\nabla(\nabla\cdot u)-\nabla^2u.}
$$
For the second identity, the same contraction followed by the <product rule> yields
$$
\begin{aligned}
[\nabla\times(u\times v)]_i&=\partial_j(u_iv_j-u_jv_i)\\
&=u_i\partial_jv_j-v_i\partial_ju_j+v_j\partial_ju_i-u_j\partial_jv_i.
\end{aligned}
$$
Thus the <curl of a cross product> is
$$
\boxed{\nabla\times(u\times v)=u(\nabla\cdot v)-v(\nabla\cdot u)+(v\cdot\nabla)u-(u\cdot\nabla)v.}
$$
The directional <derivatives> in the last two terms act on the <vector field> immediately to their right.