# Test of Divergence Theorem in Cyl. Coord's.

1. Mar 14, 2006

### Living_Dog

Ok I am stuck yet again. Below is a synopsis of everything I have done.

D. J. Griffiths, 3rd ed., Intro. to Electrodynamics, pg. 45, Problem #1.42(a) and (b):

(a) Find the divergence of the vector function:

$$\vec{v} = s(2 + sin^2\phi)\hat{s} + s \cdot sin\phi \cdot cos\phi \hat{\phi} + 3\cdot z\hat{z}$$

So,

$$\nabla\circ\vec{v} = \frac{1}{s}\partial_s(s \cdot v_s) + \frac{1}{s}\partial_\phi(v_\phi) + \partial_z(v_z)$$

$$v_s = s(2 + sin^2\phi)$$
$$v_\phi = s \cdot sin\phi \cdot cos\phi$$
$$v_z = 3z$$

Therefore,

$$\nabla\circ\vec{v} = 2(2 + sin^2\phi) + (cos^2\phi - sin^2\phi) + 3$$
$$. . . = 4 + 2 \cdot sin^2\phi + cos^2\phi - sin^2\phi + 3$$
$$. . . = 7 + sin^2\phi + cos^2\phi$$
$$. . . = 7 + 1$$
$$. . . = 8$$.

Now place this in the integral over the given volume - a quarter-cylinder in the 1st quadrant between: $$0 \le s \le 2, 0 \le \phi \le \frac{\pi}{2}, and 0 \le z \le 5$$.

$$\int_V (\nabla \circ \vec{v}) d\tau = 8 \cdot \int_0^2 s ds \cdot \int_0^\frac{\pi}{2} d\phi \cdot \int_0^5 dz = 40 \pi$$

Now for the surface integral over the closed surface. This integral is easy but more involved since there are 5 surfaces over which to chose from. Also, each surface has its own $$d\vec{a}$$ to integrate over.

For the 5 surfaces I used:
• 1: $$\phi = 0$$
• 2: $$\phi = \frac{\pi}{2}$$
• 3: z = 5
• 4: z = 0
• 5: the cylindrical wall

$$\oint_S \vec{v} \circ d\vec{a} = \sum_{i=1}^5 \int_{S_{i}}$$

SURFACE 1:

$$\int_{S_{1}} = [s(...) \hat{s} + (3z) \hat{z}] \circ [- ds dz \hat{\phi}] = 0$$.

The reason is that this surface is for $$\phi = 0$$ and $$sin \phi$$ is zero. Thus the $$\hat{\phi}$$ term drops out of $$\vec{v}$$ and so the dot product is zero. IOW, no integral needs to be done.

SURFACE 2:

$$\int_{S_{2}} = [s(...) \hat{s} + (3z) \hat{z}] \circ [+dsdz \hat{\phi}] = 0$$.

Same reasoning here as with surface 1 but with $$\phi = \frac{\pi}{2}$$.

SURFACE 3:

$$\int_{S_{3}} = [s(...) \hat{s} + (s...) \hat{\phi} + (3z) \hat{z}] \circ [+sdsd\phi \hat{z}] = \int_{z=5} 3z\cdot s ds d\phi$$

$$... = 3 \times 5 \cdot \int_0^2sds \int_0^\frac{\pi}{2}d\phi$$

$$... = 15 \cdot \frac{4}{2} \frac{\pi}{2}$$

$$... = 15\pi$$

SURFACE 4:

$$\int_{S_{4}} = [s(...) \hat{s} + (s...) \hat{\phi} + (3z) \hat{z}] \circ [+sdsd\phi (-\hat{z})] = 0$$.

The reason is that this surface is for z = 0 and since only the $$\hat{z}$$ term survives the dot product, then the integral is 0. IOW, no integral needs to be done.

SURFACE 5:

$$\int_{S_{5}} = [s(2 + sin^2 \phi) \hat{s} + (s...) \hat{\phi} + (3z) \hat{z}] \circ [+s d\phi dz \hat{s}] = \int_{s=2} s^2(2 + sin^2\phi) d\phi dz$$

$$... = 4 \cdot ( \int_0^\frac{\pi}{2} 2 d\phi + \int_0^\frac{\pi}{2} sin^2\phi d\phi ) \cdot \int_0^5dz$$

$$... = 4 \cdot ( \pi + \pi ) \cdot 5$$

$$... = 4 \cdot 2\pi \cdot 5$$

$$... = 40\pi$$

Therefore, after summing all of the open surface integrals to obtain the final closed surface integral, the answer is $$55\pi$$. This of course does not equal the $$40\pi$$ for the volume integral found above. (NOTE: I suspect the integral over the 3rd open surface is wrong, but having gone over both sides of the divergence theorem I suspect the error I made can be anywhere in the entire process.

Well, that's it. I hope someone can point out yet another minor mistake which throws the whole works into disarray.

-LD

Last edited: Mar 14, 2006
2. Mar 18, 2006

### Living_Dog

Div. Thm. in Cyl Coord

SOLUTION: from another forum site: the in integral is not $$\pi$$ it's $$\frac{\pi}{4}$$ yielding the 5th integral to be $$25\pi$$. So the sum is $$40\pi$$ making the two sides equal. Thanks to all 48 who looked! :)

-LD
_________________________
http://www.angelfire.com/ny5/jbc33/

Last edited by a moderator: Apr 22, 2017