# Electric flux through closed surface

1. ### Defennder

2,616
1. The problem statement, all variables and given/known data
Find the total electric flux through the closed surface defined by $$p = 0.26, z = \pm 0.26$$ due to a point charge of $$60\mu C$$ located at the origin.

Note that in this question, p is defined to be what r is defined conventionally, and $\phi$ takes the place of $\theta$. This is the book's notation, not mine and I'm using it here.

I'm trying to do the surface integral in terms of cylindrical basis vectors, henceforth denoted as $$\check{p}, \check{\phi}, \check{z}$$
2. Relevant equations
I'm trying to do this question without using Gauss law or the divergence theorem.

3. The attempt at a solution
Now the surface can be seen to be that of a cylinder of radius 0.26, with the circular tops and bottom at z = -0.26 and 0.26.

The electric displacement flux density [itex]\vec{D}[/tex], I have worked out it to be $$\vec{D}(p,\phi,z) = \frac{Q}{4\pi} \frac{1}{\sqrt{p^2 + z^2}} \left ((\cos \phi + \sin \phi)\check{p} + (\cos \phi - \sin \phi) \check{\phi} + \check{z} \right)$$.

I hope I got it right.

Now the surface integral is to be performed piecewise, for the top and bottom pieces and the curved sides.

So for the curved side. the surface integral is given by $$\int_{-0.26}^{0.26} \int_0^{2\pi} \frac{Q}{4\pi} \frac{1}{\sqrt{0.26^2 + z^2} \cos \phi + \sin \phi d\phi dz$$.

I've omitted some steps such as the dot product of D with the normal vector (1,0,0) in cylindrical basis vectors.

This, strangely evaluates to 0.

For the other two tops, the surface integral is $$\int_0^{2\pi} \int_0^0.26 \frac{Q}{4\pi} \frac{1}{\sqrt{p^2 + 0.26^2} dp d\phi$$. Multiplying this result by 2, because of the symmetrical configuration gives $$Q ln (\sqrt{2} +1)$$.

But of course this isn't the case, since we know that the end result should be just Q by Gauss law, the charge enclosed in the cylinder. Where is my mistake?

2. ### Defennder

2,616
I think there's something wrong with the latex I entered earlier. These should be the correct last two expressions:

$$\int_{-0.26}^{0.26} \int_0^{2\pi} \frac{Q}{4\pi} \frac{1}{\sqrt{0.26^2 + z^2}} (\cos \phi + \sin \phi) d\phi dz$$

$$\int_0^{2\pi} \int_0^{0.26} \frac{Q}{4\pi} \frac{1}{\sqrt{p^2 + 0.26^2}} dp d\phi$$

3. ### Dick

25,893
It is 'strange' that the flux through the sides of the cylinder is zero. Because that's wrong. The field is always outward through the cylinder so the dot with the normal vector should always be positive. Hence your integrand in the first case should always be positive. Hence your field must be wrong.

4. ### Dick

25,893
In fact, I don't think the field expression has any explicit dependence on phi at all. The phi dependence of the field is in the phi dependence of the unit basis vectors p hat and phi hat.

5. ### Defennder

2,616
Ok I worked through the expression fo D again and this time I got this:

$$\vec{D}_{(p,\phi,z)} = \frac{Q}{4\pi} \left ( \frac{p}{p^2+z^2} \check{p} + \frac{z}{(p^2+z^2)^{3/2}} \check{z} \right)$$

This time, D doesn't depend on phi at all. Before I go any further, is this correct? Because I worked out the surface integral using this expression and didn't manage to get Q.

EDIT: I don't know if the Latex display is working but it doesn't seem to reflect the changes I made to the code. I used http://rogercortesi.com/eqn/index.php to check the syntax and it seemed all right.

6. ### Dick

25,893
If both denominators are supposed to be (z^2+p^2)^(3/2), then that's what I get.

7. ### Defennder

2,616
Ok I managed to get that expression for D in cylindrical basis vectors, but somehow I still can't get the answer.

Here's the flux through the curve surface:

$$\frac{Q}{4\pi} \int_{0.26}^{-0.26} \int^{2\pi}_0 \frac{p}{(p^2+z^2)^{3/2}} d\check{\phi}dz$$

This works out to be $$\frac{Q}{0.26\sqrt{2} }$$

Flux through the cylindrical tops:

$$\frac{Q}{4\pi} \int_{0}^{2\pi} \int^{0.26}_0 \frac{z}{(p^2+z^2)^{3/2}} dpd\phi$$

Multiplying this by 2 gives $$\frac{Q}{0.26\sqrt{2}}$$

Adding them up doesn't give Q, so did I setup the integrals correctly?

8. ### Dick

25,893
Not quite. The volume element isn't just dp*dphi*dz. It's p*dp*dphi*dz since you're in cylindrical (polar) coordinates. In the cylindrical integration the circumference length element is p*dphi. In the cap integral the measure is the usual polar coordinate p*dr*dphi.

9. ### Defennder

2,616
Okay I think I got it now. Thanks! I'm not too familiar with this integration in cylindrical or spherical basis vectors because I haven't taken the class yet. I'm just trying to see what I can read through and understand with my engineering electromagnetics text. It doesn't help that the lecture notes I got from my upper-level course mates have plenty of printing errors.

One last question, you referred to the surface integral as requiring a volume integration. But what does a surface integral got to do with integrating over a volume? I thought the former was integrating over a 2D surface whereas volume integration is done over 3D space?

10. ### Dick

25,893
The surface integral doesn't really require the volume element, but you do need pieces of it. It was just an example to show you have to consider not only the integrand but also the integration measure when you do these.