Simplify vector equation I know that $div E=0$ and I know what $ curl E$ is. Further, I know what the vector laplacian of $E$ is.
Now I want to simplify $\nabla \times (\nabla \times  f(x,y,z) E(x,y,z))$, where $f:\mathbb{R}^3 \rightarrow \mathbb{R}$ and $E: \mathbb{R}^3 \rightarrow \mathbb{R}^3$ by using these information whenever possible!
 A: Inner layer:
$$
\nabla \times(f E) = \nabla f\times E + f \nabla \times E.
$$
Outer layer:
$$
\nabla \times \big(\nabla f\times E + f\nabla \times E\big)
\\
=\nabla \times(\nabla f\times E) + \nabla \times (f\nabla \times E).
$$
First term is $\nabla \times(\nabla f\times E)$, using triple vector curl, and $E$ is divergence free, i.e., $\nabla \cdot E = 0$:
$$
 \nabla\times(A\times B )=A(\nabla\cdot {B})-{B}(\nabla\cdot{A})+({B}\cdot\nabla){A}-({A}\cdot\nabla){B} \implies
\\
\nabla \times(\nabla f\times E) = -E \Delta f + (E\cdot \nabla)\nabla f - (\nabla f\cdot \nabla)E.
$$
Second term is $\nabla \times (f\nabla \times E)$, using the product rule for curl again:
$$
\nabla \times (f\nabla \times E) = \nabla f\times (\nabla \times E) + f\nabla\times \nabla\times E.
$$
For $E$ is divergence free:
$$
\nabla\times \nabla\times E = -\Delta E + \nabla(\nabla\cdot E) = -\Delta E,
$$
where this is a vector Laplacian on each component. To make the expression more compact, we can use the identity:
$$\nabla({A}\cdot{B})=({A}\cdot\nabla){B}+({B}\cdot\nabla){A}+{A}\times(\nabla\times{B})+{B}\times(\nabla\times{A}) \implies
\\
\nabla (E\cdot \nabla f ) = (E\cdot \nabla)\nabla f + (\nabla f\cdot \nabla)E +  \nabla f\times (\nabla \times E),$$
where we used $\nabla \times(\nabla f) = 0$. Eventually we have:
$$
\nabla \times \nabla \times(f E) = -E \Delta f - f\Delta E + (E\cdot \nabla)\nabla f - (\nabla f\cdot \nabla)E + \nabla f\times (\nabla \times E)
\\
=-E \Delta f - f\Delta E + \nabla (E\cdot \nabla f ) -2 (\nabla f\cdot \nabla)E .
$$

Some updates: Also $(\nabla f\cdot \nabla)E$ will not vanish even if $E$ is divergence free. This term is the directional derivative of $E$ along the direction of $\nabla f$:
$$
\nabla f\cdot \nabla = (\partial_x f )\partial_x+ (\partial_y f )\partial_y +(\partial_z f )\partial_z.
$$
The action of this operator (similar to the one of the convective derivative) on $E = (E_1,E_2,E_3)$ is component-wise:
$$
(\nabla f\cdot \nabla)E
=
\begin{pmatrix}
(\partial_x f )\partial_x E_1+ (\partial_y f )\partial_y E_1+(\partial_z f )\partial_z E_1
\\
(\partial_x f )\partial_x E_2+ (\partial_y f )\partial_y E_2+(\partial_z f )\partial_z E_2
\\
(\partial_x f )\partial_x E_3+ (\partial_y f )\partial_y E_3+(\partial_z f )\partial_z E_3
\end{pmatrix} = 
\begin{pmatrix}
\nabla f\cdot \nabla E_1
\\
\nabla f\cdot \nabla E_2
\\
\nabla f\cdot \nabla E_3
\end{pmatrix}.
$$
