Page 814 - Advanced_Engineering_Mathematics o'neil
P. 814
794 APPENDIX A A MAPLE Primer
out the operations. For example, to add 16/37 times < 1,−5,3,−9,−22 > to 15/92 times
< 0,3,−3,6,−1 >, enter
∗
∗
(16/37) < 1,−5,3,−9,−22 > + (15/92) < 0,3,−3,6,−1 >;
We could also name the first vector V and the second vector G by
V:=< 1,−5,3,−9,−22 >;
and
G:=< 0,3,−3,6,−1 >
and then compute
∗
∗
(16/37) V + (15/92) G;
For the dot product of two vectors V and F (which can be n-vectors), enter
DotProduct(V,F);
Here V and F can be defined previously or can be entered into the dot product command.
3
Unlike the dot product, for the curl of two vectors, we are restricted to vectors in R .Forthe
curl of V =< a,b,c > and F =< d,e, f >, enter
CrossProduct(< a,b,c >,< d,e, f >);
As usual, the vectors can be entered directly or they could have been previously defined.
We can also carry out the vector calculus operations of gradient, divergence and curl. To
begin, we will work in rectangular coordinates. Set this system by
SetCoordinates(‘cartesian’[x,y,z]);
MAPLE expects the word cartesian in this command.
For the gradient of a scalar field, use the del operator, which in MAPLE is called del or
2
nabla. For example, we can define the scalar field f (x, y, z) = xyz − xy cos(z), by entering
∗
∗
∗
∗
f:=(x,y,z) → x y z-x+4 y z;
Now compute the gradient of f in any of the following ways:
Gradient(f(x,y,z));
or
Del(f(x,y,z));
or
Nabla(f(x,y,z));
or
∗
∗
∗
Del(x y z-x+4 y z);
∗
or
∗
∗
∗
∗
Nabla(x y z-x+4 y z);
To work with divergence and curl in rectangular (cartesian) coordinates, we can first enter
the vector fields of interest. For example, to enter the vector field
F(x, y, z) = xyzi + (x − y)j + yzk,
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
October 14, 2010 15:43 THM/NEIL Page-794 27410_24_appA_p789-800

