Trying to work through drill problem 3.9 from the 8th edition of the textbook "Engineering Electromagnetics by Hayt".
this is the problem question:
Given the field D = 6ρ sin(0.5φ) aρ + 1.5ρ cos(0.5φ) aφ C/m^2, evaluate both sides of the divergence theorem for the region bounded by ρ = 2, φ = 0, φ = π, z = 0, and z = 5.
I am having trouble evaluating the surface integral side of the divergence theorem. My logic is that the surface integral is a sum of the surface integral through the half spherical section and the surface integral through the rectangular plane on the y = 0 axis.
My main problem is trying to find the surface integral through the rectangular portion as I am not too sure how to go about it. any tips would be helpful!
The field is $$\pmb D=6\,\rho \sin\left(\frac{\phi}{2}\right)\, \pmb a_{\rho} + 1.5\,\rho \cos\left(\frac{\phi}{2}\right)\, \pmb a_{\phi}=D_\rho \, \pmb a_{\rho} + D_\phi\, \pmb a_{\phi}$$ and the divergence in cylindrical coordinates is $$ \nabla\cdot\pmb D=\frac{1}{\rho}\frac{\partial}{\partial\rho}(\rho D_{\rho})+\frac{1}{\rho}\frac{\partial}{\partial\phi}D_{\phi}+\frac{\partial}{\partial z}D_z=12\sin\left(\frac{\phi}{2}\right)-\frac{3}{4}\sin\left(\frac{\phi}{2}\right)=\frac{45}{4}\sin\left(\frac{\phi}{2}\right) $$ So we have $$ \iiint_V\nabla\cdot\pmb D\,\mathrm d V=\int_0^5\int_0^\pi\int_0^2 \frac{45}{4}\sin\left(\frac{\phi}{2}\right)\,\rho\,\mathrm d\rho \,\mathrm d\phi \,\mathrm dz =5\cdot 2\cdot \frac{45}{4}\cdot 2=225 $$ where $V=\{(\rho,\,\phi,\,z):0\le \rho\le 2,\,0\le\phi\le \pi,\,0\le z\le 5\}$ and $\mathrm d V=\rho\,\mathrm d\rho \,\mathrm d\phi \,\mathrm dz $.
We note that $\pmb D$ is parallel to the surfaces $z=0$ and $z=5$, so $\pmb D\cdot \mathrm d\pmb S=0$ there. The other two surfaces are $\rho=0$ and $\rho=2$. Over the flat side of the half cylinder $S_p$ we have $$\pmb D\big|_{\phi=0}=\frac{3}{2}\rho\,\pmb a_\phi$$ and the unit vector normal to $S_p$ is $-\pmb a_y=-\pmb a_\phi$ for $\phi=0$ and the surface element is $\mathrm d S_p=\rho\,\mathrm d\rho\,\mathrm dz$, and over $\rho=2$ we have $$\pmb D\big|_{\rho=2}=12\sin\left(\frac{\phi}{2}\right)\,\pmb a_\rho$$ and the unit vector normal to the surface of the half-cylinder $S_c$ is $\pmb a_\rho$ and the surface element is $\mathrm d S_c=\rho\,\mathrm d\phi\,\mathrm dz\big|_{\rho=2}=2 \,\mathrm d\phi\,\mathrm dz$. Then the flux is $$ \begin{align} \oint_S \pmb D\cdot \mathrm d\pmb S&= \iint_{S_p}\pmb D\big|_{\phi=0}\cdot (- \pmb a_\phi)\, \mathrm d S_p+\iint_{S_c}\pmb D_\rho\big|_{\rho=2}\cdot \pmb a_\rho\, \mathrm d S_c\\ &=-\int_0^5\int_0^2 \frac{3}{2}\,\rho^2\,\mathrm d\rho\,\mathrm dz+\int_0^5\int_0^\pi 24\sin\left(\frac{\phi}{2}\right)\,\mathrm d\phi \,\mathrm dz\\ &=-15+240\\ &=225 \end{align} $$