Answers to Test 3

This sheet provides the answers to Problems 5 and 6 in Test 3. This illustrates some of the vector calculus tools that Maple includes in its linear algebra package. If also underscores the importance of problem formulation, since most of the integrals are duck soup for Maple.

Problem 5

Let [Maple Math] be the boundary of the ellipse [Maple Math] , and consider the vector field [Maple Math] .

Calculate the work encountered in moving around the ellipse with this field by eva,luating the contour integral [Maple Math] where [Maple Math] parameterizes the ellipse.

Then apply Green's Theorem to obtain an area integral over the interior of the ellipse, and evaluate this area integral.

> restart; with(linalg):

Warning, new definition for norm

Warning, new definition for trace

> F := [x-y,x+y];

[Maple Math]

Work from the contour integral

Since the ellipse is defined by [Maple Math] , we can parameterize it with

> R := [cos(t),(1/2)*sin(t)];

[Maple Math]

Thus we get

> FdotR := dotprod(F,diff(R,t),orthogonal);

[Maple Math]

Then by substituting the parameterization into [Maple Math] we get the integrand

> integrand := subs(x=cos(t), y=(1/2)*sin(t), FdotR);

[Maple Math]

and the Work is given by

> Work := Int(integrand,t=0..2*Pi);

[Maple Math]

> Work :=int(integrand,t=0..2*Pi);

[Maple Math]

Work from the area integral

By Green's Theorem, if [Maple Math] , then [Maple Math] where the first integral is over a simple closed curve in a domain where [Maple Math] and [Maple Math] and their partials are continuous, and where the second integral is an area integral over the region bounded by the curve. But in this case we have [Maple Math] which is just

> (diff((x+y),x)-diff((x-y),y));

[Maple Math]

Thus the work is also given by [Maple Math] which is just 2 times the area of the ellipse, or

> Work := 4*int(int((diff((x+y),x)-diff((x-y),y)),y=0..(sqrt(1-x^2)/2)),x=0..1);

[Maple Math]

Problem 6

Let [Maple Math] be the surface of the cylinder defined by [Maple Math] and [Maple Math] and [Maple Math] .

Find the flux of the vector field [Maple Math] across this surface.

Apply Gauss's theorem to obtain a volume integral in terms of teh divergence of [Maple Math] and evaluate this integral.

> F := [x*y^2, y*z^2, z*x^2];

[Maple Math]

Flux from the surface integral

The critical step is to parameterize the surface of the cylinder and to determine the normals to the surface.

The normal for the top surface is simply [Maple Math] and we can use the parameterizations [Maple Math] , [Maple Math] , and [Maple Math] .

Thus we have the integrand

> FdotN1 := dotprod(F,[0,0,1]);

[Maple Math]

> integrand := subs(x=r*cos(theta),y=r*sin(theta),z=5,FdotN1);

[Maple Math]

> Flux[1] := Int(Int(integrand*r,r=0..2),theta=0..2*Pi);

[Maple Math]

> Flux[1] := int(int(integrand*r,r=0..2),theta=0..2*Pi);

[Maple Math]

The normal for the bottom surface is simply [Maple Math] and we can use the parameterizations [Maple Math] , [Maple Math] , and [Maple Math] .

But since [Maple Math] , the integrand will be identically zero. Thus this term does not contribute.

The normal for the sides is simply [Maple Math] and we can use the parameterizations [Maple Math] , [Maple Math] , and [Maple Math] .

Thus we have the integrand

> FdotN3 := dotprod(F,[x/2,y/2,0],orthogonal);

[Maple Math]

> integrand := subs(x=2*cos(theta),y=2*sin(theta),z=zeta,FdotN3);

[Maple Math]

> Flux[3] := Int(Int(integrand,zeta=0..5)*2,theta=0..2*Pi);

[Maple Math]

> Flux[3] := int(int(integrand,zeta=0..5)*2,theta=0..2*Pi);

[Maple Math]

Thus the total flux across the surface is

> Flux := Flux[1] + 0 + Flux[3];

[Maple Math]

Flux from the volume integral

By Gauss's Theorem, if [Maple Math] ,is a vector field and [Maple Math] is the outward pointing unit normal, then [Maple Math]

where the first integral is over a piecewise smooth surface and the second integral the is over the interior bounded by the surface.

> divF := diverge(F,[x,y,z]);

[Maple Math]

The integral is most naturally evaluated in terms of cylindrical coordinates: [Maple Math] , [Maple Math] , and [Maple Math] .

> integrand := subs(x=r*cos(theta),y=r*sin(theta),z=zeta,divF);

[Maple Math]

> Flux := Int(Int(Int(integrand*r,theta=0..2*Pi),r=0..2),zeta=0..5);

[Maple Math]

> Flux := int(int(int(integrand*r,theta=0..2*Pi),r=0..2),zeta=0..5);

[Maple Math]