# What am I doing wrong in this volume integral (divergence theorem)?

I'm learning about the divergence theorem. If I have a vector function $f(x,y,z)=\sqrt {x^2+y^2} \cdot (x,y,z)$ and I want to get $\iint\limits_A f(x,y,z) \, d A$ (easy to evaluate, but I thought I'd practice converting from rectangular to another coordinate system), which - according to the theorem - is equal to $\iiint\limits_V \nabla \cdot f(x,y,z) \, dV$, then if -in cylindrical coordinates- the volume is from $z=0 \ to \ 5$ and radius $r=2$, the result should be 80$\pi$. The function can be written as $f(r, \theta , z) = (r^2,\theta, 0)$, and so $\nabla \cdot f = (2r, 1/r, 0)$, as $\nabla = (\partial / \partial r , 1/r \cdot \partial / \partial \theta, \partial / \partial z)$.

Evaluating, the integral becomes ( as $dV = r\cdot drd\theta dz$) $\iiint \limits_V (2r^2 + 1) \, dr d\theta dz$, which is not $80 \pi$, it is $10\cdot \pi \cdot (16/3 + 2)$. What did I do wrong?

EDIT:

$\textbf{f}(x,y,z) = (\sqrt{x^2+y^2})\cdot (x \textbf{i} + y \textbf{j})$ is the function; its cylindrical form is

$\textbf{f}=r^2 \cdot \hat{r} + \theta \cdot \hat{\theta} + 0 \cdot \hat{z}$

I also know $\nabla$ for the new coordinates: $\nabla = \partial / \partial r \cdot \hat{r} + (1/r)\cdot \partial / \partial \theta \cdot \hat{\theta} + \partial / \partial z \cdot \hat{z}$

$\iiint \limits_V \nabla \cdot \textbf{f} \, dV = \iint\limits_A \textbf{f} \cdot \textbf{n}\, dA$. The second integral is easy, but with the volume integral I had the problem which is again: $\iiint\limits_V \nabla \cdot \textbf{f}\, dV$, in which I have already written the scalar product: it is 2r + 1/r, and as $dV = rdr d \theta dz$, I get $2 r^2 + 1$ in the volume integral, which won't become $80 \pi$.

• Is the function a vector field? – dylan7 Aug 23 '14 at 17:21
• Yes, it is (I too am used to the notation of that, but I had to omit it (as well as the proper limits of the area and volume integrals) due to my lack of experience in LaTeX). – Mitlasóczki Bence Aug 23 '14 at 18:15
• Yeah it's hard to tell what the field is suppose to be. Could you write it in $Pi+Qj+Rk$ form as best as possible or use the Mathjax reference? – dylan7 Aug 23 '14 at 18:21
• Okay, I'm trying it now. – Mitlasóczki Bence Aug 23 '14 at 18:26
• Well, the answer should not be the volume of the cyclinder you are integrating in. Normally you can calc the divergence in cartesian then put the divergence into cylindrical and put the jacobian with the differentials in ($rdrdzd\theta$) . The field you found in cylindr. is not the same as the original. You found a field that is actually in the right angular cylindrical coordinate system. If you want to convert to cylindrical first you can't do it the way you did it. – dylan7 Aug 23 '14 at 19:12

I don't know what you mean by $f(r,\theta,z)$. At any rate, we have the vector field $${\bf f}(x,y,z):=(\rho x,\rho y,\rho z),\qquad\rho:=\sqrt{x^2+y^2}\ .$$ One computes $$\rho_x={x\over\rho},\quad \rho_y={y\over\rho},\quad\rho_z=0\ ,$$ so that one obtains $${\rm div}\>{\bf f}(x,y,z)={x\over\rho} x+\rho+{y\over\rho} y+\rho+\rho=4\rho\ .$$ If $V$ denotes the given cylinder and $A$ its surface (mantle, top, and bottom) oriented outwards then Gauss' theorem says that $$\int_A {\bf f}\cdot {\bf n}\ {\rm d}\omega=\int_V {\rm div}\,{\bf f}\ {\rm d}(x,y,z)=2\pi\cdot 5\cdot\int_0^2 4\rho\>\rho d\rho={320\pi\over3}\ .$$
• This is the same result as mine for the volume integral, but the area integral should be $80 \cdot \pi$, as it is basically r^3 (as only the r component remains after the scalar product of the function and the normal vector (which is in the direction of r, but has unit length), as in the function it is r^2, and from the change to cylindrical coordinates another r comes. It is also constant, and from integrating from 0 to 2 $\pi$ and from 0 to 5, we get $10 \pi \cdot 2^3$. (Sorry, I'm writing fast as I have to go now for an hour.) – Mitlasóczki Bence Aug 23 '14 at 19:13