<<

Classroom Tips and Techniques: Line for Work, Circulation, and Plane Flux

Robert J. Lopez Emeritus Professor of Mathematics and Maple Fellow

© Maplesoft, a division of Waterloo Maple Inc., 2005

Introduction In our last column, we discussed how to address the iterated in Maple 9.5. This month, we will continue discussing integrals that arise in the subject area of vector . In particular, we will discuss line integrals of the tangential and normal components of a vector field.

The of the tangential component of a force field produces the work done by the force on a particle of unit mass, as the mass moves along a specified curve. For the tangential component of the velocity field of a planar fluid flow, the line integral around a closed curve - typically a circle - is the circulation of the flow. The line integral of the normal component of a vector field is the flux of the field through the curve, and is a measure of the net "flow" of the field in the direction of the normal.

If F = i + j represents the vector field in Cartesian coordinates, and is a planar curve parametrized by the equations

then work (or circulation), the line integral of the tangential component of F along , is given by

+ or

Flux, the line integral of the normal component of F along , is given by

or

(The mnemonic I always provided my students for the flux integral in the plane is that the form starts and ends with the same letters as the word "flux" and has a minus sign in the middle, thus determining where the letters and must go.)

All of these physically meaningful quantities can be computed with the LineInt command in Maple's VectorCalculus package. Thus, the LineInt command computes line integral of the tangential component of the field

F = i + j

To compute the normal component (i.e., flux) of this field through a curve , apply the LineInt command to the field

F* = i + j

(Incidentally, the mnemonic I always provided my students for the flux integral in the plane is that the form starts and ends with the same letters as the word "flux" and has a minus sign in the middle, thus determining where the letters and must go.)

In addition to the LineInt command, Maple provides a PathInt command that we will discuss at the end of this column. The LineInt Command along an Arbitrary Curve If F is a vector field, then along a curve specified parametrically in Cartesian coordinates, the line integral of the tangential component of F is given by the syntax

LineInt(F, Path(< >, t = a .. b)) where

LineInt(F, Path(< , ... >, t = a .. b)) is the obvious generalization to higher dimensions. Initialization restart; interface(warnlevel=0): with(VectorCalculus): with(Student[Precalculus]): with(plots): BasisFormat(false): Example 1 The work done by the vector field F = i + j where f := x*y; g := x+y;

so that F := VectorField(, cartesian[x,y]);

as it acts on a unit mass moving along the curve X := 1+t-t^2; Y := 3*t^2-5*t-7; t0 := 0; tf := 1;

is given by the line integral Work := LineInt(F, Path(, t=t0..tf), inert);

whose value can be obtained from either value(Work); 421 30 or LineInt(F, Path(, t=t0..tf)); 421 30 The positive value of this line integral indicates that the field does work on the particle, that is, the field causes the particle to move along the curve . Line Integrals along Some Special Curves Special cases in which the curve can be specified directly include

1) LineInt(F, Line(< >, < >))

2) LineInt(F, LineSegments(< >, ..., < >))

3) LineInt(F, Circle(< >, r))

4) LineInt(F, Circle3D(< >, , < >))

5) LineInt(F, Ellipse( ( ))

6) LineInt(F, Arc(Circle(< >, r), ))

7) LineInt(F, Arc(Ellipse( ( ), , ))

In (1), the curve consists of the line segment connecting the points and . This form generalizes to the -dimensional case in the obvious way.

In (2), the curve consists of the polygonal line sequentially connecting the points , with an obvious generalization to the -dimensional case. For a closed polygonal path, the first point should be repeated as the last point.

In (3), the curve is a circle with center and radius .

In (4), the curve , a circle in , lies in the plane containing ( ), the center of the circle, and having the vector u i + v j + w k as its normal. The radius of the circle is .

In (5), the curve is the ellipse determined by the equation . (To enter the equation of the ellipse, type it as (x-h)^2 / a^2 + (y-k)^2 / b^2 - 1.)

In (6) and (7), the curve is an arc of the respective circle or ellipse. The parameters and are the angles subtending the required arc. The angles are measured in radians from the positive - axis.

The LineInt command in any of its forms computes line integral of the tangential component of the field

F = i + j

To compute the normal component (i.e., flux) of this field through a curve , apply the LineInt command to the field

F* = i + j Example 2 The work done by the field F;

on a unit mass moving along the line segment connecting the points P1 := <1,2>; P2 := <3,7>;

is given by the line integral Work := LineInt(F, :-Line(P1,P2),inert);

whose value can be obtained either by value(Work); 313 6 or LineInt(F, :-Line(P1,P2)); 313 6 (In each call to the LineInt command containing the parameter Line, we have used the syntax :-Line. This forces Maple to use the Line parameter from the VectorCalculus package, and not the Line command from the Precalculus subpackage of the Student package. This subpackage was loaded in anticipation of its use below, for obtaining the equation of the line connecting the given points.)

To obtain this result by first principles, parametrize the line segment as P := P1+t*(P2-P1): = P;

and write

as Int(eval(convert(F,Vector).diff(P,t), [x=P[1],y=P[2]]), t=0. .1);

which compares favorably with Work;

The equation line := Line(P1,P2)[1]; is an alternate representation of the line, so the required line integral becomes

that is, work := Int(eval(convert(F,Vector).<1,diff(rhs(line),x)>, line), x=P1[1]..P2[1]): work = value(work);

Example 3 The work done by the field F;

on a unit mass moving counterclockwise along the boundary of the triangle whose vertices are P1 := <1,3>; P2 := <4,-7>; P3 := <8, 5>; is given by the line integral Work := LineInt(F, LineSegments(P1,P2,P3,P1),inert);

whose value can be obtained either by value(Work); or LineInt(F, LineSegments(P1,P2,P3,P1));

The negative value of the work done by the field on the particle indicates that energy must be put into the system for the particle to move along the curve . Thus, an external agent must push the particle against the resistive force exerted by the field.

An equivalent solution from first principles would require the tedious repetition of the techniques demonstrated in Example 2. Example 4 The work done by the field F;

on a unit mass moving counterclockwise around a circle with center and radius 5, is given by the line integral Work := LineInt(F, Circle(<2,3>,5),inert): Work = value(Work);

To compute the flux of this field in the direction of the outward normal along this circle, form the vector field F_flux := VectorField(<-g,f>, cartesian[x,y]);

and write the line integral flux := LineInt(F_flux, Circle(<2,3>,5), inert); whose value is value(flux);

The positive value of the flux indicates that the net flow of the field is along the normal. But in what direction does the normal Maple used point?

Since the circle is a closed curve, we expect the normal to be the outward normal. Traversing the circle in the counterclockwise direction with the interior of the circle to the left means the exterior of the circle, and hence the outward normal, is to the right.

Parametrizing the circle with X := 2 + 5*cos(t); Y := 3 + 5*sin(t);

means the circle is traversed counterclockwise as increases. Moreover, a unit vector to the circle and pointing in the direction of motion is given by

T = so that a unit vector orthogonal and to the right of T is

N =

Thus, we can write

F . N = . = = .

= F* . T so that the line integral FLUX := Int(eval(convert(F_flux,Vector).diff(,t), [x=X,y= Y]), t=0..2*Pi): FLUX = value(FLUX); is the flux integral in which the normal is clearly outward. Since it the same line integral as Maple's, we see that Maple did indeed choose the outward normal. Example 5 The work done by the field F;

on a unit mass moving counterclockwise around the ellipse E := (x-2)^2/9 + (y-3)^2/16 - 1: E = 0; is given by the line integral Work := LineInt(F, Ellipse(E),inert): Work = value(Work);

To compute the flux of this field in the direction of the outward normal along this ellipse, form the vector field F_flux := VectorField(<-g,f>, cartesian[x,y]);

and write the line integral flux := LineInt(F_flux, Ellipse(E), inert);

whose value is value(flux);

The positive value of the flux indicates that the net flow of the field is along the normal. But in what direction does the normal Maple used point?

Since the ellipse is a closed curve, we expect the normal to be the outward normal. Traversing the ellipse in the counterclockwise direction with the interior of the ellipse to the left means the exterior of the ellipse, and hence the outward normal, is to the right. Parametrizing the ellipse with X := 2 + 3*cos(t); Y := 3 + 4*sin(t);

means the ellipse is traversed counterclockwise as increases. Moreover, a vector tangent to the ellipse and pointing in the direction of motion is given by

T = so that a vector orthogonal and to the right of T is

N =

Thus,

F . N = . = = . = F* . T

Thus, the line integral FLUX := Int(eval(convert(F_flux,Vector).diff(,t), [x=X,y= Y]), t=0..2*Pi): FLUX = value(FLUX);

is the flux integral in which the normal is clearly outward. Since it the same line integral as Maple's, we see that Maple did indeed choose the outward normal. Example 6 Suppose the center of a circle is (3, 2, 5), its radius is 2, and it lies in the plane whose normal is the vector N = -3 i + 2 j + k. Find the work done by the field F := VectorField(, cartesian[x,y,z]);

on a unit mass moving counterclockwise around a circle in .

Write the center, normal vector, and position vector as C := <3,2,5>: N := <-3,2,1>: X := : C,N,X;

then use Maple's LineInt command to compute L := LineInt(F, Circle3D(C,2,N));

It is surprising to see that the unevaluated integral is LineInt(F, Circle3D(C,2,N), inert);

At first glance, an iterated double integral for a line integral appears to be a grave error. However, Stokes' theorem has been invoked, so the line integral of the tangential component of F is equivalent to the flux of the of F through a capping surface.

We can verify this calculation by parametrizing the circle and actually computing the line integral along this space curve. To this end, we write S1 := DotProduct(X-C,X-C) = 4; S2 := DotProduct(X-C,N) = 0;

which are, respectively, the equations of the sphere with center (3, 2, 5) and radius 2, and the plane containing (3, 2, 5) and having normal N. The intersection of these surfaces is the prescribed circle, the equations for which are given parametrically by q := allvalues(solve({S1,S2},{y,z})): C1 := eval([x,y,z],q[1]); C2 := eval([x,y,z],q[2]);

The parameter along each branch of the circle is , and we find the domain for as the zeros of d := op([2,3,2,1],C1); the quantity under the radicals in the parametric form for each branch. These bounds are then found to be a,b := solve(d,x): 'a' = a; 'b' = b;

The circle must be traversed counterclockwise. The following animation shows how the projection of the branches to the -plane are traced as varies from to . The projection of branch is traced in black, while for , it is traced in red. p1 := animatecurve([x,C1[2],x=a..b], frames=20, color=black, numpoints=500): p2 := animatecurve([x,C2[2],x=a..b], frames=20, color=red, numpoints=500): display([p1,p2], scaling=constrained); 3

2

1

2 3 4 The animation shows that to traverse the circle in a counterclockwise direction, the parameter must advance from to along branch , but from to along branch . Hence, the line integral along F is given by the sum LineInt(F, Path(Vector(C1),x=b..a)) + LineInt(F, Path(Vector (C2),x=a..b));

which compares favorably with L;

Figure 6.1 shows N, the circle, and the plane in which it lies. p3 := implicitplot3d(S2, x=1.5..4.5, y=0..4,z=2.5..7.5, style= patchnogrid): p4 := spacecurve(C1, x=a..b, color=black, thickness=2, numpoints=1000): p5 := spacecurve(C2, x=a..b, color=black, thickness=2, numpoints=1000): p6 := arrow(C, N, color=red): display([p||(3..6)], scaling=constrained, axes=box, view=2.5. .7.5, orientation=[-165,75], title="Figure 6.1"); Figure 6.1

The PathInt Command The PathInt command computes "the path integral of a from to " where the definition of a "path integral" is inferred from the following example.

The path integral of the function f := x^2 + y^2; along the path , is given by PIf := PathInt(f, [x,y]=Path(, x=0..1), inert): PIf = evalf(PIf); In the integrand, the function has been evaluated along the path, then multiplied by the element of along the path.

In an attempt to understand the origins of this construct, we hypothesize that it arises from the definition of the line integral of the tangential component of the field F = i + j. Thus, if T is a unit tangent vector along the path , one computes the line integral of

F . T

where is the element of arc length along . If is expressed in radius-vector form and parametrized by , the arc length, its with respect to is the unit tangent vector T. Thus,

T = =

and

T . = =

so that F . T becomes . Consequently, the integrand of Maple's PathInt is not just one component of the work, circulation, or flux integrals.

Legal Notice: The copyright for this application is owned by Maplesoft. The application is intended to demonstrate the use of Maple to solve a particular problem. It has been made available for product evaluation purposes only and may not be used in any other context without the express permission of Maplesoft.