Calculating the cross product of a cross product so I really can't see what I am doing wrong. I want to use this formula:
$a\times (b\times c) = b(a\cdot c) - c(a\cdot b)$
Calculate the rotation of $v(x,y,z)=(x,y,z)^T \times \omega$ with $\omega \in \mathbb R^3$
Solution:
$a\cdot c=\nabla\cdot \omega=0$
and
$a\cdot b = \nabla \cdot (x,y,z)^T= \partial_x x + \partial_y y + \partial_z z = 3$
so we get $-\omega 3=-3\omega$
The actual solution (which I do get by direct calculation) is: $-2\omega$

On Wikipedia you can see that the formula for the curl of a cross product is given by
$$
\nabla \times (\mathbf{A} \times \mathbf{B}) = \mathbf{A}\ (\nabla \cdot \mathbf{B}) - \mathbf{B}\ (\nabla \cdot \mathbf{A}) + (\mathbf{B} \cdot \nabla) \mathbf{A} - (\mathbf{A} \cdot \nabla) \mathbf{B}
.
$$
Applying this on your case gives
$$\begin{align}
\nabla \times (\mathbf{x} \times \mathbf{\omega}) 
&= \mathbf{x}\ (\nabla \cdot \mathbf{\omega}) - \mathbf{\omega}\ (\nabla \cdot \mathbf{x}) + (\mathbf{\omega} \cdot \nabla) \mathbf{x} - (\mathbf{x} \cdot \nabla) \mathbf{\omega} \\
&= \mathbf{x} \ 0 - \mathbf{\omega}\ 3 + \mathbf{\omega} - \mathbf{0}
= -2 \mathbf{\omega}
.
\end{align}$$
