MAPLE LAB VII

Due:  December 1, 2003

line integrals, div, curl, and Green's Theorem

Computing Line Integrals:  Suppose that the velocity of the water in a sink going down a drain is given by:

 We wish to find the circulation of the fluid in the counterclockwise direction around the circle x2 + y2 = 4  when z = 2.
 

> velocity:= <(-y-z)/(x^2+y^2), (x-z)/(x^2+y^2), -z^2*(x+y)/(x^2+y^2)^2 >;

Parameterize the circle by letting  x(t) = cos t, y(t) = sin t, and z(t) = 4.

> x := cos(t);
> y := sin(t);
> z := 4;
> r := <x, y, z>;
 

We will need the VectorCalculus package:

> with(VectorCalculus):
> rprime := diff (r, t);
> circulation := Int( DotProduct(velocity, rprime ), t = 0..2*Pi);
> print(`The circulation of the vector field around the given circle is`, circulation);

Exercises:

Find the work done by the given force F over the given path:

1.   F(x,y) = xy6 i + 3x(xy5 + 2) j ,   r(t) = (2 cos t) i + (sin t) j,   0 < t < 2p.

2.   F(x,y,z) = (y+ yz cos(xyz)) i + (x2 + xz cos(xyz)) j + (z + xy cos(xyz)) k,   r(t) = (2 cos t) i + (3 sin t) j + k,   0 < t < 2p.

3.   F(x,y,z) = (2xy) i - (y2) j + (zex) k,   r(t) = -t i + t1/2j + 3t k,   1 < t < 4.

Computing divergence and curl:

Using the VectorCalculus package of Maple, we are able to compute the divergence of a vector field, the gradient vector field of a function, and the curl vector field of a given vector field. (Recall that in Lab VI we learned how to compute the gradient vector field.)
For example, consider the following:

 
> with(VectorCalculus):
> F := VectorField (<x^3,y^2,3*z+4*x>, 'cartesian' [x,y,z]);  # This command converts a vector into a vector field.
> divF :=  Divergence(F, [x,y,z]);
> curlF := Curl(F, [x,y,z]);

> g:= (x,y,z) -> sin(x*y*z) + x + 2*y + 3*z:
> gradg := Gradient(g(x,y,z), [x,y,z]);

Exercises:

4.  Let F(x,y,z) = sin(xyz) i - (x+y+z) j + log(x-z) k.   Compute curl F.

5.  Let G(x,y,z) =  (xyz) i - (sin(x-y)) j + tan(z) k.  Compute div G.

6.  Let h(x,y,z) = x/(x2+y2+z2)1/3.   Compute grad h.
 
 

Green' s Theorem:

Next we show how Maple may be used to evaluate a line integral by using Green's Theorem.  (This example is drawn from:  Abel & Braselton, Maple V By Example, Academic Press (1999).)
Let F(x,y) = (x + exp(y1/2) i + (2y + cos x) j.  Let R be the region contained in the first quadrant which is bounded by the two parabolas y = x2 and x = y2.  Let C denote the boundary of R, and let C be endowed with a positive orientation.  Evaluate the line integral of F around the closed curve C.

Using Green's theorem, we have only to evaluate the double integral of the scalar curl of F over R.  Draw the region R, and determine the limits of integration.  Next, explore the following Maple calculation:

> u := (x,y) -> x + exp(sqrt(y)):
> v := (x,y) -> 2*y + cos(x):
> vx := diff(v(x,y),x);
> uy := diff(u(x,y),y);
> scalarCurl := vx - uy;
> doubleInt := Int(Int(scalarCurl, y=x^2..sqrt(x)), x=0..1);
> evalf(doubleInt);
 

Exercises:

 7.  Let R be the triangle defined by vertices (1,2), (1,8), (7,7).  Let G be the vector field defined by
G(x,y) = x exp(y) i + cos4(x+y) j.     Using Green's theorem, evaluate the line integral of G(x,y) over the curve C.

8.   Using Green's Theorem, calculate the area of the astroid (also called the hypocycloid) given by r(t) = (cos3 t) i + (sin3 t) j, 0 < t < 2p.   Be sure to first plot the graph of the astroid.

9.  Verify Green's Theorem for the following vector field and region.   Be sure to compute separately each side of Green's equation to verify that they are equal.

F(x,y) = (arc tan y/x) i + ln (x2 + y2) j.    C is the boundary of the region defined by the 1 <  x2 + y2< 2,  y > 0. (This region is the upper half of an annulus.)

10.  Verify (by computing separately each side of Green's equation) the general version of Green's Theorem for the annulus R:   0.01 < x2 + y2 < 1, and F(x,y) = (-y/(x2 + y2)) i + (x/(x2 + y2)) j.  (Make sure that you use the correct orientation of each of the two closed curves that constitute the boundary of R.)

11.  Using the area version of Green's Theorem, calculate the area of the folium of Descartes, x3 + y3 = 3xy, parameterized by x = 3t/(1+t3), y = 3t2/(1+t3), 0 < t < +¥.    Begin by drawing the graph of the folium of Descartes. (Note that in Maple, you can set the limits of integration as follows:   t = 0..infinity)

12.   (Hughes-Hallett 860/29 CAS Challenge Problem)  Let Ca be the circle of radius a, centered at the origin, oriented in the counterclockwise direction, and let

F(x,y) = (-y +(2/3)y3) i + (2x - x3/3 + xy2) j.

(A)  Evaluate the line integral of F over Ca.  Determine which positive value of a maximizes the value of this line integral.
(Note:  To evaluate the integral involving the constant a, use the command int rather than Int.)

(B)  Use Green's Theorem to convert the line integral to a double integral.  Without evaluating the double integral, give a geometric explanation of the value of a that you found in part (A).
 


 

 Course Home Page          Department Home Page        Loyola Home Page