Show $\left(\vec{A}\cdot\nabla\right)\vec{A} = \nabla\left( \frac{A^2}{2} \right) - \vec{A}\times\left(\nabla\times\vec{A}\right)$ \begin{equation}
\begin{aligned}
\left(\vec{A}\cdot\nabla\right)\vec{A} &= \nabla\left( \frac{A^2}{2} \right) - \vec{A}\times\left(\nabla\times\vec{A}\right)\\
\left(\vec{A}\cdot\nabla\right)\vec{A} &= A_x\frac{\partial A_x}{\partial x} + A_y\frac{\partial A_y}{\partial y} + A_z\frac{\partial A_z}{\partial z}\\
\left(\vec{A}\cdot\nabla\right)\vec{A} &= \dots
\end{aligned}
\end{equation}
I'm stuck. Any help would be greatly appreciated.
 A: You obtain the above relation by putting $\vec A=\vec B $ in the following relation:
$$\nabla(\vec A\cdot \vec B)=(\vec A\cdot \nabla)\vec B+(\vec B\cdot \nabla)\vec A+\vec B \times (\nabla \times \vec A)+\vec A \times (\nabla \times \vec B)$$
and then prove this, which is quite easy using Levi-Cevita notation.

For an alternative detailed analysis, consider this:
If we let the components of the vector field $\vec A$ be $(f,g,h)$ and use subscripts for differentiation then, looking at the $x$-component
\begin{align}
((\nabla\times  \vec A) \times \vec A)_x &= ((\nabla\times  \vec A)_yh-(\nabla\times  \vec A)_zg \\
& =(f_z-h_x)h-(g_x-f_y)g \\
&= (f_yg+f_zh) - (g_xg+h_xh)
\end{align}
if we insert an extra term $f_xf$ in each parenthesis the value of the whole is not changed and we have:
\begin{align}
(f_xf+f_yg+f_zh) - (f_xf+g_xg+h_xh) 
&= \vec A\cdot \nabla f -\frac12 \frac{\partial}{\partial x}(f^2+g^2+h^2) \\
&= \left(\vec A\cdot  \nabla \vec A -\frac12\nabla |\vec A|^2 \right)_x
\end{align}
