# Electric field for an infinite slab with non-uniform charge density

## Homework Statement

Given a volume charge density function defined as follows:

$\rho=\frac{dQ}{d\tau}= \begin{cases}z-z^{2} & 0<z<1\\ z+z^{2} & -1<z<0\\ 0 & \text{everywhere else} \end{cases}$
and is independent of x and y.
Determine the electric field everywhere (i.e. along the z axis) by an application of Gauss's Law in Differential form. Explain why the field is zero at $z=\pm1$

## The Attempt at a Solution

I struggled with this one for a bit, because I couldn't visualize what the math I was doing meant physically. Here's where I got:

For each of the regions holding a charge, the field produced has no x and y components (they cancel by symmetry), so the differential form of Gauss's Law becomes

$\nabla\bullet\bar{E}=\frac{\partia{lE_{z}}}{\partial{z}}= z -z^{2}$ ,
(working with one part of the slab)

I integrated this to get

$E_{z} = \frac{1}{2}z^{2} - \frac{1}{3}z^{3} + k, \text{k a constant to be determined}$

To find the constant, k, I looked at the outer edge of the surface at z = +1. I made a guess that the field here is zero because the field contribution by the thin charged sheets that make up the slab cancel (the field above a uniformly charged thin sheet of infinite dimensions is uniform). I'm going to prove this later hen I work through the problem with the integral form of Gauss's Law.
Anyway, knowing that we can find the particular solution to the differential equation above

$E_{z} = \frac{1}{2}z^{2} - \frac{1}{3}z^{3} + \frac{1}{6}$

So that's where I've gotten. I stopped only because I have no idea if what I'm doing is even remotely correct. Some help would be appreciated.

I'm using Griffiths and I can't say I've seen a D in the book yet. What is that?

rude man
Homework Helper
Gold Member
I had to delete my post. Something not right. Hope to post later.
rude amn

rude man
Homework Helper
Gold Member
I'm using Griffiths and I can't say I've seen a D in the book yet. What is that?

Griffith says del * E = rho? I don't think so.

Maybe epsilon(del * E) = rho?

I'm working on a good hint for you.

Griffith says del * E = rho? I don't think so.

Maybe epsilon(del * E) = rho?

I'm working on a good hint for you.

Much appreciated. It says div E = rho/epsilon, my mistake.

rude man
Homework Helper
Gold Member
D = εE.

If you have a layer of dielectric with permittivity ε = kε0, k > 1, next to a layer with ε = ε0, the D vector is continuous across the boundary. E is reduced in the dielectric from its value in air (vacuum) by 1/k.

rude man
Homework Helper
Gold Member
Right now, all I can think of to show that D = E = 0 just outside z = +1 is to use an infintesimally long Gaussian cylinder running from just inside z = +1 to just outside z = +1. The contained charge is zero because the charge density is zero at the boundary, so the integral of flux times cross-sectional area = 0 which means the flux itself = 0. Same for the z = -1 boundary.

If there is another way to prove this without using a gaussian surface I can't figure it out right now. Maybe later.