Second, we may use Gauss's law for the sphere:
Here
the surface integral for flux goes over the spherical surface at radius R, with normal
.
is then
. Furthermore
is constant over our surface of fixed r=R, and may be
factored out of the integral. Thus Gauss' law gives
using the surface area for the sphere (easily integrated, noting that
.) Plugging in the given
gives
in agreement with the direct integration above.
The charge enclosed by the Gaussian surface is just its z-height times the uniform charge line density
:
The surface integral for flux goes over the complete Gaussian surface:
the cylindrical shell at s = S (with normal
), a top circle at z=h (with normal
), and a
bottom circle at z = -h (with normal
). Since
points radially outward (the
direction), the only part of
the surface with nonzero
is the cylindrical
shell, where
and the surface's normal vector align. Note
that this surface is at constant s, so
is constant over
the surface, and may be factored out of the integral. Thus Gauss' law
gives
using the surface area for the cylinder (easily integrated, noting that
.). Equating the 2 expressions for enclosed charge,
or
We may also directly integrate the charge enclosed
Equating the 2 expressions for enclosed charge,
or
Note that since
points in the y-direction, only the top and
bottom surfaces, with normals
, can make any contribution
to the flux integral. On the bottom surface, at y=0,
so there is no contribution. So the total flux integral for the
Gaussian surface shown is
since
is independent of x and z and can be factored out of the area integral.
The charge enclosed by the surface is
If Y;SPMlt;d, our Gaussian volume lies completely in the slab where
is constant, so
If Y;SPMgt;d,
is not constant within our Gaussian volume, but vanishes for y;SPMgt;d. The enclosed charge is thus
since
is constant where it is nonzero.
Using Gauss' law, then
or
so this is an impossible electrostatic field.
so this is a viable electrostatic field.
This path is chosen because along the first leg,
vanishes when
y=0, and along the second leg,
vanishes when y=0. There is
thus a nonzero
only on the third leg, where
and
is nonzero. Thus
which is easily checked to reproduce the correct
.
The potential is just
since the electric field points in the
direction. Here we've chosen our reference point
not at infinity, but at some finite radius a, since we will find that the potential diverges at infinity. This gives
Note that this potential reproduces the correct electric field. It
approaches minus infinity infinitely far from the wire, and plus
infinity as
. This means, for example, that all
negative charges are bound by the wire, no matter how energetic they
are.