Lab 4B - Line Integrals of Vector Fields
Math 2374 - University of Minnesota
http://www.math.umn.edu/math2374
Questions to: swenson@math.umn.edu

Introduction

In last week's lab, we looked at arc length.  You should remember from class that the arc length of a curve is calculated with a line integral: the arc length of the curve C is ∫_C^ 1L, which is the same as ∫_a^b∥f ' (t) ∥t when C is parametrized by f(t), a≤t≤b.  This time, we're looking at something which is related, but distinct: line integrals of vector fields.  You should clearly separate these two concepts in your mind, and ask yourself, each time you calculate a line integral, "What kind of function am I integrating?"  In your textbook, Barr often helps by writing line integrals of scalar functions with the differential "dL," and line integrals of vector fields with the differential " • dx ."

On the other hand, you should not let yourself be confused by the symbols ∫_ ( C) and ∮_ ( C)- they mean the same thing!  The ∫_ ( C) symbol can always be used in place of ∮_ ( C). We write ∮_ ( C) when we want an extra reminder that C is a closed path (it ends at the same point where it began).  Of course, we don't write ∮_ ( C) if C is not closed!

Finally, remember that "line integral" and "path integral" are synonymous -- for this course, there is absolutely no difference between the two terms.

Example - Integration Using Mathematica

Here's a sample problem to illustrate some of the Mathematica commands we'll need this week.  You should evaluate each "evaluatable" cell as you come to it.

Calculate the integral ∫_C^ F · x, where F(x,y,z)=(z^3, y^2, x) and C is parametrized by f(t)=(t,sin(t),1), 0≤t≤π.

First, let's define and graph our functions.

In[469]:=

F[x_, y_, z_] = {z^3, y^2, x} ; f[t_] = {t, Sin[t], 1} ;  vf1 = PlotVectorField3D[F[x, ...  Show[vf1, c1, AxesTrue, AxesLabel {"X", "Y", "Z"}]

[Graphics:HTMLFiles/index_12.gif]

Out[471]=

⁃Graphics3D⁃

[Graphics:HTMLFiles/index_14.gif]

Out[472]=

⁃Graphics3D⁃

[Graphics:HTMLFiles/index_16.gif]

Out[473]=

⁃Graphics3D⁃

If you've grown to prefer an interactive view of things, evaluate the next cell.

ShowLive[vf1, c1, AxesTrue, AxesLabel {"X", "Y", "Z"}]

Which direction does C go?  Look at the definition of f, and ask your TA if you're not sure.  Then evaluate the cell below to create an animation and check your answer.  (This is the same sort of animation that you created at the end of Lab 2A; ask your TA if you don't remember how to create and view them.)  Should we expect the value of ∫_C^ F · x to be positive or negative?

In[474]:=

PathAnimate3D[f[t], {t, 0, π}, 40]

[Graphics:HTMLFiles/index_21.gif]

Now that we know what we're working with, let's calculate.  By definition, ∫_C^ F · x = ∫_a^bF (f (t)) · f ' (t) t, so we must first plug f into F, and find the derivative of f.  Here are the appropriate commands.

In[475]:=

Apply[F, f[t]] D[f[t], t]

Out[475]=

{1, Sin[t]^2, t}

Out[476]=

{1, Cos[t], 0}

Remember that we use the command Apply[F,f[t]], where you'd think that we could just use F[f[t]].  We mentioned before that this is because  Mathematica reads F[f[t]] as F[{t,Sin[t],1}], but what we really want is F[t,Sin[t],1]. Look closely until you see the difference!

Next, we need to take a dot product.  To do this, we just put a dot (a period) between the two vectors:

In[477]:=

{1, Sin[t]^2, t} . {1, Cos[t], 0}

Out[477]=

1 + Cos[t] Sin[t]^2

Finally, we integrate.

In[478]:=

Integrate[1 + Cos[t] Sin[t]^2, {t, 0, Pi}]

Out[478]=

π

The Gravitational Force, Near Earth

In this example, we consider the gravitational force field for small objects near Earth.  We approximate Earth by the xy-plane, and assume that the acceleration due to gravity is the constant g=9.8 m/s^2.  Newton's first law of motion, F=ma, gives an expression for the gravitational force on an object: mg, where m is the mass of the object.  This force pulls straight down, so the gravitational force field is F(x,y,z)=(0, 0, -mg), which should not be a surprise.  Here's a graph, for a specific value of m.

In[479]:=

m = 1 ; RowBox[{RowBox[{g, =, 9.8}], ;}]  F[x_, y_, z_] = {0, 0, -m * g} ;  vf2 = Plot ... 0, 50}, {z, -50, 50}, VectorHeadsTrue, ScaleFactorMax, ViewPoint-> {0, -3, 0}]

[Graphics:HTMLFiles/index_32.gif]

Out[482]=

⁃Graphics3D⁃

Points for Style: Since we're picturing Earth as flat, it would make more sense for the gravitational force to stop at Earth's surface.  The If command will help (you can look it up in the Help Browser).  Try it by replacing the above definition of F with F[x_,y_,z_]:={0,0,-m*g}*If[(z≤0),0,1].

Let f(t), a≤t≤b, parametrize a curve C.  Then ∫_C^ F · x represents the work done by gravity on a particle moving from the beginning of C to the end.  In other words, this is the gravitational potential energy that the particle loses (or "uses up") by following the curve C.  If you've studied physics, you should expect that this equals mgΔh = mg(f_3(a)-f_3(b)), where f=(f_1,f_2,f_3).  Let's prove this.

By definition, ∫_C^ F · x=∫_a^bF (f (t)) · f ' (t) t, and since F is constant, F(f(t)) is (0,0,-mg)=-mgk, where k=(0,0,1).  Then we have ∫_a^b (-mgk) · f ' (t) t = -mg∫_a^bf_3 ' (t) t = -mg (f_3 (b) - f_3 (a)), using the Fundamental Theorem of Calculus.

Exercise 1: Use Mathematica to check this calculation, for the path parametrized by f(t)=(50^(-t) cos(t), 50^(-t) sin(t), t^2 + 5t), 0≤t≤5.  [Specifically: Use ParametricPlot3D and Show to plot the path and the vector field together, then evaluate the integral.  Finally, check that the answer is what you expected!  Use the values m=1, g=9.8, as given above.]

The Gravitational Force, Farther From Earth

Newton's law of gravitation shows how the force of Earth's gravity on an object diminishes as the object moves farther from Earth.  If the center of the earth is at the origin (0,0,0), then the exact formula is F(v)=(GmM/(∥v∥^2)) (-v/(∥v∥)).

Here's what the letters mean:
F is the gravitational force; a vector
v is the position of the object -- the vector (x,y,z)
G is the universal gravitational constant, 6.67·10^(-11)(N · m^2)/kg^2
m is the mass of the object
M is the mass of Earth, 5.98·10^24kg

In this formula, the first factor, (GmM/(∥v∥^2)), is a scalar, which measures how strong the gravitational force will be.  The second factor, (-v/(∥v∥)), is the unit vector pointing from the object toward Earth; naturally, this is the direction of the gravitational force!

Suppose that the position of our object at time t is given by f(t), a≤t≤b.  Then the work done by Earth's gravity between time a and time b is given by the integral ∫_CF · x, where C is the curve parametrized by f.

Exercise 2: Let C be parametrized by f(t)=(0,0,R/(1 - t)), 0<t<1, where R is Earth's radius, 6.37·10^6m.
a) What are the endpoints of C -- where are they in space?
b) Calculate∫_CF · x , the work done by Earth's gravity, as a TA with mass 90 kg travels along C.  [Hint: Your answer should be negative: this represents work against gravity.]
c) Calculate the work done by gravity as a Boeing 747-400 with mass 396890 kg climbs to a cruising altitude of 10000 m.  [Hint: you may use any path with initial height R and final height R+10000.]
d) Compare your answers to parts b) and c).  What could you do to the TA with the energy from 57,285 gallons of jet fuel?
[For airliner-related questions, see http://www.boeing.com/commercial/747family/technical.html.]

A Radical New Vector Field

In the first gravitational-force example, we found that the value of the line integral of the gravitational force field depended only on the heights of the endpoints.  The same is true in the second gravitational-force example, as is shown in most textbooks.  When a vector field's line integrals depend only on the endpoints (and not on the route connecting them), the vector field is called conservative.  From the first two examples, a person might get the idea that this always happens, but it's actually pretty rare.  In the following exercise, for example, F is not conservative (hence the title of this section).

Exercise 3: Let F(x,y,z)=(y,-x,z).  For each curve C: first, animate the curve using the PathAnimate3D and/or PathTangentAnimate3D commands. Then find the endpoints of the curve (specify which is the beginning and which is the end), and evaluate ∫_C^ F · x.

a) C is the upper half of the unit circle in the xy-plane -- i.e. the half where y≥0.  [Hint: All points in the xy-plane have the same z-value -- what is it?]
b) C is parametrized by f(t)=(cos t, -sin t, sin 4t), 0≤t≤π.
c) C is contained in both the plane y=0 and the parabolic sheet z=x^2 - 1; it begins at  x=1 and ends at x=-1.
d) C is parametrized by f(t)=(-t, ^(-1/(1 - t^2)) cos (20t), ^(-1/(1 - t^2)) sin (20t)), -1≤t≤1.  [Hint: This is a hard integral to compute, even for Mathematica.  Instead of using the command Integrate in this part, use NIntegrate, which approximates the value of the integral.  Notice that f(t) is not actually defined at the two endpoints, so you'll have to integrate from "close to -1" to "close to 1."  Try integrating from -.99 to .99, then -.999 to .999, and so on, to see if the values approach something.  Ask your TA about using limits to evaluate improper integrals if this doesn't seem familiar.]

Credits


Created by Mathematica  (November 6, 2004)