Curl of a vector field cross itself How we can use the property  that
$$A×(B×C) = B(A.C)- C(A.B)$$
to prove the relation:
$$a×(∇×a) = ∇ (a^2/2) -(a.∇)a.$$ 
When I use it, the result directly appear to be
$$∇(|a|^2 )-(a.∇)a$$ instead of the correct one. Any help please?
 A: The problem arises because vector identites are usually derived for "normal" vectors, where the order of the vectors either doesn't matter or, in the case of the cross product, merely affects the sign. If one of the "vectors" is a differential operator, these vector identities still hold in a certain sense and can be very useful, but need to be applied with care, since the differential operator must always operate on what originally came after it and never on what originally came before it – this must be taken into account when the vector identity being applied changes the order of the vectors.
Naively applying the double cross product identity yields
$$
a\times(\nabla\times a)=\nabla(a\cdot a)-a(a\cdot \nabla)\;.
$$
Both terms are wrong – the first because $\nabla$ is now acting on both instances of $a$ whereas it should only be acting on one, as on the left-hand side, and the second because $\nabla$ is at the very right and is no longer acting on anything. The second problem is readily corrected by switching the order of multiplication. The first problem isn't quite as easy to correct. The actions of $\nabla$ on both instances of $a$ yield the same result, so if we only wanted one of them, we can correct for having both by dividing by two. Applying both corrections yields
$$
a\times(\nabla\times a)=\frac12\nabla(a\cdot a)-(a\cdot \nabla)a\;.
$$
If you intially find these things confusing, it often helps to write them out in coordinates – that makes them seem less mysterious, and over time you'll develop a feel for how the vector identities, applied with care, summarize what you would automatically have done correctly in coordinates.
A: Using tensor notation we  have
\tag
$$\begin{align}
\vec a\times \nabla \times \vec a&=(\hat x_ia_i)\times (\hat x_j\partial_j \times \hat x_ka_k)\\\\
&=(\hat x_j\delta_{ik}-\hat x_k\delta_{ij})a_i\partial_j(a_k)\tag 1 \\\\
&=\hat x_j(a_i)\partial_j(a_i)-\hat x_ka_i\partial_i(a_k) 
\tag2 \\\\
&=\hat x_j\frac12\partial_j(a_i^2)-a_i\partial_i(\hat x_ka_k) 
 \\\\
&=\frac12\nabla |\vec a|^2-(\vec a\cdot \nabla) \vec a
\end{align}$$
In arriving at $(1)$, we used the vector triple product rule. Note that $\delta_{ij}$ is the Kronecker Delta where $\delta_{ij}=1$ for $i=j$ and $0$ otherwise.
In going from $(1)$ to $(2)$, we used the sifting property of the Kronecker Delta.
