[Math] What’s wrong with the calculation for checking the divergence law

multivariable-calculus

Here is a problem in Griffiths Introduction to Electrodynamics as follows.

Check the divergence theorem for the function $\mathbf{v} = r^2\mathbf{\hat{r}}$, using as your volume, the sphere of radius R, centered at the origin?

Here is my calculation for the surface intergral part, please help me finding the error in it.

$$\mathbf{v} = r^2(\sin\theta \cos\phi \ \mathbf{\hat{x}} + \sin\theta \sin\phi \ \mathbf{\hat{y}} + \cos \theta \ \mathbf{\hat{z}})$$

\begin{align}
\oint_s \mathbf{v} \cdot d\mathbf{a} &= 2 \iint r^2 \cos\theta\ dxdy \\
&= 2 \iint r^2 \cdot \frac{z}{r} dxdy \\
&= 2R \iint \sqrt{R^2 – x^2 – y^2} dxdy \\
&= 2R \int_{r=0}^{R}\sqrt{R^2 – r^2} rdr \int_{\theta=0}^{2\pi} d\theta \\
&= 4\pi R\int_{\theta=0}^{\frac{\pi}{2}}\sqrt{R^2 – R^2{\sin^2\theta}} R\sin\theta\ R\cos\theta\ d\theta \\
&= \frac{4\pi R^4}{3}
\end{align}

But the right answer should be $4\pi R^4$ considering the left part of the divergence theorem $\int_V \nabla\cdot\mathbf{v}\ d\tau$. I have check my answer serveral times but could not find error, could you help me?

thanks.

Best Answer

The integral $2 \iint r^2 \cos\theta\ dxdy $ was correctly evaluated to $4\pi R^4/3$. But it represents only the contribution of the $z$-component of the vector field to the surface integral. By symmetry, the $x$- and $y$- components contribute as much. The total is $4\pi R^4$, as expected.

Related Question