Gauss's Law problem

1. Feb 22, 2008

awvvu

[SOLVED] Gauss's Law problem

1. The problem statement, all variables and given/known data
An infinite slab of charge parallel to the yz-plane has density p for -b < x < b, 0 otherwise. Find the electric field at all points.

3. The attempt at a solution
I am able to do the electric field outside the slab. But I am off by a factor of 1/2 for the electric field inside. I made a Gaussian cylinder that starts at the axis to x. I'll call the area of the circular faces $A = \pi r^2$. Since there are two of these faces, net flux is $2EA$. The charge enclosed in the surface is $\rho A x$.

$$2 E A = \frac{\rho A x}{\epsilon_0} => E = \frac{\rho x}{2 \epsilon_0}$$

My book says the solution is just $\rho x / \epsilon_0$. So, I know the error probably came from saying the flux was 2EA. But, for the electric field outside the slab, I used 2EA for the flux, and since the charge enclosed in a cylinder running from -x to x, for |x| > b, was 2b, the factors of 2's cancel out. Here they don't. I can't figure out what I'm doing wrong.

I suppose I could just say the flux was one EA because the field at x = 0 is 0. But, for the next problem, I have to find the electric field for a slab whose density is $\rho(x) = \rho_0 e^{-|x/b|}$, and I still have that extra 1/2 factor in there, without the field at x = 0 being 0.

Last edited: Feb 22, 2008
2. Feb 22, 2008

Staff: Mentor

By having your Gaussian surface extend from the origin to a distance x from the origin you lose the symmetry needed to apply Gauss's law. You must have your Gaussian volume centered on the origin--that way you know that the electric field is the same at each end. Have it go from -x to +x.

3. Feb 22, 2008

awvvu

Ah, that makes sense. Thanks.