Maple hints for doing Homework 12 (week 11)

(Potentials)

section 10.7 of Prof. Malek-Madani's book Advanced Engineering Mathematics

sm311o_hwk12c.mws,wdj,4-17-98

> restart;with(plots):
with(linalg):

Warning, new definition for norm

Warning, new definition for trace

Problem #1 : This problem can be done in the same manner as the following one:

Compute the potential function, if it exists, of F(x,y,z)=<y-z^2,x+3*z,z> .

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

[Maple Math]

The easiest way to do this in MAPLE is to use the potential command

> potential(F(x,y,z), [x,y,z], 'phi');
The potential function doesn't exist

[Maple Math]

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

[Maple Math]

> potential(F(x,y,z), [x,y,z], 'phi');

[Maple Math]

> phi;
The potential function

[Maple Math]

Problem 2 : This problem can be done in the same manner as the following one:

Compute the potential function phi(x,y,z), if it exists, of F(x,y,z)=<y,x,z> and evaluate it from (1,2,3) to (0,0,0) (this is the line integral of F over the line from (0,0,0) to (1,2,3), by the "Fundamental theorem of Calculus for gradients").

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

[Maple Math]

> potential(F(x,y,z), [x,y,z], 'phi');

[Maple Math]

>

> subs({x=1,y=2,z=3},phi)-subs({x=0,y=0,z=0},phi);
The potential function evaluated between the two points

[Maple Math]

Problem 3 : Easy to do by hand (use the definition of phi and psi: phi_x=M, phi_y=N, ...).

Problem 4 : This problem can be done in the same manner as the following one:

Let psi(x,y) = x^2+y^2 be a stream function. If the flow is irrotational, find a potential and plot the contours of the potential and the stream function.

> psi:=x^2-y^2;

[Maple Math]

> M:=diff(psi,y);
N:=-diff(psi,x);

[Maple Math]

[Maple Math]

> potential([M,N], [x,y], 'phi');

[Maple Math]

> C1:=contourplot(phi,x=-1..1,y=-1..1,color=blue):
C2:=contourplot(psi,x=-1..1,y=-1..1,color=red):
display([C1,C2]);

[Maple Plot]

Problem 5 : Use Maple to find the values of a,b,c when the curl of v is <0,0,0>.

>