Surface Integrals and Gauss's Law for Electric Fields
by Paul Trow

Surface integrals are essential in many areas of science, especially electromagnetism and fluid dynamics. This article explains how to compute surface integrals, and how they are related to Gauss's law for electric fields. The article covers the following topics:


Surface Integrals of Scalar Functions


To calculate the surface integral of a function, you need to parameterize the surface - that is, express its coordinates as functions of two variables. For example, the following functions parameterize the upper half of a sphere of radius 1, centered at the origin.




The hemisphere is shown in the graph below.

You can combine the coordinate functions, X, Y, and Z, into a single vector function Φ.



Now, suppose g is a scalar function of three variables. The surface integral of g over the hemisphere is defined by the following double integral.



The region of integration is the unit disk D, which is defined by the following limits on u and v.




As an example, suppose g is the constant function 1. In this case, the integral equals the surface area of the hemisphere.


To evaluate the integral, first define a function that computes the cross product.



Note that the cross product is undefined when u2 + v2 = 1, so the integral is improper. However, its value is finite.


Next, substitute the cross product function into the integrand and insert the limits of integration.




The result is the surface area of the hemisphere.


In this example, you can simplify the integrand by rewriting the cross product as follows.



Since Φ(u,v) lies on the unit sphere, its magnitude is 1. So the integrand simplifies to



You can then evaluate the integral.



Surface Integrals of Vector Fields


A vector field is a function that assigns a vector to each point in n-dimensional space. For example, the following function F defines a 3-dimensional vector field:



The surface integral of F over the hemisphere is defined to be



where n is a unit vector that is perpendicular (or normal) to the sphere. The dot product F · n is the component of F normal to the surface.


There are actually two unit normal vectors to a surface, n and -n, which point in opposite directions. Which normal you choose for the integral depends on the specific application.


You can compute a unit normal vector by the following formula.



The graph below show the unit normal n and the vector F( Φ(u,v)), attached at the point corresponding to u = -0.2 and v = 0.8.

The blue vector is the unit normal n. The red vector is the field vector
F(
Φ(u,v)). The green vectors are the partial derivatives of Φ with respect to u and v.


If you substitute the above formula for n into the surface integral and cancel the norm of the cross product, the integral becomes


To evaluate this expression, substitute the coordinate functions X, Y, and Z for Φ (u,v).



Here's a physical interpretation for the surface integral. Think of the hemisphere as a porous surface through which a fluid is flowing, and
F(x,y,z) as the velocity vector of the fluid. Then F · n is the component of the velocity normal to the hemisphere in the outward direction. With this interpretation, the surface integral is the amount of fluid flowing outward through the hemisphere per unit time. This quantity is called the flux across the surface.


The following sections explain how surface integrals are related to Gauss's law for electric fields.


Electric Fields

 

Coulomb's law says that any two electric charges q1 and q2, which are a distance r apart, exert forces upon each other, with a magnitude proportional to



Suppose there is just a single charge q. By Coulomb's law, the charge creates a force field around it, called an electric field, which determines the force per unit charge that q exerts on any nearby charges. The diagram below illustrates an electric field in two dimensions.



The force "per unit charge" at a distance r from q is proportional to q/r2. That is, the field takes into account the magnitude of q, but not any other charges.


The following vector field describes the electric field created by a charge q located at a point (a, b, c) in space:



The expression in brackets is a vector pointing in the direction from the charge to an arbitrary point (x, y, z). The magnitude of this vector is the inverse of the square of the distance from (a, b, c) to (x, y, z). The constant ε 0 is called the permittivity of free space.



Gauss's Law


Gauss' law states that the surface integral - or flux - of an electric field E over a closed surface S is proportional to the total charge enclosed by S. As in the case of a fluid flowing through a surface, you can think of the flux as the "amount" of the electric field that passes through the surface per unit time. (Of course, for an electric field, there is no actual substance that moves.)


Here is Gauss's law:



The integral on the left is the flux of E, and Q is the sum of the charges inside S.


One consequence of Gauss's law is that the value of the flux is independent of the location of the charges inside S. Also, any charges outside of S contribute nothing to the flux.


To illustrate Gauss's law, you can compute the flux of the electric field E around a sphere of radius 1, centered at the origin. To do so, it is convenient to parameterize the sphere using spherical coordinates.






The parameter u is the angle between a point on the sphere and the positive z-axis. The parameter v is the angle between the projection of the point onto the xy-plane and the positive x-axis.The limits on u and v are




In terms of this parameterization, the surface integral of E around the sphere is given by the following double integral.



As an example, suppose that the sphere contains a charge q, of magnitude 5·10-8 , located at the point (0, 0, 0).




To compute the flux, first define a function that evaluates the integrand.



The value of the flux is



As predicted by Gauss's law, the result is the same as



Now, suppose you move the charge to a different point inside the sphere.



Now, recompute the the flux.




The flux is the same as when the charge is at the origin, as predicted by Gauss's law.


Using Gauss's Law to Find an Electric Field


Gauss's law is a very useful tool for finding the electric field produced by a collection of charges. For example, consider the electric field produced by a long, straight metal wire that has a uniform charge. Assume that the charge per unit length of the wire is λ . By symmetry, the electric field E points in a direction perpendicular to the wire, as shown in the figure below.



Now, imagine an open cylinder of radius R and length L, with the wire at its center. Since the charge on the wire is uniform, the magnitude of E is constant on the cylinder. Denote this constant value by E(R). Since E is normal to the cylinder, if n is an outward unit normal to the cylinder, then E · n is just the magnitude of E. So the flux of E over the cylinder is



As explained in last month's article, the surface integral of the constant 1 is just the surface area of the cylinder, which is



So the flux is



To apply Gauss's law, you need a closed surface, so add the top and bottom of the cylinder to close it up. Since E is perpendicular to the top and bottom, the flux of E across the the two ends is 0. So the expression above actually gives the total flux over the closed cylinder.


By Gauss's law,



Q is the charge enclosed by the cylinder, which equals the length of the wire times the charge per unit length - that is



Substituting this into the equation above and solving for E(R) gives the magnitude of the electric field at a distance R from the wire.



Download a Mathcad 14 file for this article.

Hosted by www.Geocities.ws

1