Homework Help: Negative flux?

1. Sep 9, 2009

bitrex

I'm working on an electrostatics problem that I'd appreciate some clarification on. I'm trying to compute the surface integral of a field $$\lambda(ix +jy)$$ over a surface that is the half cylinder centered on the origin parallel to the x axis - that is the end caps of the cylinder are located at 1/2*h. Now, when I'm dealing with the end cap centered on the negative x axis, the normal vector is -i, so the surface integral is negative, and when it's on the positive x axis, the normal vector is i and the surface integral is the same but positive. Does this mean that the total flux through both of these sections of the surface is zero?

Last edited: Sep 9, 2009
2. Sep 10, 2009

lanedance

hey bitrex, i think the surface integral for flux should be a dot product of the field with the surface unit normal vector

This makes it into a scalar result which is what you want for flux

That means any you need a convention for surface normal, which if I remember right will be pointing out of the volume...

this should have an effect on the net flux contribution from the endcaps

Last edited: Sep 10, 2009
3. Sep 10, 2009

bitrex

Thank you for your reply. The total flux through the surface is going to be the flux through the top of the half cylinder, plus the net flux through the end caps, plus the flux through the bottom of the cylinder, which is a plane in the X-Y plane. After doing the integral for the top half of a cylinder it turns out with the field given by $$\lambda(ix +jy)$$ the flux through the top half of a cylinder with its axis on the x axis is just $$\lambda \pi r^2$$. The flux through the bottom plane is going to be zero, you can tell by inspection because the normal vector -z is always perpendicular to the vector (ix + jy). So if the two end caps contribute 0 net flux, and the flux through the bottom plane is 0, then the charge enclosed by the surface is just $$\epsilon_0 \lambda \pi r^2$$. This is the answer in the answer key, so it looks like I did something right for once.

4. Sep 10, 2009

gabbagabbahey

What happened to the 'h'? And why do you think that the net flux through the endcaps is zero?

If I understood your problem description correctly, one of the endcaps is at $x=-\frac{h}{2}$ and the other is at $x=+\frac{h}{2}$....I don't get zero for the net flux through those endcaps.

5. Sep 10, 2009

bitrex

You're right, the integral in the -x direction is the negative unit vector times the surface area of the cap times $$-\frac{\lambda h}{2}$$. I must have done the integral for the cylinder incorrectly, which shouldn't be surprising. I'll have another look tonight.

Last edited: Sep 10, 2009
6. Sep 10, 2009

bitrex

Here is my attempt to find the flux of $$\lambda(ix +jy)$$ through the top half of the cylinder described by $$z = (r^2 -y^2)^{\frac{1}{2}}$$, with the cylinder centered at the origin and running parallel to the x axis from -1/2h to 1/2h.

Partial derivative of $$z = (r^2 -y^2)^{\frac{1}{2}}$$ with respect to x = 0. Partial derivative of the same function with respect to is $$\frac{-y}{z}$$.

So the surface integral is $$\iint -x(0) -y(\frac{-y}{z}) + 0(1) dxdy = \iint \frac{y^2}{(r^2-y^2)^{\frac{1}{2}}}dx dy$$, evaluated for x between -1/2h and 1/2h and for y between -r and r.

I try a trigonometric substitution to do the integral by substituting $$y = r cos \theta$$.

So I get $$\iint -\frac{r^2cos^2\theta}{r^2sin^2\theta}r sin \theta = \iint -r cos\theta\cot\theta d\theta$$. This is a pisser integral and I can already sense I'm on the wrong track, but I plugged it into Maxima for kicks and I get:

$$\frac{log\left( cos\left( x\right) +1\right) }{2}+\frac{log\left( cos\left( x\right) -1\right) }{2}+cos\left( x\right)$$ In any case the new limits of integration are from pi to 0, and the above function will become partially undefined when you try to use those limits. There must be an easier way to do this - any advice?

Edit: I dropped a square root in this, that's why it wasn't working out well.

Last edited: Sep 11, 2009
7. Sep 10, 2009

lanedance

i have trouble seeing latex on this computer, but here's some ideas i hope help

first i would try and simplify the required integration using the symmetry of the problem before setting up the integral:

sound like endcaps & flat part are fine

For the half cylinder the normal to the surface will always be in the y or zdir'n. This means and x component of teh vector field doesn't matter. The x intergation will just reduce to multiplying h.

So with that in mind, I would now set up the single intregal, with whatever coordinate system makes it easiest, based on the integrand & limits

have to run now, but will have another look when i can

Last edited: Sep 10, 2009
8. Sep 10, 2009

bitrex

I think the problem is that I've made the wrong substitution for Y - the surface is parametrized by $$r cos \theta i + r sin \theta j + (r^2 -y^2)^{\frac{1}{2}}k$$.

9. Sep 10, 2009

lanedance

see what you think of this, went through it pretty quickly (and can't really read my own latex)

ok so flux should be given by the integral

$$\Phi = \int \textbf{v} \bullet \textbf{dS}$$
with v vector field and dS = dS.nthe area element in direction of the normal to the surface

consider only one half of the half cylinder (a quarter cylinder), due to symmetry the flux will be twice this value. Pick positive z

we know v in cartesian coords
$$\textbf{v}= (x,y,0)$$

on the cylindrical surface, this becomes, using cylidrical parameters: x, r & theta (from 0 to pi/2)
$$\textbf{v}= (x,r.cos(\theta),0)$$

$$\textbf{n}= (0,cos(\theta),sin(\theta))$$

taking the dot product
$$\textbf{v} \bullet \textbf{n} = (x,r.cos(\theta),0) \bullet (0,cos(\theta),sin(\theta))= r cos^2(\theta)$$

then what is the area of a surface element
$$dS = r.d\theta .dx$$

the integral becomes
$$\Phi = 2\int \textbf{v}\bullet \textbf{dS}= 2 \iint \textbf{v}\bullet \textbf{n}.dS = 2 \iint d\theta .dx.r^2 cos^2(\theta) = 2hr^2 \int d\theta. cos^2(\theta)$$

10. Sep 10, 2009

bitrex

Thanks for your reply. After working on the problem for a while this evening I've come up with the same integral you did by grunging through partial derivatives of the equation of the surface in cartesian coordinates and making trig substitutions in the integral and forgetting square roots, putting them back, etc. I like your method a lot better - it would be a good skill to learn to recognize the normal vector in polar coordinates immediately. I'm wondering though why the integral of theta is from 0 to pi/2 - if we're integrating over a half a circle shouldn't it be from zero to pi?

Edit: actually, for some reason I get sine instead of cosine in the last equation.

Last edited: Sep 11, 2009
11. Sep 11, 2009

LCKurtz

No, I think you will find that the flux through the two ends are both positive and they are equal. On the back face the normal is -i and the x value on that surface is -h/2.

12. Sep 11, 2009

lanedance

no worries - I noticed the the flux will be symmetrical (ie the same) for each half of the half cylinder, so only integrated over one half of the half cylinder (ie a quarter cyclinder), but multiplied the answer by 2

Also if you integrate over the whole surface, you need to be a little more careful with your parameterisation
depends in effect on where you define theta's zero (y axis or z axis), but notice the value of the integral will be the same, ie:

$$\int^{\pi/2}_0 du.cos^2(u) = \int^{\pi/2}_0 du.sin^2(u)$$
why?

13. Sep 11, 2009

bitrex

That's what I was getting at (I think)! When I take the integral of x from 0 to -h/2 for and multiply by the negative sign because the normal vector is -i the flux through the half circle cap is going to be $$\sigma \frac{h\pi r^2}{4}$$. So the total flux through both caps is $$\sigma \frac{h\pi r^2}{2}$$. Since the total charge enclosed by the surface according to the answer key is $$h \sigma \epsilon_0 \pi r^2$$, the flux through the top of the half cylinder had better also be $$\sigma \frac{h\pi r^2}{2}$$, and after messing with that surface integral for the better part of an hour, it's looking like that may be the case.

14. Sep 11, 2009

bitrex

Thanks, I was confused for a bit as to how you split the cylinder - I had originally thought you cut it across the Y axis, now I understand that it's split down the X axis.

I think it's because cosine and sine are just functions that are in quadrature with each other, so if you integrate one between two values it's the same "area under the curve" as the other...