Solution (source code)

= Solution

Writing $a_kx_k=\mathbf a\mathbin\cdot\mathbf x$ and differentiating gives
$$
d_{ij}=-\frac{a_ix_j}{r^3}
+\frac{a_jx_i}{r^3}
+\frac{(\mathbf a\cdot\mathbf x)\delta_{ij}}{r^3}
-\frac{3(\mathbf a\cdot\mathbf x)x_ix_j}{r^5}.
$$
Its <symmetric second-rank tensor> part and <antisymmetric second-rank tensor> part are
$$
d_{(ij)}=\frac{(\mathbf a\cdot\mathbf x)\delta_{ij}}{r^3}
-\frac{3(\mathbf a\cdot\mathbf x)x_ix_j}{r^5},
\qquad
d_{[ij]}=\frac{a_jx_i-a_ix_j}{r^3}.
$$
Taking the trace makes the two symmetric terms cancel, so the <divergence> is
$$
\boxed{\partial_i u_i=0}.
$$
Contracting the antisymmetric part with the Levi-Civita symbol gives the <curl>
$$
\boxed{\nabla\times\mathbf u
=\frac{2\,\mathbf a\times\mathbf x}{r^3}}.
$$