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];
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
> F:=(x,y,z)->[y,x,z];
> potential(F(x,y,z), [x,y,z], 'phi');
>
phi;
The potential function
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];
> potential(F(x,y,z), [x,y,z], 'phi');
>
>
subs({x=1,y=2,z=3},phi)-subs({x=0,y=0,z=0},phi);
The potential function evaluated between the two points
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;
>
M:=diff(psi,y);
N:=-diff(psi,x);
> potential([M,N], [x,y], 'phi');
>
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]);
Problem 5 : Use Maple to find the values of a,b,c when the curl of v is <0,0,0>.
>