Gauss' law

In electrostatics we deal with positive and negative charges that serve as origins and terminators of electric field lines. If we consider closed surfaces in space and count the number of (imaginary) field lines that enter and leave the surface, one of three cases can occur:

(i) more field lines leave than enter the surface

(ii) the same number of field lines enters and leaves the surface

(iii) more field lines enter than leave the surface.

Clearly the cases correspond to the inclusion of

(i) positive net charge

(ii) no net charge

(iii) negative net charge.

Note that case 2 does not mean that no charge is included, it could be an equal number of positive and negative charges enclosed by the surface.

In Gauss' law this observation is quantified to determine the electric field generated by some charge distribution. The total flux is given as a directed surface integral of the electric field vector. Using Coulomb's law for the electric field of a point charge and the superposition principle to generalize to an arbitrary charge configuration one arrives at the result

int(E dA, closed surface) = Q/epsilon

(epsilon=permittivity=8.854E-12 C^2 N^-1 m^-2 )

Gauss' law is of practical use to calculate the electric field if symmetries guarantee that the field is constant on the surface of interest.

Examples

1) a charged rod

This problem has axial (cylindrical) symmetry. The electric field lines extend radially in a plane perpendicular to the rod. Thus, the field has zero component along the axis defined by the rod. We can make use of a cylinder as a Gaussian surface and will obtain zero contributions to the flux from the top and the bottom (surface vector perpendicular to the electric field vector). The cylinder is centered on the rod, thus, the radially emanating field lines are aligned with the surface vector on the side surface of the cylinder, and the field vector has a constant magnitude E there.

Given the radius r and height h of the cylinder we obtain for the flux:

> Phi:=2*Pi*h*r*E;

[Maple Math]

The net charge q on the rod is distributed uniformly, i.e., the linear density lambda = q / h is constant.

> q:=lambda*h;

[Maple Math]

> Gauss:=Phi=q/epsilon;

[Maple Math]

> Eofr:=solve(Gauss,E);

[Maple Math]

We found the expected result that the electric field decreases as 1/ r with the radial distance from the rod. Gauss' law was useful, since the rod's symmetry suggested to use a cylinder as a Gaussian surface, and thus the surface integral could be calculated in a trivial way.

2) the electric field of a uniformly charged spherical shell

To obtain the field outside the shell we use a sphere that surrounds the charged shell. In analogy with the previous example we can use the constancy of the field on the Gaussian surface with area 4*Pi*r^2 :

> Phi:=E*4*Pi*r^2;

[Maple Math]

The entire charge Q is contained on the spherical shell with radius R :

> Gauss:=Phi=Q/epsilon;

[Maple Math]

> Eofr:=solve(Gauss,E);

[Maple Math]

Note that r is the spherical radial distance and that this result is valid only for r > R , i.e., outside the spherical shell.

Inside the spherical shell no charge is enclosed and we must find that Q' = 0, i.e. E =0. Based on forces the result can be understood as the cancellation of contributions from Coulomb's law pulling in all directions with equal magnitude.

3) a solid non-conducting (insulating) uniformly charged sphere of radius R

Outside the sphere the result is identical to the previous one for the spherical shell.

Inside the sphere we use a Gaussian sphere of radius r and realize that it encloses Q' , a fraction of Q that changes with radius. The charges are held in place, since the sphere is not conducting.

The constant charge density is given as total charge divided by the total volume:

> rho:=Q/(4/3*Pi*R^3);

[Maple Math]

We equate the constant charge density to an expression that leads to the partial charge Q' ( Qpr ) enclosed by a sphere of radius r :

> eq:=rho=Qpr/(4/3*Pi*r^3);

[Maple Math]

> Qpr:=solve(eq,Qpr);

[Maple Math]

> Gauss:=Phi=Qpr/epsilon;

[Maple Math]

Thus, we have the E field outside the charged sphere as Eofr , and inside ( Ein ) as given below:

> Ein:=solve(Gauss,E);

[Maple Math]

At the surface they do match:

> subs(r=R,Ein); subs(r=R,Eofr);

[Maple Math]

[Maple Math]

We graph the electric field after a choice of constants:

> P1:=plot(subs(epsilon=1,R=1,Q=1,Ein),r=0..1):

> P2:=plot(subs(epsilon=1,R=1,Q=1,Eofr),r=1..5):

> with(plots):

> display({P1,P2});

[Maple Plot]

The electrostatic potential is spherically symmetric (depends on r only) and can be obtained by integration over r (in general a line integral would be required):

> Vin:=-int(Ein,r);

[Maple Math]

> Vofr:=-int(Eofr,r);

[Maple Math]

> P3:=plot(subs(epsilon=1,R=1,Q=1,Vin),r=0..1):

> P4:=plot(subs(epsilon=1,R=1,Q=1,Vofr),r=1..5):

> display({P3,P4});

[Maple Plot]

The integration constant should be adjusted for the integration of the inside part to match the potential function at r = R (with continuous derivative). However, the second derivative of V ( r ) remains discontinuous at r = R , since E' ( R ) is not defined. An example where the constants have been calculated is given below.

Exercise 1:

Use the large- r part obtained from definite integration of Eofr as a start, and use definite integration from R inwards to find the potential as a continuous function which vanishes at infinity. Note that the inside part of the potential will have to be shifted by the potential value obtained at r = R from Vofr .

Gauss' law permits us to determine electric fields for simple charge distributions with a high degree of symmetry so that the choice of Gaussian surfaces becomes obvious. It has also a great practical use for the understanding of charge distributions in conductors. In particular it follows directly that excess charges in a conductor have to reside on the outside surface. This follows as the presence of field lines inside the conductor is impossible: a conductor contains many freely moving charges that would move along the field lines until the field would be compensated. Thus, field lines can originate only from the surface of the conductor. A Gaussian surface located just underneath the surface of the object would contain zero flux, i.e., zero net charge. Only as the Gaussian surface moves infinitesimally outside the object's surface does the situation change. Thus, one introduces a surface charge density to describe the distribution of charge over the surface. It is possible to derive that the electric field near the surface is proportional to the surface density.

We conclude with a slightly less trivial example of an electric field associated with a nonuniformly charged insulating sphere:

The charge is distributed uniformly up to r = a , and then it decreases linearly to zero at r = R = 4 a /3. The region between a and 4 a /3 can be considered as a surface skin region where the charge density diminishes gradually.

The charge distribution (up to a factor rho0 ) is given as follows:

> rho0:=1;

[Maple Math]

> a:=1;

[Maple Math]

> c1:='c1': c2:='c2':

> rho:=rho0*(c1+c2*r);

[Maple Math]

> eq1:=subs(r=a,rho)=rho0;

[Maple Math]

> eq2:=subs(r=4/3*a,rho)=0;

[Maple Math]

> sol:=solve({eq1,eq2},{c1,c2});

[Maple Math]

> assign(sol);

> rho;

[Maple Math]

> P1:=plot(rho0,r=0..a):

> P2:=plot(rho,r=a..4/3*a):

> P3:=plot(0,r=4/3*a..2*a):

> with(plots):

> display({P1,P2,P3});

[Maple Plot]

It is of interest to draw the charge density contribution in such a way that one understands how the amount of accumulated charge increases as one steps from the inside out. To understand the amount contained in a spherical shell at radius r , i.e., in the window [ r , r +d r ] it is helpful to include the volume element:

> P1:=plot(r^2*rho0,r=0..a):

> P2:=plot(r^2*rho,r=a..4/3*a):

> P3:=plot(0,r=4/3*a..2*a):

> display({P1,P2,P3});

[Maple Plot]

The flux for r < a and for a < r < 4 a /3 has to be determined by calculating the amount of enclosed charge. The total charge Q is split as Q = Q 1 + Q 2 between the two regions:

For 0 < r < a we have a result that depends on r -cubed (which is obvious after integrating the r^2 times a constant)

> Q1:=rho0*(4/3*Pi*a^3);

[Maple Math]

> Q1p:=rho0*(4/3*Pi*r^3);

[Maple Math]

Up to the factor epsilon (permittivity) this constitutes the flux in the innermost part, i.e., the flux grows as the cube of the radius.

To determine the total charge contained in the region with linearly decreasing density we calculate the integral:

> Q2:=4*Pi*int(r^2*rho,r=a..4/3*a);

[Maple Math]

The flux (from the decreasing density alone, i.e., excluding Q 1) is calculated by terminating the integral at a radius r .

> Q2p:=4*Pi*subs(rp=r,int(r^2*rho,r=a..rp));

[Maple Math]

> P4:=plot(Q1p,r=0..a):

> P5:=plot(Q1+Q2p,r=a..4/3*a):

> P6:=plot(Q1+Q2,r=4/3*a..2*a):

> display({P4,P5,P6});

[Maple Plot]

We see that the flux continues smoothly at r = a , and becomes constant at r =4 a /3, the point from which on no additional charges are included when the probe sphere increases. Now we can calculate the electric field.

In region I (0 < r < a ):

> Phi:=E*4*Pi*r^2;

[Maple Math]

> Gauss:=Phi=Q1p/epsilon;

[Maple Math]

> E1:=solve(Gauss,E);

[Maple Math]

In region 2 ( a < r < 4 a /3):

> Gauss:=Phi=(Q1+Q2p)/epsilon;

[Maple Math]

> E2:=solve(Gauss,E);

[Maple Math]

and in region 3 ( r > 4 a /3):

> Gauss:=Phi=(Q1+Q2)/epsilon;

[Maple Math]

> E3:=solve(Gauss,E);

[Maple Math]

For graphing we set epsilon=1, i.e., we choose our own units:

> epsilon:=1;

[Maple Math]

> P7:=plot(E1,r=0..a):

> P8:=plot(E2,r=a..4/3*a):

> P9:=plot(E3,r=4/3*a..5*a):

> display({P7,P8,P9});

[Maple Plot]

The electric field function is now differentiable at the matching points.

> subs(r=a,diff(E1,r)),subs(r=a,diff(E2,r));

[Maple Math]

> subs(r=4/3*a,diff(E2,r)),subs(r=4/3*a,diff(E3,r));

[Maple Math]

It is worth noting how the electric field grows for constant radial charge density and then turns around to decrease while the density is decreasing linearly. This is followed by the usual 1/r^2 dependence outside the charged sphere. The skin area of the charge distribution now contains a field that interpolates smoothly between the growing and decreasing parts of the electric field.

The electrostatic potential can be obtained from a integration, which we now carry out carefully:

> V1:=-subs(rp=r,int(E1,r=0..rp));

[Maple Math]

> c1:=subs(r=a,V1);

[Maple Math]

> V2:=c1-subs(rp=r,int(E2,r=a..rp));

[Maple Math]

> c2:=subs(r=4/3*a,V2);

[Maple Math]

> V3:=c2-subs(rp=r,int(E3,r=4/3*a..rp));

[Maple Math]

> P10:=plot(V1,r=0..a):

> P11:=plot(V2,r=a..4/3*a):

> P12:=plot(V3,r=4/3*a..5*a):

> display({P10,P11,P12});

[Maple Plot]

The potential is continuous, but has an unusual constant: as the integral was started at the origin, V (0)=0; usually one defines the potential as zero at infinity.

We now determine the constant by which the potential should be shifted.

> c3:=limit(V3,r=infinity);

[Maple Math]

> P10:=plot(V1-c3,r=0..a): P11:=plot(V2-c3,r=a..4/3*a): P12:=plot(V3-c3,r=4/3*a..5*a,0..-1.1*c3):

> display({P10,P11,P12});

[Maple Plot]

Exercise 2:

Construct a radial density of your own choice with regions where the density grows as a parabola from r =0 to r = a , where it has a maximum and then falls to vanish at r = b (e.g., b =2 a ). Calculate the electric field and electric potential.

Exercise 3:

Adjust the solution from Exercise 2 such that the same total amount of charge is included as in the solved problem (by adjusting an overall factor to the density). Compare the potential from both problems, and comment on the large- r versus the small- r behaviour.