Verifying Divergence Theorem for cylinder with function whose divergence is 0

divergence-theoremvector analysis

enter image description here

In a question I am doing, I first am asked to find the most general function of the form

$F = f(\rho)e_{\rho}$

such that the divergence is 0. Calculating the divergence directly, and using the more general expression below, I found that the most general case is when $f(\rho) = \frac{A}{\rho}$

enter image description here

However, when verifying I got confused by the following thought: consider applying the divergence theorem to the cylinder. For the surface integral, the top and the bottom of the cylinder of radius 1 yields an integral of 0, as their normal vector is in the $e_{z}$ direction which is perpendicular to $e_{\rho}$. However, for the sides of the cylinder I get:

$\int_{z=1}^{2}\int_{\theta=0}^{2\pi}\frac{A}{\rho}\rho {e_\rho \cdot e_\rho} d\theta dz =\int_{z=1}^{2}\int_{\theta=0}^{2\pi}\frac{A}{1} d\theta dz \neq 0$

I am probably being exceedingly stupid but thank you for taking a look anyway 🙂

Best Answer

Note now that in the exam question, the region is outside the cylinder and inside the surface $z=1/r^2$, so the $z$-axis is totally outside the region and the divergence theorem will apply. The bounds on $z$ tell you that $1\le r\le 2$. The computation will be more involved to find the flux directly.