MAPLE hints on doing homework 10, sm311o

The assigned prolems in section 10.3 primarily deal with computing a surface integral, so a few examples are given below. Similar ideas can use used to do the other problems in the section.

sm311o_hwk10.mws,4-12-98,wdj

> with(linalg):
with(plots):

Problem 1(a), section 10.3 in Advanced Engineering Mathematics, vol 2 Compute the surface integral of f(x,y,z)=[z2,y2,x2] over the surface S given by a rectangle of sides 1 and 2 in the xy plane centered at the origin with sides parallel to the axes.

> F:=(x,y,z)->vector([z^2,y^2,x^2]);

[Maple Math]

> r:=(u,v)->[u,v,0];
The hard part is parameterizing the surface you are computing the surface integral of.

[Maple Math]

> plot3d(r(u,v),u=(-1/2)..(1/2),v=-1..1,axes=FRAMED,title=`surface S parameterized by r(u,v)`);

[Maple Plot]

> ru:=(u0,v0)->subs({u=u0,v=v0},diff(r(u,v),u)):
ru(u,v);
rv:=(u0,v0)->subs({u=u0,v=v0},diff(r(u,v),v)):
rv(u,v);
n:=(u,v)->crossprod(ru(u,v),rv(u,v)):
n(u,v);
This vector field n(u,v) is normal to the surface S parameterised by r(u,v)

[Maple Math]

[Maple Math]

[Maple Math]

> surface_integral:=Int(Int(dotprod(F(op(r(u,v))),n(u,v)),u=(-1/2)..(1/2)),v=-1..1);
int(int(dotprod(F(op(r(u,v))),n(u,v)),u=(-1/2)..(1/2)),v=-1..1);

[Maple Math]

[Maple Math]

>

Problem 1(e), section 10.3 in Advanced Engineering Mathematics, vol 2 Compute the surface integral of f(x,y,z)=[x,-y,0] over the surface S given by a disc of radius 1 in the yz plane centered at (0,1,0).

> F:=(x,y,z)->vector([y,-x,0]);

[Maple Math]

> r:=(u,v)->[0,sqrt(2)*u*cos(v)+1,sqrt(2)*u*sin(v)];
This is the parameterization of the disk of radius 2 centered at (0,1,0).

[Maple Math]

> plot3d(r(u,v),u=0..sqrt(2),v=0..(2*Pi),axes=FRAMED,title=`surface S parameterized by r(u,v)`);

[Maple Plot]

> ru:=(u0,v0)->subs({u=u0,v=v0},diff(r(u,v),u)):
ru(u,v);
rv:=(u0,v0)->subs({u=u0,v=v0},diff(r(u,v),v)):
rv(u,v);
n:=(u,v)->crossprod(ru(u,v),rv(u,v)):
n(u,v);
This vector field n(u,v) is normal to the surface S parameterised by r(u,v)

[Maple Math]

[Maple Math]

[Maple Math]

> surface_integral:=Int(Int(dotprod(F(op(r(u,v))),n(u,v)),u=0..sqrt(2)),v=0..(2*Pi));
int(int(dotprod(F(op(r(u,v))),n(u,v)),u=0..sqrt(2)),v=0..(2*Pi));

[Maple Math]

[Maple Math]

The ellipsoid x2/a2 + y2/b2 + z2/c2 = 1 is parameterized by

r(u,v) = [asin(u)cos(v),sin(u)sin(v),ccos(u)],

where u = psi and v = theta are the usual angles in spherical coordinates.

Problem 6, section 10.3 Consider the surface S given by the equation 2x2 +5y2+9z2=7 and f(x,y,z)=(0,0,x2). Find the flux of f through S.

> F:=(x,y,z)->vector([x^2,0,0]);

> r:=(u,v)->[a*cos(u)*sin(v),b*sin(u)*sin(v),c*cos(v)];
You must input the values of a,b,c here

[Maple Math]

[Maple Math]

> plot3d(r(u,v),u=0..(Pi/2),v=0..(2*Pi),axes=FRAMED,title=`surface S parameterized by r(u,v)`,scaling=constrained);

Plotting error, empty plot

> ru:=(u0,v0)->subs({u=u0,v=v0},diff(r(u,v),u)):
ru(u,v);
rv:=(u0,v0)->subs({u=u0,v=v0},diff(r(u,v),v)):
rv(u,v);
n:=(u,v)->crossprod(ru(u,v),rv(u,v)):
n(u,v);

[Maple Math]

[Maple Math]

[Maple Math]

> surface_integral:=Int(Int(dotprod(F(op(r(u,v))),n(u,v)),u=0..(Pi/2)),v=0..(2*Pi));
int(int(dotprod(F(op(r(u,v))),n(u,v)),u=0..(Pi/2)),v=0..(2*Pi));

[Maple Math]

[Maple Math]

>

Problem 5, section 10.4 Compute the mass of the fluid in D with density f where (a) D is a cube with sides a,b,c and f(x,y,z)=z; (b) D is a cone of height 3 and angle Pi/6 and f(x,y,z)=constant.

> rho:=(x,y,z)->k;
r:=(u,v)->[v*cos(u)*sin(Pi/6),v*sin(u)*sin(Pi/6),v*cos(Pi/6)];

[Maple Math]

[Maple Math]

> plot3d(r(u,v),u=0..(2*Pi),v=0..(3/cos(Pi/6)),axes=FRAMED,title=`surface S parameterized by r(u,v)`,scaling=constrained);

[Maple Plot]

> mass:=Int(Int(Int(rho(u*cos(v),u*sin(v),z),v=0..(2*Pi)),u=0..(z/cos(Pi/6))),z=0..3);
int(int(int(rho(u*cos(v),u*sin(v),z),v=0..(2*Pi)),u=0..(z/cos(Pi/6))),z=0..3);

[Maple Math]

[Maple Math]

>