Let \[ B=\{r\in\mathbb R^3:\|r\|\le1\} \] and let \(J=(J_1,J_2,J_3)\) be a smooth vector field on \(\mathbb R^3\) that vanishes outside \(B\) and satisfies \[ \nabla\cdot J=0. \]
For every smooth scalar-valued function \(f\) defined on a neighborhood of \(B\), prove that \[ \int_B (\nabla f)\cdot J\,dx\,dy\,dz=0. \]
Prove that \[ \int_B J_1\,dx\,dy\,dz=0. \]
Solution
1. The vector field \(J\) vanishes on the boundary \(\partial B\).
Let \(r\in\partial B\). There are points \(r_m\) outside \(B\) with \(r_m\to r\). By hypothesis \(J(r_m)=0\) for every \(m\), and smoothness implies continuity. Hence \[ J(r)=\lim_{m\to\infty}J(r_m)=0. \]
2. For every admissible scalar function \(f\),\[ \nabla\cdot(fJ)=(\nabla f)\cdot J. \]
The product rule for divergence gives \[ \nabla\cdot(fJ) =(\nabla f)\cdot J+f(\nabla\cdot J). \] The second term is zero by the hypothesis \(\nabla\cdot J=0\).
3. For every such \(f\),\[ \boxed{\int_B(\nabla f)\cdot J\,dx\,dy\,dz=0}. \]
By step 2 and the divergence theorem, \[ \int_B(\nabla f)\cdot J\,dV = \int_B\nabla\cdot(fJ)\,dV = \int_{\partial B}fJ\cdot n\,dS. \] The boundary integral is zero by step 1.
4. One has\[ \boxed{\int_B J_1\,dx\,dy\,dz=0}. \]
Apply step 3 to the smooth function \[ f(x,y,z)=x. \] Then \[ \nabla f=(1,0,0), \] so \[ (\nabla f)\cdot J=J_1. \]
5. Q.E.D.
Step 3 proves part 1, and step 4 proves part 2.