Verify the divergence theorem for the vector field v=x^{2} i + \frac{1}{2}y^{2} j + \frac{1}{2} z^{2}k over the unit cube 0 ≤ x ≤ 1, 0 ≤ y ≤ 1, 0 ≤ z ≤ 1.
Firstly we need to evaluate \textstyle\oint_{S}\mathbf{V}\bullet dS where S is the surface of the cube. This integral has been calculated in Example 27.17 and shown to be 2.
Secondly we need to calculate \int _v div v dV over the volume of the cube. This has been done in Example 27.16 and again the result is 2.
We have verified the divergence theorem that \oint_{S}\mathbf{v}\cdot\mathrm{d}\mathbf{S}=\int_{V}\mathrm{d}\mathbf{i}\mathbf{v} \mathbf{v}\mathrm{d}V.