<<

Line Dr. E. Jacobs Introduction Applications of integration to physics and engineering require an extension of the called a line integral. Line integrals are necessary to express the done along a path by a force. Line integrals are needed to describe of fluids. They are also important in describing the relationship between electric and magnetic fields. The name line integral is somewhat of a misnomer because it refers to adding up quantities along curved paths as well as along straight lines. You have already encountered the notion of a line integral when you learned about arclength in II and III. Review of Arclength If a C is described by the parametric equations x = x(t) and y = y(t) for a ≤ t ≤ b then the length along curve C is given by: s Z µ ¶ µ ¶ b dx 2 dy 2 Length(C) = + dt a dt dt The equation is simple enough to use. For example, to find the length π along the segment of the circle x = 2 cos t, y = 2 sin t for 0 ≤ t ≤ 8 we just calculate: Z q Z π/8 π/8 p π Length = (x0(t))2 + (y0(t))2 dt = 4 sin2 t + 4 cos2 t dt = 0 0 4 R q b 0 2 0 2 The expression a (x (t)) + (y (t)) dt can be understood with either a geometric or physical interpretation. The usual geometric interpretation is to split up the curve C into small segments of length ds. The length of a typical segment is approximated as a hypotenuse of a right of base dx and height dy

and therefore, by the Pythagorean Theorem: sµ ¶ µ ¶ p dx 2 dy 2 ds = (dx)2 + (dy)2 = + dt dt dt R If we use the notation C ds to symbolize the of the sum of all the segments of length ds as t ranges from a to b thenr it becomes clearer that R R ¡ ¢ ³ ´2 b dx 2 dy the length along C is represented by C ds = a dt + dt dt. For a more physical interpretation, we consider a particle moving along C with it’s position after t seconds given by ~r = hx(t), y(t)i. The velocity of d~r 0 0 the particle is ~v = dt = hx (t), y (t)i and so the speed of the particle is: p |~v| = (x0(t))2 + (y0(t))2

We can look at the formula : p ds = |~v| dt = (x0(t))2 + (y0(t))2 dt as: change in distance = (speed)(change in time) R therefore, if we look at the length of curve C, C ds as the sum of all the (speed)(time) expressions, so

Z b Z b p Total distance traveled = |~v| dt = (x0(t))2 + (y0(t))2 dt a a In three dimensions, the velocity vector has three coordinates

~v = hx0(t), y0(t), z0(t)i p and the speed is |~v| = (x0(t))2 + (y0(t))2 + (z0(t))2 so the total distance along C is:

Z Z b Z b p ds = |~v| dt = (x0(t))2 + (y0(t))2 + (z0(t))2 dt C a a

The notion of adding quantities up over a curve C applies not only to distance but to other physical quantities as well. Suppose, for example, we had electric charge distributed along this path C with a at point ~r = hx, y, zi of f(x, y, z) coulombs per meter. Then, a small segment of length ds meters would hold a charge of f(x, y, z) ds coulombs. The total charge along this path would be the limit of the sum of such quantities, which would give us: Z Total Charge along C = f(x, y, z) ds C

The computation of such an integral is similar to an calculation. For example, suppose C is a helical segment, given by

~r = hx(t), y(t), z(t)i = hπ cos t, π sin t, ti 0 ≤ t ≤ π

Let us suppose that the linear charge density at any point (x, y, z) on this 1 curve is given by f(x, y, z) = x2+y2+z2 coulomb per meter. This would mean that as we move along the helix from (π, 0, 0) at t = 0 to (−π, 0, π) at t = π, the charge density gets smaller and smaller. The density at ~r = hπ cos t, π sin t, ti is:

1 1 1 f(x, y, z) = = = x2 + y2 + z2 π2 cos2 t + π2 sin2 t + t2 π2 + t2

The charge (in coulombs) along a segment of length ds is:

f(x, y, z) ds = f(x, y, z)|~v| dt 1 p = (x0(t))2 + (y0(t))2 + (z0(t))2 dt π2 + t2 1 p = (−π sin t)2 + (π cos t)2 + 1 dt π2 + t2 √ π2 + 1 = dt π2 + t2

Therefore, the total charge is: √ √ √ Z Z π 2 2 2 π + 1 π + 1 −1 π + 1 f(x, y, z) ds = 2 2 dt = tan 1 = C 0 π + t π 4

Work Work is defined as the integral of force over distance.

Z b W = F (x) dx a

This definition is only applicable if a force F is pushing something along a straight line. You might expect that if a force is acting along a curve C then the definition of work needs to be extended to be: Z W = F (x, y, z) ds C since ds represents the change in distance along the curve. However, there is a complication. Suppose the force is directed at an angle θ to the path C.

It is only the tangential component of the force that is doing work along the path. Therefore, we should be using |F~ | cos θ in our integral. If T~ is the unit vector, then |F~ | cos θ = F~ • T~ and the expression for the work done along path C is: Z W = F~ • T~ ds C The unit tangent vector T~ can be found by dividing the tangent vector d~r ~v = dt by its length. ~v T~ = |~v| We already know from before that ds = |~v| dt so: ~v T~ ds = |~v| dt = ~v dt |~v| Therefore, if the initial point on the curve occurs at t = a and the final point is at t = b, the integral for work is given by:

Z b W = F~ • ~v dt a d~r Note that ~v dt = dt dt = d~r, so the integral for work can be written more succinctly as: Z W = F~ • d~r C This is called a line integral whether the path C is a straight line or a curve. Example: Let’s consider the same helical segment C as before:

~r = hx(t), y(t), z(t)i = hπ cos t, π sin t, ti 0 ≤ t ≤ π and let’s consider the work along this path by the force:

F~ = (z − π)~i = hz − π, 0, 0i

The force is parallel to the x-axis at all points and it is shrinking to 0 as we approach the last point (−π, 0, π) on the helical segment. At any point (x, y, z) = (π cos t, π sin t, t), the force is F~ = ht − π, 0, 0i and d~r is given by: d~r d~r = dt = h−π sin t, π cos t, 1i dt dt Therefore,

F~ • d~r = ht − π, 0, 0i • h−π sin t, π cos t, 1i dt = π(π − t) sin t dt and the work can be easily calculated using :

Z Z π W = F~ • d~r = π (π − t) sin t dt = π2 C 0

There are two interesting things to be observed about this integral. As you learned in Calculus I, reversing the limits of integration changes the answer by a negative sign: Z 0 π (π − t) sin t dt = −π2 π We interpret this as reversing direction along the path. If we start with t = π then we are beginning at the point (−π, 0, π) and if we stop with t = 0 then we are ending up at (π, 0, 0). We use the notation −C to denote the path C traversed in the opposite direction. Therefore, Z Z F~ • d~r = − F~ • d~r −C C The second interesting thing to point out is the effect of changing the path between (π, 0, 0) and (−π, 0, π). Consider the following path :

hx, y, zi = hπ − 2πt, 0, 2πt − πt2i for 0 ≤ t ≤ 1

Let’s call this path Ω. Ω is a parabolic segment connecting (π, 0, 0) to (−π, 0, π).

At any point along this path:

d~r F~ • d~r = hz − π, 0, 0i • dt dt = h2πt − πt2 − π, 0, 0i • h−2π, 0, 2π − 2πti dt = 2π(πt2 + π − 2πt) dt

Therefore, the work done by F~ along Ω is: Z Z 1 2 F~ • d~r = 2π (πt2 + π − 2πt) dt = π3 Ω 0 3 R R ~ ~ Note that C F • d~r is not the same as Ω F • d~r even though C and Ω have the same starting point and the same ending point. We say that the integral is path dependent. An important result we will encounter later is that, for certain vector fields, called conservative vector fields, the path connecting a point P to a point Q will not affect the answer. Since the path does makes a difference for F~ = (z −π)~i, this would be an example of a nonconservative vector field. Example: Let F~ = hy − x, z − y, x − zi. Integrate this vector field over the straight line segment L connecting (0, 0, 1) to (1, 2, 2). Solution: The straight line L can be described by the equation:

~r = h0, 0, 1i + th1, 2, 1i = ht, 2t, 1 + ti for 0 ≤ t ≤ 1

At any point on this line, F~ is given by:

F~ = hy − x, z − y, x − zi = h2t − t, (1 + t) − 2t, t − (1 + t)i = ht, 1 − t, −1i

The vector d~r is given by:

d~r d~r = dt = h1, 2, 1i dt dt

We can now calculate the F~ • d~r:

F~ • d~r = ht, 1 − t, −1i • h1, 2, 1i dt = (t + 2(1 − t) − 1) dt = (1 − t) dt

The line integral is therefore equal to: Z Z 1 1 F~ • d~r = (1 − t) dt = L 0 2

It is not always necessary to use a parametricD representationE of the path we d~r dx dy dz integrate over. In general, d~r = dt dt = dt , dt , dt dt = hdx, dy, dzi.

If F~ = hF1,F2,F3i then F~ • d~r = F1 dx + F2 dy + F3 dz and so the line integral can be written as: Z Z

F~ • d~r = F1 dx + F2 dy + F3 dz L L So, for example, the line integral we just did above can be written as: Z Z F~ • d~r = (y − x) dx + (z − y) dy + (x − z) dz L L In the case of the line we just considered, where x = t, y = 2t and z = 1+t, we have: y = 2x z = 1 + x Therefore, Z Z F~ • d~r = (y − x) dx + (z − y) dy + (x − z) dz L L Z 1 = (2x − x) dx + ((1 + x) − 2x) 2 dx + (x − (1 + x)) dx 0 Z 1 = (1 − x) dx 0 1 = 2 It all comes to the same thing, but there are times that a description of the path in terms of x, y and z directly might be more convenient. For example, suppose L1 denotes the straight line segment from (0, 0, 1) to (1, 2, 1) and L2 denotes the staight line segment from (1, 2, 1) to (1, 2, 2) and let L3 be the combined path along L1 followed by L2.

The work done along the combined path L3 is the sum of the work done along L1 and the work done along L2. Z Z Z F~ • d~r = F~ • d~r + F~ • d~r L3 L1 L2 Along L1, y = 2x and z = 1 so dy = 2 dx and dz = 0. Therefore: Z Z Z 1 1 F~ • d~r = (y − x) dx + (z − y) dy = (2 − 3x) dx = L1 L1 0 2

Along L2, x = 1 and y = 2 at every point so dx = dy = 0. Z Z Z 2 1 F~ • d~r = (x − z) dz = (1 − z) dz = − L2 L2 1 2 Therefore, Z Z Z 1 1 F~ • d~r = F~ • d~r + F~ • d~r = − = 0 L3 L1 L2 2 2

Please note that evenR though L and L3 have theR same initial point and the same final point, F~ • d~r is not the same as F~ • d~r, so F~ is not a L L3 conservative vector field. Example: Consider the path from (2, 0) to (0, 1) along the upper portion of the ellipse x2 2 4 + y = 1. Let’s call this path C1 because a little later we are going to consider a different path, C2, connecting these two points.

Consider the following vector field:

F~ = h−x + y, x − 2yi and calculate the line integral: Z F~ • d~r C1 √ 1 2 Let’s begin by describing the path with the equation y = 2 4 − x . It follows that dy = √−x dx 2 4−x2

F~ • d~r = (−x + y) dx + (x − 2y) dy µ ¶ 1p p −x = (−x + 4 − x2) dx + (x − 4 − x2) √ dx 2 2 4 − x2 x 2 − x2 = − dx + √ dx 2 4 − x2

To integrate over the path, we must be careful to start at x = 2 and end up at x = 0 if we want to integrate in the direction specified. Z Z Z Z 0 x 0 2 − x2 2 2 − x2 F~ • d~r = − dx + √ dx = 1 − √ dx 2 2 C1 2 2 2 4 − x 0 4 − x

The remaining integral is somewhat tedious, but if you use trigonometric R 2 2 substitution with x = 2 sin θ, then you will find that √2−x dx = 0 and 0 4−x2 therefore, Z F~ • d~r = 1 C1 The problem is actually much simpler if we use the parametric representa- tion of this ellipse: x = 2 cos t y = sin t Z Z F~ • d~r = (−x + y) dx + (x − 2y) dy C1 C1 Z π/2 = (−2 cos t + sin t)(−2 sin t dt) + (2 cos t − 2 sin t)(cos t dt) 0 Z π/2 = (2 sin t cos t + 2(cos2 t − sin2 t)) dt 0 Z π/2 = (sin 2t + 2 cos 2t) dt 0 = 1 Now, just for comparison, lets integrate from (2, 0) to (0, 1) along a different path. Let C2 be the elliptical path along the other three quarters of the ellipse.

Since the parametric representation gives us the easiest integral, let’s use π that. To traverse path C2, we simply vary t from 2π to 2 .

Z Z π/2 F~ • d~r = (sin 2t + 2 cos 2t) dt = 1 C2 2π

Thus the choice of path has made no difference. Does this mean that the integral of F~ from (2, 0) to (0, 1) is path independent? The problem is that, for all we know, there may be some other path, call it C from (2, 0) to R 3 (0, 1) where the answer for F~ • d~r comes out differently. How can we C3 resolve this? The answer lies in a line integral called a closed loop integral. Closed Loop Integrals Let’s use the same vector field F~ and the same ellipse as the last prob- lem, but this time, let’s integrate around the entire ellipse. Thus, if we start at (2, 0), we will end there as well. We can use the same parametric representation of the ellipse and simply adjust the limits of integration.

x = 2 cos t y = sin t 0 ≤ t ≤ 2π

Let’s call this path C. When the starting point is the sameH as the endpoint, the path is called a closed loop and we use the symbol for the integral.

I Z 2π F~ • d~r = (sin 2t + 2 cos 2t) dt = 0 C 0

The integral of a vector field around a closed loop is called the circulation. It is not a coincidence that the circulation is 0. This a reliable feature of path independent integrals. In general, suppose we have two different paths connecting point P to point Q. Call these paths C1 and C2. If we reverse direction along path C2, we get a closed loop C.

I Z Z Z Z F~ • d~r = F~ • d~r + F~ • d~r = F~~•d~r − F~ • d~r C C −C C C 1 2 1 2 R Thus, if the integral of a vector field is path independent and F~ • d~r R H C1 equals F~ • d~r then the circulation F~ • d~r is 0. Conversely, if the C2 C circulation is always zero, no matter what closed loop we are considering, then the integrals along two different paths C1 and C2 connecting points P to Q will always come out to be the same as each other. The circulation of a vector field is of interest for other reasons. For example, in physics the concept of circulation comes up in Ampere’s Law which relates the current I along a wire to the magnetic field B around the wire.

If C is a closed loop around the wire, the circulation of the magnetic field B is proportional to the current I. I

B~ • d~r = µ0I C Another place we need this concept is in the study of fluids. If ~v is the velocity vector field of a fluid, one of the starting points of fluid theory is that the circulation is zero. I ~v • d~r = 0 C

Circulation Per Unit Closely associated with the circulation of a vector field is the circulation per unit area. More precisely, if F~ is a vector field and C is a closed loop then the circulation per unit area is defined as: I 1 F~ • d~r Area C

where the area referred to is the area inside the closed loop. Now, suppose we shrink the closed loop down and make the area smaller. Keep making the area smaller.

If we take the limit as the area goes to zero, we are shrinking the closed loop down to a point. The limit, if it exists, will be referred to as the circulation per unit area at a point. I 1 lim F~ • d~r Area→0 Area C

If a vector field is conservative, then the circulation per unit area is going to be zero, no matter how small the area, and therefore the circulation per unit area at a point can be expected to be zero at all points. The converse also turns out to be true, but we will discuss this later when we get to a result called Stokes’ Theorem. Formula for Circulation Per Unit Area There is a simple formula for finding the circulation per unit area that is in terms of the partial of the coordinates of the vector field. There are two preliminary facts from calculus that we need to get this formula. The first is the of Integrals. If f(x) is continuous on the [a, b], then there is some point c in this interval with the property that: Z b f(x) dx = f(c)(b − a) a We also need the limit definition of the derivative:

f(x + h) − f(x) f 0(x) = lim h→0 h Please note that there are other similar limits that also come out the same way: f(x) − f(x − h) f 0(x) = lim h→0 h as well as: ¡ ¢ ¡ ¢ f x + h − f x − h f 0(x) = lim 2 2 h→0 h You can use l’Hˆopital’sRule to see that each of these limits come out equal to f 0(x). Note that the very last limit can be written as: ¡ ¢ ¡ ¢ f x + ∆x − f x − ∆x f 0(x) = 2 2 + E where lim E = 0 ∆x ∆x→0 Let us begin our analysis of the circulation per unit area by considering a closed loop parallel to the yz plane. For simplicity, we will take this loop to be a rectangular path C. There is a point (x, y, z) in the center of this loop.

We will call the four segments of this rectangular path C1, C2, C3 and C4. The integral around the rectangular loop C is the sum of the line integrals along each of the four segments: I Z Z Z Z F~ • d~r = F~ • d~r + F~ • d~r + F~ • d~r + F~ • d~r C C1 C2 C3 C4 We will assume that the four corners of this rectangle have the coordinates: µ ¶ µ ¶ ∆y ∆z ∆y ∆z x, y − , z − x, y + , z − 2 2 2 2 µ ¶ µ ¶ ∆y ∆z ∆y ∆z x, y + , z + x, y − , z + 2 2 2 2 Let’s start with path C1 and C3

Z Z Z

F~ • d~r = F1 dx + F2 dy + F3 dz = F3 dz C1 C1 C1

This is true because x and y are constant along C1 so dx = dy = 0 on this path. By the Mean Value Theorem for integrals, there is a point P ³ ´ £ ¤ with P = x, y + ∆y , z∗ for z∗ in the interval z − ∆z , z + ∆z so that 2 ³ 2 ´2 R ∆y F3 dz = F3(P)∆z. By continuity, F3(P) = F3 x, y + , z +E1 where C1 2 lim ∆z→0 E1 = 0 so Z µ ¶ ∆y F~ • d~r = F3 x, y + , z ∆z + E1∆z C1 2

Let’s write this more concisely as: Z µ ¶ ∆y F~ • d~r ≈ F3 x, y + , z ∆z C1 2

In the same way, we write the integral along C3 as: Z µ ¶ ∆y F~ • d~r ≈ −F3 x, y − , z ∆z C3 2

Please note the negative sign in front of F3 this time. This is because on ∆z ∆z C3, we start at z + 2 and end at z − 2 so the direction is the opposite of C1. Now, add these integrals together: Z Z µ ¶ µ ¶ ∆y ∆y F~ • d~r + F~ • d~r ≈ F3 x, y + , z ∆z − F3 x, y − , z ∆z C C 2 2 1  3 ³ ´ ³ ´ ∆y ∆y F3 x, y + 2 , z ∆z − F3 x, y − 2 , z =   ∆y ∆z ∆y ∂F ≈ 3 ∆y ∆z ∂y

Next, we repeat this argument for paths C2 and C4

and the result is: Z Z ∂F F~ • d~r + F~ • d~r ≈ − 2 ∆y ∆z C2 C4 ∂z H Add the results together to get an approximation for F~ • d~r. I ∂F ∂F F~ • d~r ≈ 3 ∆y ∆z − 2 ∆y ∆z ∂y ∂z The error in this approximation goes to 0 as ∆y and ∆z go to 0. Since the area inside C is Area= ∆y ∆z, the circulation per unit area is: I 1 ∂F ∂F F~ • d~r ≈ 3 − 2 Area ∂y ∂z

Therefore, I 1 ∂F ∂F lim F~ • d~r = 3 − 2 Area→0 Area ∂y ∂z So, the significance of the expression: ∂F ∂F 3 − 2 ∂y ∂z is that it represents the circulation per unit area at (x, y, z) in a plane parallel to the yz plane. What about the other planes? An analysis similar to what we have just done shows that: ∂F ∂F 1 − 3 ∂z ∂x represents the circulation per unit area at (x, y, z) in a plane parallel to the xz plane. Finally, the expression: ∂F ∂F 2 − 1 ∂x ∂y represents the circulation per unit area at (x, y, z) in a plane parallel to the xy plane. We can package all these quantities very conveniently in a vector called the defined as: µ ¶ µ ¶ µ ¶ ∂F ∂F ∂F ∂F ∂F ∂F curl F~ = 3 − 2 ~i + 1 − 3 ~j + 2 − 1 ~k ∂y ∂z ∂z ∂x ∂x ∂y

Thus, ~i • curl F~ is the circulation per unit area in the plane perpendicular to the ~i vector, ~j • curl F~ is the circulation per unit area in the plane perpendicular to the ~j vector and ~k • curl F~ is the circulation per unit area in the plane perpendicular to the ~k vector. More generally, it can be shown that if ~n is any unit vector then ~n • curl F~ is the circulation per unit area in the plane perpendicular to ~n. There is a nice formula using determinants ∂F3 ∂F2 for the curl. We write the expression ∂y − ∂z as: ¯ ¯ ∂F ∂F ¯ ∂ ∂ ¯ 3 − 2 = ¯ ∂y ∂z ¯ ∂y ∂z ¯ F2 F3 ¯

Use this notation for each coordinate of the curl ¯ ¯ ¯ ¯ ¯ ¯ ¯ ∂ ∂ ¯ ¯ ∂ ∂ ¯ ¯ ∂ ∂ ¯ curl F~ =~i ¯ ∂y ∂z ¯ −~j ¯ ∂x ∂z ¯ + ~k ¯ ∂x ∂y ¯ ¯ F2 F3 ¯ ¯ F1 F3 ¯ ¯ F1 F2 ¯ This can be written more compactly as a three by three determinant: ¯ ¯ ¯ ~ ~ ~ ¯ ¯ i j k ¯ ~ ¯ ∂ ∂ ∂ ¯ curl F = ¯ ∂x ∂y ∂z ¯ ¯ ¯ F1 F2 F3

This is commonly written as ∇ × F~ since the three by three determinant has the same algebraic form as the cross product. When a vector field F~ is conservative, the circulation per unit area is zero at every point and in every plane, regardless of the orientation of the plane. Thus, we can tell if a vector field F~ is conservative simply by checking if ∇ × F~ is the zero vector. Example: Calculate the curl of F~ = h−x + y, x − 2y, 0i ¯ ¯ ¯ ~ ~ ~ ¯ ¯ i j k ¯ ∇ × F~ = ¯ ∂ ∂ ∂ ¯ ¯ ∂x ∂y ∂z ¯ ¯ −x + y x − 2y 0 ¯ =~i(0) −~j(0) + ~k(1 − 1) = h0, 0, 0i

This verifies our observation that the integral of F~ seemed to be path inde- pendent. Example: Calculate the curl of F~ = hy − x, z − y, x − zi ¯ ¯ ¯ ~ ~ ~ ¯ ¯ i j k ¯ ~ ¯ ∂ ∂ ∂ ¯ ∇ × F = ¯ ∂x ∂y ∂z ¯ ¯ y − x z − y x − z ¯ =~i(0 − (−1)) −~j(1 − 0) + ~k(0 − 1) = h1, −1, −1i

Since curl F~ is not the zero vector, this verifies our observation that the value of the line integral between two points might change if the path connecting the two points changes. The Potential R ~ ~ ~ Let us suppose that F represents force so that C F • d~r is work. If F is a conservative vector field then the integral is pathR independent. That is, ~ if C connects point P0 to Q then the value of C F • d~r would remain the same even if we changed the path C connecting P0 to Q.

Since the path doesn’t matter, we will use the notation:

Z Q F~ • d~r P0

Suppose we took a side trip through point P to get from P0 to Q. If Γ is a path from P0 to P and Ω is a path from P to Q then: Z Z Z F~ • d~r = F~ • d~r + F~ • d~r C Γ Ω

Equivalently: Z Q Z P Z Q F~ • d~r = F~ • d~r + F~ • d~r P0 P0 P Now, let us consider the work done from point P0 = (x0, y0, z0) to P = (x, y, z). If we regard the initial point (x0, y0, z0) as a constant and the final point (x, y, z) as the variable then the work done is a function of (x, y, z) and will be denoted by φ(x, y, z)

Z P Z (x,y,z) φ(x, y, z) = F~ • d~r = F~ • d~r P0 (x0,y0,z0)

φ(x, y, z) will be referred to as the potential function for F~ . The integral R R R sum Q F~ • d~r = P F~ • d~r + Q F~ • d~r that we considered before can be P0 P0 P written as: Z Q φ(Q) = φ(P) + F~ • d~r P and therefore, Z Q F~ • d~r = φ(Q) − φ(P) P Thus, the integral of a conservative vector field between any two points can be expressed as the change in its potential function. Therefore, given a vector field F~ it would be convenient to know how to get the formula for the potential function φ. Of course, we do have an integral definition R φ(x, y, z) = P F~ • d~r and this could be used. However, if φ is obtained P0 by performing an operation on the coordinates of F~ it would make sense that we should be able to obtain the coordinates of F~ by per- forming some derivative operations on φ. Let’s begin by looking at the of φ(x, y, z) with respect to x.

∂φ φ(x + h, y, z) − φ(x, y, z) = lim ∂x h→0 h As we have just seen, φ(x + h, y, z) − φ(x, y, z) would result from a line integral.

Z (x+h,y,z) φ(x + h, y, z) − φ(x, y, z) = F~ • d~r (x,y,z) Z (x+h,y,z) = F1 dx + F2 dy + F3 dz (x,y,z) Since the line integral of this vector field is path independent, we might as well take the path to be a straight line from (x, y, z) to (x + h, y, z). This means that y and z are constant along the path, so dy = dz = 0 and we are left with: Z (x+h,y,z) φ(x + h, y, z) − φ(x, y, z) = F1 dx (x,y,z) By the Mean Value Theorem of Integrals, there is a value x∗ somewhere R (x+h,y,z) ∗ in the interval [x, x + h] such that (x,y,z) F1 dx = F1(x , y, z) h, and therefore:

Z (x+h,y,z) ∗ φ(x + h, y, z) − φ(x, y, z) = F1 dx = F1(x , y, z) h (x,y,z)

In exactly the same manner, we can show that:

Z (x,y+h,z) ∗ φ(x, y + h, z) − φ(x, y, z) = F2 dy = F2(x, y , z) h (x,y,z)

Z (x,y,z+h) ∗ φ(x, y, z + h) − φ(x, y, z) = F3 dz = F3(x, y, z ) h (x,y,z) where y∗ is some value in [y, y + h] and z∗ is some value in [z, z + h]. If we now divide by h, we get:

φ(x + h, y, z) − φ(x, y, z) = F (x∗, y, z) h 1

φ(x, y + h, z) − φ(x, y, z) = F (x, y∗, z) h 2 φ(x, y, z + h) − φ(x, y, z) = F (x, y, z∗) h 3 If we take the limit as h goes to 0, we are left with:

∂φ ∂φ ∂φ = F = F = F ∂x 1 ∂y 2 ∂z 3 This implies that F~ is the of the potential function. ¿ À ∂φ ∂φ ∂φ F~ = hF ,F ,F i = , , = ∇φ 1 2 3 ∂x ∂y ∂z

We have just established that if the integral of F~ is path independent then F~ must be the gradient of its potential function. The converse is also true. That is, if F~ = ∇φ for some scalar-valued function φ then the integral of F~ between two points P and Q must be independent of the path connecting those two points. To understand why this true, take any path C between P and Q. C will be described by parametric equations of the form:

x = x(t) y = y(t) z = z(t) for a ≤ t ≤ b

At any point t, φ will have the value φ(x(t), y(t), z(t)) on the curve. By the for Partial Derivatives,

d ∂φ dx ∂φ dy ∂φ dy d~r d~r (φ(x(t), y(t), z(t))) = + + = ∇φ • = F~ • dt ∂x dt ∂y dt ∂z dt dt dt

Therefore, Z Z Z b d~r b d F~ • d~r = F~ • dt = (φ(x(t), y(t), z(t))) dt C a dt a dt = φ(x(b), y(b), z(b)) − φ(x(a), y(a), z(a)) = φ(Q) − φ(P)

The final answer apparently comes out to φ(Q) − φ(P) regardless of which path C we have chosen. Notice that the line integral can now be written as: Z Q ∇φ • d~r = φ(Q) − φ(P) P This resembles the Fundamental Theorem of Calculus:

Z b f 0(x) dx = f(b) − f(a) a

R Q so the formula P ∇φ • d~r = φ(Q) − φ(P) is essentially a generalization of the fundamental theorem to line integrals. Example: Calculate the potential function for F~ = h−x + y, x − 2yi and use your result to recalculate the line integral of F~ over C1, the elliptical path from (2, 0) to (0, 1) that we considered earlier.

∂φ ∂φ Solution: If φ is the potential function, then ∂x = −x+y and ∂y = x−2y. Take either one of these equations, it doesn’t matter much which one, and integrate with respect to the appropriate variable. That is, either integrate −x + y with respect to x (holding y constant) or integrate x − 2y with respect to y (holding x constant). Since it doesn’t matter which we start ∂φ with, let’s choose ∂y = x − 2y. This implies that: Z φ(x, y) = (x − 2y) dy (holding x constant)

= xy − y2

You may notice that I haven’t written the usual +C at the end of this antiderivative, so xy − y2 is not the most general ∂φ 2 expression for which ∂y = x − 2y. Not only would xy − y + C also work for any constant C, but the following expressions would also work:

xy − y2 + sin x xy − y2 + ex xy − y2 + ln x + C

More generally, xy − y2 + G(x)

Since x was being held constant in our integration, x may appear in our “constant” of integration.

∂φ 2 If ∂y = x − 2y where the only condition on φ then xy − y + G(x) is the answer for any function G(x). However, there is one more condition, namely ∂φ ∂x = −x + y and this will determine a specific expression for G(x)

∂ (xy − y2 + G(x) = −x + y ∂x

y + G0(x) = −x + y so G0(x) = −x 0 1 2 If G (x) = −x then G(x) = − 2 x + C and therefore:

1 φ(x, y) = xy − y2 − x2 + C 2

Now, let’s use this to integrate F~ from (2, 0) to (0, 1). Since the integral of this F~ is path independent, we can get our answer directly with φ

Z (0,1) 1 F~ • d~=φ(0, 1) − φ(2, 0) = (−1 + C) − (− 22 + C) = 1 (2,0) 2

Notice how the +C cancels out. The +C will always cancel out when we evaluate φ(Q) − φ(P) so, from now on, we might as well choose C = 0 for calculation of other potential functions.

Example: Find the potential function for F~ = h3y2 + y, xi and calculate the line integral of this vector field over the straight line path from (0, 0) to (1, 4).

Solution: If there is a potential function φ then φ must satisfy the con- ditions: ∂φ ∂φ = 3y2 + y = x ∂x ∂y

∂φ If ∂y = x the φ(x, y) must have the form xy + G(x). If we now impose ∂φ 2 0 2 the condition ∂x = 3y + y we get the equation y + G (x) = 3y + y which leads to the contradictory result that G0(x) = 3y2. G0(x) cannot equal an expression depending on the y variable. We conclude that there is no potential function φ for this vector field.

We could have predicted this result had we calculated the curl of F~ .

¯ ¯ ¯ ~ ~ ~ ¯ ¯ i j k ¯ ~ ¯ ∂ ∂ ∂ ¯ ∇ × F = ¯ ∂x ∂y ∂z ¯ = h0, 0, −6y − yi ¯ 3y2 + y x 0 ¯ Had there been a function φ with ∇φ = F~ then:

¯ ¯ ¯ ~i ~j ~k ¯ ¯ ¯ ~ ¯ ∂ ∂ ∂ ¯ ∇ × F = ¯ ∂x ∂y ∂z ¯ ¯ ∂φ ∂φ ∂φ ¯ ¿∂x ∂y ∂z À ∂2φ ∂2φ ∂2φ ∂2φ ∂2φ ∂2φ = − , − , − ∂y∂z ∂z∂y ∂z∂x ∂x∂z ∂x∂y ∂y∂x = h0, 0, 0i

So, a good general rule is that if ∇ × F~ is not the zero vector then don’t bother looking for a function φ with F~ = ∇φ.

There are a couple of things to note about this last vector field. The first is that even though F~ = h3y2 + y, xi it doesn’t mean that we can’t calculate the line integral along the straight line path from the origin to (1, 4). Let’s call this path Γ. Along Γ, y = 4x so,

Z Z 1 (3y2 + y) dx + x dy = (3(4x)2 + 4x) dx + x (4 dx) Γ 0 Z 1 ¡ ¢ = 48x3 + 8x dx 0 = 20

The second thing to note is even though F~ = h3y2 +y, xi is not the gradient of any function, there is still a way to use potential functions to do the line integral. The vector field F~ can be split up in the following way:

F~ = h3y2 + y, xi = h3y2, 0i + hy, xi

The vector field hy, xi does indeed have a potential function. A simple calculation shows that hy, xi = ∇φ where φ = xy. So, F~ has split up into a nonconservative part and a conservative part. We can now do the R ~ calculation of Γ F • d~r using this fact: Z Z F~ • d~r = (h3y2, 0i + ∇φ) • d~r Γ ZΓ Z = h3y2, 0i • hdx, dyi + ∇φ • d~r Γ Γ Z 1 = 3(4x)2 dx + φ(1, 4) − φ(0, 0) 0 Z 1 = 48x3 dx + (1)(4) − (0)(0) 0 = 16 + 4 = 20 Next, let’s try a more three dimensional example. Example: Find the potential function φ(x, y, z) for F~ = k hx, y, zi where (x2+y2+z2)3/2 k is a constant. The significance of this vector field is that it is the same format as the gravitational force or electrostatic force. Solution: A straightforward, but slightly tedious calculation, shows that ∇ × F~ = ~0 except at the origin. So, we should be able to find a function φ(x, y.z) such that: ∂φ kx ∂φ ky ∂φ kz = = = ∂x (x2 + y2 + z2)3/2 ∂y (x2 + y2 + z2)3/2 ∂z (x2 + y2 + z2)3/2

∂φ Let’s start with the equation for ∂x . Integrate with respect to x to get an initial general expression for φ Z kx φ(x, y, z) = dx (x2 + y2 + z2)3/2

To calculate this integral, let u = x2 + y2 + z2 and remember that y and z are being held constant in this operation. Z k −k φ(x, y, z) = u−3/2 du = −ku−1/2 + G(y, z) = p + G(y, z) 2 x2 + y2 + z2 Next, we impose the condition

∂φ ky −k = on φ = p + G(y, z) ∂y (x2 + y2 + z2)3/2 x2 + y2 + z2 to obtain:

ky ∂G ky + (y, z) = (x2 + y2 + z2)3/2 ∂y (x2 + y2 + z2)3/2

∂G and therefore ∂y (y, z) = 0. From this we conclude that G is either constant or depends on z alone. Thus,

−k φ(x, y, z) = p + H(z) x2 + y2 + z2

Finally, we impose the condition

∂φ kz −k = on φ(x, y, z) = p + H(z) ∂z (x2 + y2 + z2)3/2 x2 + y2 + z2 and we obtain:

kz kz + H0(x) = (x2 + y2 + z2)3/2 (x2 + y2 + z2)3/2

Therefore, H must be a constant. We might as well choose this constant to be 0 and we are left with the potential function:

−k φ(x, y, z) = p x2 + y2 + z2

The Differential Recall from Calculus III that if φ = φ(x, y, z) then the differential of φ is given by: ∂φ ∂φ ∂φ dφ = dx + dy + dz ∂x ∂y ∂z We can write this as a dot product: ¿ À ∂φ ∂φ ∂φ ∂φ ∂φ ∂φ dφ = dx + dy + dz = , , • hdx, dy, dzi = ∇φ • d~r ∂x ∂y ∂z ∂x ∂y ∂z

Therefore, the Fundamental Theorem for Line Integrals:

Z Q ∇φ • d~r = φ(Q) − φ(P) P can be written more simply as:

Z Q dφ = φ(Q) − φ(P) P Let’s examine this relationship more closely. Suppose we have divided our path C into n subintervals.

The difference in potential between a typical point (xi, yi, zi) and the point before it is: φ(xi, yi, zi) − φ(xi−1, yi−1, zi−1)

Let’s use the notation φi to stand for φ(xi, yi, zi) The sum of all these differences on C is: Xn (φi − φi−1) i=1 If we write out the sum, we can see that most of the terms cancel:

Xn (φi −φi−1) = (φ1 −φ0)+(φ2 −φ1)+(φ3 −φ2)+···+(φn −φn−1) = φn −φ0 i=1

If the endpoints of C are P and Q, then φn = φ(Q) and φ0 = φ(P)

Xn (φi − φi−1) = φ(Q) − φ(P) i=1

All this is saying is that the sum of all the interior changes of the potential function is the change in the potential function from one endpoint to the other. That is, the sum of all the small interior changes is the net change. R Q The formula P dφ = φ(Q) − φ(P) is simply the limit of the sum as the number of points goes to infinity. Green’s Theorem H We have seen that if F~ is a conservative vector field then F~ • d~r = 0. CH ~ There is a very convenient formula, called Stokes’ Theorem, for C F•d~r that is true whether F~ is conservative or not. We shall consider the special case ~ ~ ~ where C is aH closed loop in the xy plane and F = F1(x, y)i + F2(x, y)j. The formula for C F1 dx + F2 dy for this special case is called Green’s Theorem.

∂F2 ∂F1 Let’s begin with the fact that ∂x − ∂y represents the circulation per unit area at a point. Let D denote the region enclosed by C. We can divide D into n interior pieces.

th Let’s focus on the i interior piece Di Let’s suppose that it’s boundary is Ci. The boundary will consist of at most 4 segments. Let’s call the segments Ci1, Ci2, Ci3 and Ci4

If ∆Ai denotes the area of Di then if Pi is some point in the interior, then: µ ¶ ∂F ∂F 2 (P ) − 1 (P ) ∆A ∂x i ∂y i i will approximate the circulation around Di because we are multiplying the circulation per unit area by the area. Therefore, I µ ¶ ∂F2 ∂F1 F~ • d~r ≈ (Pi) − (Pi) ∆Ai Ci ∂x ∂y H If we write F~ • d~r as the sum of the line integrals along its boundaries Ci then: Z µ ¶ X4 ∂F ∂F F~ • d~r ≈ 2 (P ) − 1 (P ) ∆A ∂x i ∂y i i j=1 Cij Add these up over the interior of D Z µ ¶ Xn X4 Xn ∂F ∂F F~ • d~r ≈ 2 (P ) − 1 (P ) ∆A ∂x i ∂y i i i=1 j=1 Cij i=1

This expression simplifies dramatically if we notice certain cancellations. Let’s look at two adjacent sections, say D1 and D2.

The circulation around D1 is: Z Z Z Z F~ • d~r + F~ • d~r + F~ • d~r + F~ • d~r C11 C12 C13 C14 and the circulation around D2 is: Z Z Z Z F~ • d~r + F~ • d~r + F~ • d~r + F~ • d~r C21 C22 C23 C24 If we were to add theseR integrals together,R we get eight line integrals. How- ever, notice that F~ • d~r = − F~ • d~r because the two integrals C12 C24 traverse the same line segment but in opposite directions. Therefore they cancel and instead of getting eight line integrals, we will really only get six line integrals once we have eliminated the terms that cancel. Now, let’s add another section D3 and to illustrate the next cancellation more clearly, let’s take this next section to be directly above D1.

The circulation around D3 is: Z Z Z Z F~ • d~r + F~ • d~r + F~ • d~r + F~ • d~r C31 C32 C33 C34 If we add this to theR six line integralsR we had before, there is some additional cancellation since F~ • d~r = − F~ • d~r. Consequently, we cancel out C31 C13 the integrals over all shared boundaries.

We continue in this manner of the entire region D. The only integrals that will not cancel will be the integrals along the outer boundary of D. I Xn X4 Z F~ • d~r = F~ • d~r C i=1 j=1 Cij Therefore, I µ ¶ Xn ∂F ∂F F~ • d~r ≈ 2 (P ) − 1 (P ) ∆A ∂x i ∂y i i C i=1 The error in approximation goes to 0 as n goes to infinity and the sum on the right approaches a double integral. I ZZ µ ¶ ∂F ∂F F~ • d~r = 2 − 1 dA C D ∂x ∂y This formula is known as Green’s Theorem. It says, essentially, that the sum of all the interior circulations will add up to the circulation around the outer boundary. Example: Let C be the triangular loop from (0, 0) to (1, 0) to (1, 1) and finally back H ~ 2 ~ to (0, 0). Let F = h4y, 6x i. Use Green’s Theorem to evaluate C F • d~r. Solution: I Z Z µ ¶ Z Z 1 x ∂F ∂F 1 x F~ • d~r = 2 − 1 dy dx = (12x − 4) dy dx = 2 C 0 0 ∂x ∂y 0 0 Calculation of Area with Green’s Theorem

If we choose special expressions F1 and F2, we can relateH area to the line integrals. For example, if F1 = 0 and F2 = x then F1 dx + F2 dy = RR ³ ´ C ∂F2 ∂F1 D ∂x − ∂y dA becomes: I ZZ x dy = 1 dA = Area(D) C D

This is not the only choice for F1 and F2 that will result in area. For example, if F1 = y and F2 = 0, then Green’s Theorem becomes: I ZZ y dx = −1 dA = −Area(D) C D Subtract these two integrals and the result is: I 2 Area(D) = −y dx + x dy C Divide by 2 and we get: I 1 Area(D) = −y dx + x dy 2 C Example: Use a line integral to find the area inside an ellipse. Solution: The parametric equations x = a cos t, y = b sin t for 0 ≤ t ≤ 2π describe the ellipse. By Green’s Theorem: I 1 Area(Ellipse) = −y dx + x dy 2 C Z 1 2π = (−b sin t)(−a sin t dt) + (a cos t)(b cos t dt) 2 0 Z 1 2π ¡ ¢ = ab sin2 t + cos2 t dt 2 0 Z ab 2π = dt 2 0 = πab