1.3: Integral Calculus #
1.3.1: Line, Surface, and Volume Integrals #
In electrodynamics, we encounter several different kinds of integrals, among which the most important are line (or path) integrals, surface integrals, and volume integrals.
Line Integrals #
A line integral is an expression of the form
\[\int_a ^b \vec{v} \cdot \dd{\vec{l}} \tagl{1.48}\]where v is a vector function, \( \dd \vec{l} \) is the infinitesimal displacement vector and the integral is to be carried out along a prescribed path P from point a to point b. If the path in question forms a closed loop (that is, if \( \vec{b} = \vec{a} \), then put a circle on the integral sign:
\[\oint \vec{v} \cdot \dd \vec{l} \tagl{1.49}\]At each point on the path, we take the dot product of v (evaluated at that point) with the displacement to the next point on the pat. To a physicist, the most familiar example of a line integral is the work done by a force \( \vec{F} \): \( W = \int \vec{F} \cdot \dd \vec{l} \)
Ordinarily, the value of a line integral depends critically on the path taken from a to b, but there is an important special class of vector functions for which the line integral is independent of path and is determined entirely by the end points. It will be our business in due course to characterize this special class of vectors. (A force that has this property is called conservative.)
Example 1.6 #
As always, \( \dd \vec{l} = \dd x \vu{x} + \dd y \vu{y} + \dd z \vu{z} \). Path (1) consists of two parts. Along the “horizontal” segment, \( dy = dz = 0 \) so
\[\dd \vec{l} = \dd x \vu{x} , y = 1, \vec{v} \cdot \dd{\vec{l}} = y^2 \dd x = \dd x, \text{ so } \int \vec{v} \cdot \dd \vec{l} = \int_1 ^2 \dd x = 1 \tag{i}\]On the “vertical” stretch, dx = dz = 0, so
\[\dd \vec{l} = \dd y \vu{y}, x = 2, \vec{v} \cdot \dd \vec{l} = 2x(y+1) \dd y = 4(y+1) \dd y, \text{ so } \tag{ii} \] \[\int \vec{v} \dd \vec{l} = 4 \int_1 ^2 (y+1) \dd y = 10\]By path (1), then
\[\int _{\vec{a}} ^{\vec{b}} \vec{v} \cdot \dd \vec{l} = 1 + 10 = 11\]Meanwhile on path (2), \( x = y, \dd x = \dd y, \) and \( \dd z = 0 \), so
\[\dd \vec{l} = \dd x \vu{x} + \dd x \vu{y}, \vec{v} \cdot \dd \vec{l} = x^2 \dd x + 2x(x+1) \dd x = (3x^2 + 2x) \dd x\]and
\[\int_{\vec{a}} ^{\vec{b}} \vec{v} \cdot \dd \vec{l} = \int_1 ^2 (3x^2 + 2x) \dd x = \left. (x^3 + x^2)\right|_{1} ^2 = 10\](The strategy here is to get everything in terms of one variable; I could just as well have eliminated x in favor of y.)
For the loop that goes out (1) and back (2), then
\[\oint \vec{v} \cdot \dd \vec{l} = 11 - 10 = 1\]Surface Integrals #
A surface integral is an expression of the form
\[\int_{\mathscr{S}} \vec{v} \cdot \dd \vec{a} \tagl{1.50}\]where v is again some vector function, and the integral is over a specified surface \( \mathscr{S} \). Here \( \dd \vec{a} \) is an infinitesimal patch of area, with direction perpendicular to the surface (Fig 1.22). There are, of course, two directions perpendicular to any surface, so the sign of a surface integral is intrinsically ambiguous. If the surface is closed (forming a “balloon”), in which case I again put a circle on the integral sign
\[\oint \vec{v} \cdot \dd \vec{a}\]then tradition dictates that “outward” is positive, but for open surfaces it’s arbitrary. If v describes the flow of a fluid (mass per unit area per unit time), then \( \int \vec{v} \cdot \dd \vec{a} \) represents the total mass per unit time passing through the surface - hence the alternative name, “flux.”
Ordinarily, the value of a surface integral depends on the particular surface chosen, but there is a special class of vector functions for which it is independent of the surface and is determined entirely by the boundary line. An important task will be to characterize this special class of functions.
Example 1.7 #
Taking the sides one at a time (i) \( x = 2, \dd \vec{a} = \dd y \dd z , \vu{x}, \vec{v} \cdot \dd \vec{a} = 2xyz , \dd y \dd z = 4z \dd y \dd z \), so
\[ \int \vec{v} \cdot \dd \vec{a} = 4 \int_0 ^2 \dd y \int_0 ^2 z \dd z = 16\](ii) \( x = 0, \dd \vec{a} = -\dd y \dd z , \vu{x}, \vec{v} \cdot \dd \vec{a} = -2xyz , \dd y \dd z = 4z \dd y \dd z = 0 \), so
\[\int \vec{v} \cdot \dd \vec{a} = 0\](iii) \( y = 2, \dd \vec{a} = \dd x \dd z , \vu{y}, \vec{v} \cdot \dd \vec{a} = (x+2) , \dd x \dd z \), so
\[\int \vec{v} \cdot \dd \vec{a} = \int _0 ^2 (x + 2) \dd x \int _0 ^2 \dd z = 12\](iv) \( y = 0, \dd \vec{a} = - \dd x \dd z , \vu{y}, \vec{v} \cdot \dd \vec{a} = -(x+2) , \dd x \dd z \), so
\[\int \vec{v} \cdot \dd \vec{a} = -\int _0 ^2 (x + 2) \dd x \int _0 ^2 \dd z = -12\](v) \( z = 2, \dd \vec{a} = \dd x \dd y , \vu{z}, \vec{v} \cdot \dd \vec{a} = y(z^2 -3) , \dd x \dd y = y , \dd x \dd y \), so
\[\int \vec{v} \cdot \dd{a} = \int_0 ^2 \dd x \int_0 ^2 y \dd y = 4\]The total flux is
\[\int _{surface} \vec{v} \cdot \dd \vec{a} = 16 + 0 + 12 - 12 + 4 = 20\]Volume Integrals #
A volume integral is an expression of the form
\[\int_{V} T \dd \tau \tagl{1.51}\]where T is a scalar function and \( \dd \tau \) is an infinitesimal volume element. In Cartesian coordinates,
\[\dd \tau = \dd x \, \dd y \, \dd z \tagl{1.52}\]For example, if T is the density of a substance (which might vary from point to point), then the volume integral would give the total mass. Occasionally we shall encounter volume integrals of vector functions:
\[\int \vec{v} \dd \tau = \int (v_x \vu{x} + v_y \vu{y} + v_z \vu{z}) \dd \tau = \vu{x} \int v_x \dd \tau + \vu{y} \int v_y \dd \tau + \vu{z} \int v_z \dd \tau \tagl{1.53}\]Because the unit vectors are constants, they come outside the integral.
Example 1.8 #
1.3.2: The Fundamental Theorem of Calculus #
Suppose \( f(x) \) is a function in one variable. The fundamental theorem of calculus says
\[\int_a ^b \left( \dv{f}{x} \right) \dd x = f(b) - f(a) \tagl{1.54}\]In case this doesn’t look familiar, I’ll write it another way:
\[\int_a ^b F(x) \dd x = f(b) - f(a)\]where \( df / dx = F(x) \). The fundamental theorem tells you how to integrate \( F(x) \): you think up a function \( f(x) \) whose derivative is equal to F.
Geometrical interpretation: According to Eq. 1.33, \( df = (df / dx) dx \) is the infinitesimal change in f when you go from (x) to (x + dx). The fundamental theorem (Eq. 1.54) says that if you chop the interval from a to b (Fig. 1.25) into many tiny pieces, dx, and add up the increments df from each little piece, the result is (not surprisingly) equal to the total change in f: \( f(b) - f(a) \). In other words, there are two ways to determine the total change in the function: either subtract the values at the ends or go step-by-step, adding up all the tiny increments as you go. You’ll get the same answer either way.
Notice the basic format of the fundamental theorem: the integral of a derivative over some region is given by the value of the function at the end points (boundaries). In vector calculus there are three species of derivative (gradient, divergence, and curl), and each has its own “fundamental theorem,” with essentially the same format. I don’t plan to prove these theorems here; rather, I will explain what they mean, and try to make them plausible.
1.3.3: The Fundamental Theorem for Gradients #
Suppose we have a scalar function of three variables T(x, y, z). Starting at point a, we move a small distance \( \dd \vec{l}_1 \) (Fig 1.26). According to Eq. 1.37, the function T will change by an amount
\[\dd T = (\grad T) \cdot \dd \vec{l}_1\]Now we move a little further, by an additional small displacement \( \dd \vec{l}_2 \); the incremental change in T will be \( (\grad T) \cdot \dd \vec{l}_2 \). In this manner, proceeding by infinitesimal steps, we make the journey to point b. At each step we compute the gradient of T (at that point) and dot it into the displacement dl… this gives us the change in T. Evidently the total change in Tin going from a to b (along the path selected) is
\[\int_{\vec{a}} ^{\vec{b}} (\grad T) \cdot \dd \vec{l} = T(\vec{b}) - T(\vec{a}) \tagl{1.55}\]This is the fundamental theorem for gradients; like the “ordinary” fundamental theorem, it says that the integral (here a line integral) of a derivative (here the gradient) is given by the value of the function at the boundaries (a and b).
Geometrical Interpretation: Suppose you wanted to determine the height of the Eiffel Tower. You could climb the stairs, using a ruler to measure the rise at each step, and adding them all up (that’s the left side of Eq. 1.55), or you could place altimeters at the top and the bottom, and subtract the two readings (that’s the right side); you should get the same answer either way (that’s the fundamental theorem).
Incidentally, as we found in Ex. 1.6, line integrals ordinarily depend on the path taken from a to b. But the right side of Eq. 1.55 makes no reference to the path - only to the end points. Evidently, gradients have the special property that their line integrals are path independent:
Corollary 1: \( \int_a ^b (\grad T) \cdot \dd \vec{l} \) is independent of the path taken from a to b.
Corollary 2: \( \oint (\grad T) \cdot \dd \vec{l} = 0 \), since the beginning and end points are identical, and hence \( T(\vec{b}) - T(\vec{a}) = 0 \).
Example 1.9 #
We know a priori that the integral should be independent of the path, but we must sill pick a specific path in order to evaluate it. Let’s go out along the x axis, then up (Fig 1.27). As always, \( \dd \vec{l} = \dd x \vu{x} + \dd y \vu{y} + \dd z \vu{z}; \grad T = y^2 \vu{x} + 2xy \vu{y} \)
\[y = 0; \dd \vec{l} = \dd x \vu{x}; \grad T \cdot \dd \vec{l} = y^2 \dd x = 0 \rightarrow \int_{i} \grad T \cdot \dd \vec{l} = 0\] \[x = 2; \dd \vec{l} = \dd y \vu{y}; \grad T \cdot \dd \vec{l} = 4y \dd y \rightarrow \int_{ii} \grad T \cdot \dd \vec{l} = \left. 2y^2 \right| _0 ^1 = 2 \] The total line integral is 2. So is this consistent with what we expect from the fundamental theorem? Well, \\( T(b) - T(a) = 2 - 0 = 2 \\), so yes!1.3.4: The Fundamental Theorem for Divergences #
The fundamental theorem for divergences states that
\[\int _{\mathscr{V}} (\div \vec{v} ) \dd \tau = \oint_{\mathscr{S}} \vec{v} \cdot \dd \vec{a} \tagl{1.56}\]In honor, I suppose, of its great importance, this theorem has at least three special names: Gauss’s theorem, Green’s theorem, or simply the divergence theorem. Like the other “fundamental theorems,” it says that the integral of a derivative (in this case the divergence) over a region (in this case a volume, V) is equal to the value of the function at the boundary (in this case the surface S that bounds the volume). Notice that the boundary term is itself an integral (specifically, a surface integral). This is reasonable: the “boundary” of a line is just two end points, but the boundary of a volume is a (closed) surface.
Geometrical Interpretation: If v represents the flow of an incompressible fluid, then the flux of v (the right side of Eq. 1.56) is the total amount of fluid passing out through the surface, per unit time. Now, the divergence measures the “spreading out” of the vectors from a point-a place of high divergence is like a “faucet,” pouring out liquid. If we have a bunch of faucets in a region filled with incompressible fluid, an equal amount of liquid will be forced out through the boundaries of the region. In fact, there are two ways we could determine how much is being produced: (a) we could count up all the faucets, recording how much each puts out, or (b) we could go around the boundary, measuring the flow at each point, and add it all up. You get the same answer either way:
\[\int (\text{faucets within the volume}) = \oint (\text{flow out through the surface})\]This, in essence, is what the divergence theorem says.
Example 1.10 #
Check the divergence theorem using the function
\[\vec{v} = y^2 \vu{x} + (2xy + z^2) \vu{y} + (2yz) \vu{z} \] using a unit cube at the origin as the surface boundary (Fig 1.29).In this case
\[\div \vec{v} = 2(x + y)\]and
\[\int_V 2(x+y) \dd \tau = 2 \int_0 ^1 \dd x \int _0 ^1 \dd y \int _0 ^1 \dd z (x+y)\] \[\int _0 ^1 \dd x (x+y) = \frac{1}{2} + y, \quad \int _0 ^1 \dd y (\frac{1}{2} + y) \dd y = 1, \quad \int_0 ^1 \dd z (1) = 1\]Thus,
\[\int_{V} \div \vec{v} \dd \tau = 2\]That takes care of the volume integral part of Gauss’ Law, now how about the surface integral? We have to it in six parts, for each face of the cube:
\[\tag{i} \int \vec{v} \cdot \dd \vec{a} = \int_0 ^1 \dd y \int_0 ^1 \dd z y^2 = \frac{1}{3} \] \[\tag{ii} \int \vec{v} \cdot \dd \vec{a} = - \int _0 ^1 \dd y \int _0 ^1 \dd z y^2 = - \frac{1}{3} \] \[\tag{iii} \int \vec{v} \cdot \dd \vec{a} = \int_0 ^1 \dd x \int_0 ^1 \dd z (2x + z^2) = \frac{4}{3} \] \[\tag{iv} \int \vec{v} \cdot \dd \vec{a} = - \int _0 ^1 \dd x \int _0 ^1 \dd z (z^2) = - \frac{1}{3} \] \[\tag{v} \int \vec{v} \cdot \dd \vec{a} = \int_0 ^1 \dd x \int_0 ^1 \dd y (2y) = 1\] \[\tag{vi} \int \vec{v} \cdot \dd \vec{a} = - \int _0 ^1 \dd x \int _0 ^1 \dd y (0) = 0\]So the total flux is
\[\oint _S \vec{v} \cdot \dd \vec{a} = \frac{1}{3} - \frac{1}{3} + \frac{4}{3} - \frac{1}{3} + 1 + 0 = 2\]as we should expect.
1.3.5: The Fundamental Theorem for Curls #
The fundamental theorem for curls, which goes by the name Stokes’ Theorem, states that
\[\int _S(\curl \vec{V}) \cdot \dd \vec{a} = \oint _P \vec{v} \cdot \dd \vec{l} \tagl{1.57}\]As always, the integral of a derivative (here, the curl) over a region (here, a patch of surface, S) is equal to the value of the function at the boundary (here, the perimeter of the patch, P). As in the case of the divergence theorem, the boundary term is itself an integral-specifically, a closed line integral.
Geometrical Interpretation: Recall that the curl measures the “twist” of the vectors v; a region of high curl is a whirlpool - if you put a tiny paddle wheel there, it will rotate. Now, the integral of the curl over some surface (or, more precisely, the flux of the curl through that surface) represents the “total amount of swirl,” and we can determine that just as well by going around the edge and finding how much the flow is following the boundary (Fig. 1.31). Indeed, \( \oint \vec{v} \cdot \dd \vec{l} \) is sometimes called the circulation of v.
You may have noticed an apparent ambiguity in Stokes’ theorem: concerning the boundary line integral, which way are we supposed to go around (clockwise or counterclockwise)? If we go the “wrong” way, we’ll pick up an overall sign error. The answer is that it doesn’t matter which way you go as long as you are consistent, for there is a compensating sign ambiguity in the surface integral: Which way does \( \dd \vec{a} \) point? For a closed surface (as in the divergence theorem), \( \dd \vec{a} \) points in the direction of the outward normal; but for an open surface, which way is “out”? Consistency in Stokes’ theorem (as in all such matters) is given by the right-hand rule: if your fingers point in the direction of the line integral, then your thumb fixes the direction of \( \dd \vec{a} \) (Fig. 1.32).
Now, there are plenty of surfaces (infinitely many) that share any given boundary line. Twist a paper clip into a loop, and dip it in soapy water. The soap film constitutes a surface, with the wire loop as its boundary. If you blow on it, the soap film will expand, making a larger surface, with the same boundary. Ordinarily, a flux integral depends critically on what surface you integrate over, but evidently this is not the case with curls. For Stokes’ theorem says that \( \int (\curl \vec{v}) \cdot \dd \vec{a} \) is equal to the line integral of \( \vec{v}\ \) around the boundary, and the latter makes no reference to the specific surface you choose.
Corollary 1: \( \int (\curl \vec{v}) \cdot \dd \vec{a} \) depends only on the boundary line, not on the particular surface used.
Corollary 2: \( \oint (\curl \vec{v}) \cdot \dd \vec{a} = 0 \) for any closed surface, since the boundary line, like the mouth of a balloon, shrinks down to a point, and hence the right side of \( \eqref{1.57} \) vanishes.
Example 1.11 #
Here
\[\curl \vec{v} = (4z^2 - 2x) \vu{x} + 2z \vu{z} \quad \text{and} \quad \dd \vec{a} = \dd y \, \dd z \, \vu{x}\] (In saying that \\( \dd \vec{a} \\) points in the x direction, we are committing ourselves to a counterclockwise integral. We could as well write \\( \dd \vec{a} \\) pointing in the other direction (\\( \dd \vec{a} = - \dd y \, \dd z\, \vu{x} \\)) and perform the integral in the clockwise direction.) Since x = 0 for this surface, \[\int (\curl \vec{v}) \cdot \dd \vec{a} = \int_0 ^1 \dd y \int_0 ^1 \dd z (4z^2) = \frac{4}{3} \]Now for the line integral, which we of course break into 4 pieces:
\[\tag{i} x = 0 \quad z = 0 \quad \vec{v} \cdot \dd \vec{l} = 3y^2 \dd y, \quad \int \vec{v} \cdot \dd \vec{l} = \int _0 ^1 3y^2 \dd y = 1\] \[\tag{ii} x = 0 \quad y = 1 \quad \vec{v} \cdot \dd \vec{l} = 4z^2 \dd z, \quad \int \vec{v} \cdot \dd \vec{l} = \int _0 ^1 4z^2 \dd z = \frac{4}{3} \] \[\tag{iii} x = 0 \quad z = 1 \quad \vec{v} \cdot \dd \vec{l} = 3y^2 \dd y, \quad \int \vec{v} \cdot \dd \vec{l} = \int _1 ^0 3y^2 \dd y = -1\] \[\tag{iv} x = 0 \quad y = 0 \quad \vec{v} \cdot \dd \vec{l} = 0 \dd z, \quad \int \vec{v} \cdot \dd \vec{l} = \int _1 ^0 0 \dd z = 0\]So
\[\oint \vec{v} \cdot \dd \vec{l} = 1 + \frac{4}{3} - 1 + 0 = \frac{4}{3} \]It all checks out!
1.3.6: Integration by Parts #
The technique known (awkwardly) as integration by parts exploits the product rule for derivatives:
\[\dv{}{x} (fg) = f \left( \dv{g}{x} \right) + g \left( \dv{f}{x} \right)\]Integrating both sides, and invoking the fundamental theorem,
\[\int_a ^b \dv{}{x} (fg) \dd x = \left. fg \right| ^b _a = \int _a ^b f \left( \dv{g}{x} \right) \dd x + \int_a ^b g \left( \dv{f}{x} \right) \dd x\]or
\[\int_a ^b f \left( \dv{g}{x} \right) \dd x = - \int_a ^b \left( \dv{f}{x} \right) \dd x + \left. fg \right| ^b _a \tagl{1.58}\]That’s “integration by parts.” It applies to the situation in which you are called upon to integrate the product of one function (f) and the derivative of another (g); it says you can transfer the derivative from g to f, at the cost of a minus sign and a boundary term.
Example 1.12 #
Evaluate the integral
\[\int _0 ^\infty x e^{-x} \dd x\]The exponential can be expressed as a derivative:
\[e^{-x} = \dv{}{x} \left( - e^{-x} \right)\]in this case, then, \( f(x) = x \), \( g(x) = - e^{-x} \), and \( df /dx = 1 \), so
\[\int_0 ^\infty x e^{-x} \dd x = \int _0 ^{\infty} e^{-x} \dd x - \left. x e^{-x} \right| _{0} ^{\infty} = - \left. e^{-x} \right| _0 ^{\infty} = 1\]We can exploit the product rules of vector calculus, together with the appropriate fundamental theorems, in exactly the same way. For example, integrating
\[\div (f\vec{A}) = f(\div \vec{A}) + \vec{A} \cdot (\grad f)\]over a volume, and invoking the divergence theorem, yileds
\[\int \div (f \vec{A}) \dd \tau = \int f(\div \vec{A}) \dd \tau + \int \vec{A} \cdot (\grad f) \dd \tau \ \oint f \vec{A} \cdot \dd \vec{a}\]or
\[\int _V f(\div \vec{A}) \dd \tau = - \int _V \vec{A} \cdot (\grad f) \dd \tau + \oint _S f \vec{A} \cdot \dd \vec{a} \tagl{1.59}\]Here again the integrand is the product of one function (f) and the derivative (in this case the divergence) of another (A), and integration by parts licenses us to transfer the derivative from A to f (where it becomes a gradient), at the cost of a minus sign and a boundary term (in this case a surface integral).
In practice, this turns out to be one of the most useful tools at our disposal in vector calculus. Though you might wonder how often you’re really likely to encounter an integral involving the product of one function and the derivative of another, the answer is surprisingly often.