$$H: \mathbb{R}^3 \setminus {0} \to \mathbb{R}^3, x \mapsto \frac{\cos(k|x|) - 1}{|x|^3} \cdot x$$
How can I calculate the gradient and divergence of this vector-valued function? I know the divergence is defined as
$$ \text{div}\,F = \sum_{i=1}^n \frac{\partial F_i}{\partial x_i} $$
for a vector field $F$. So should I split $H$ up into the scalar-valued functions $H_1, H_2, H_3$ and then take the partial derivative of each component?
I have yet to wrap my head around multivariable calculus... :(
Thanks in advance.
Gradients make sense for scalar fields, not vector fields. But the divergence is easily computed in terms of the position field. I'll replace your $x$ with $r$. If $H(r) = h(|r|)r$, then $${\rm div}(H)(r) = h(|r|){\rm div}(r)+\nabla( h(|r|))\cdot r.$$But ${\rm div}(r)=3$ and $$\nabla( h(|r|) )=\frac{h'(|r|)}{|r|}r, $$which leads to $${\rm div}(H)(r) = 3h(|r|) + |r|h'(|r|).$$Now take $$h(t)=\frac{\cos(kt)-1}{t^3}.$$