Solution (source code)

= Solution

For Cartesian components, $\partial_jx_i=\delta_{ij}$, the <Kronecker delta>. Differentiating $r^2=x_ix_i$ gives
$$
\boxed{\partial_jr=\frac{x_j}{r}\quad(r>0).}
$$
Put $s=k_\ell x_\ell$. Using the product rule and $\partial_j r^{-q}=-q x_jr^{-q-2}$ gives the <velocity gradient>
$$
\boxed{d_{ij}=-\frac{k_ix_j}{r^3}+\frac{k_jx_i}{r^3}
+\frac{s\delta_{ij}}{r^3}-\frac{3s x_ix_j}{r^5}.}
$$
This is the <rate of strain and vorticity of a Stokeslet>, apart from the overall physical normalization. Its <symmetric and antisymmetric parts of a matrix> are
$$
E_{ij}=\frac{d_{ij}+d_{ji}}2=\frac{s\delta_{ij}}{r^3}-\frac{3s x_ix_j}{r^5},\qquad
W_{ij}=\frac{d_{ij}-d_{ji}}2=\frac{k_jx_i-k_ix_j}{r^3}.
$$
Here $E_{ji}=E_{ij}$ and $W_{ji}=-W_{ij}$, and $d=E+W$. Taking the <trace> gives the <divergence>
$$
\boxed{\nabla\cdot\mathbf u=d_{ii}=\frac{3s}{r^3}-\frac{3sr^2}{r^5}=0.}
$$
For the <curl>, use the <Levi-Civita symbol>. Because $d_{kj}=\partial_ju_k$, the symmetric part makes no contribution, and
$$
(\nabla\times\mathbf u)_i=\epsilon_{ijk}d_{kj}
=\frac{\epsilon_{ijk}(k_jx_k-k_kx_j)}{r^3}
=\boxed{\frac{2\epsilon_{ijk}k_jx_k}{r^3}}.
$$
Thus $\nabla\times\mathbf u=2\mathbf k\times\mathbf x/r^3$. All derivative identities hold away from the singular origin.