| Author |
Comment/Response |
Forum Moderator
email me
 |
01/21/97 3:43pm
Reply to message #113 from Robert Astalos: > Reply to message #101 from Lars Holmstrom: > > Following an example straight out of a > > Mathematica supplement for an Engineering > > Mathematics book, I get the wrong output > > than I should: > > > > In[1]:= <<Calculus`VectorAnalysis` > > > > In[2]:= F = {7 x, 0, -z} > > > > Out[2]= {7 x, 0, -z} > > > > In[3]:= Div[F] > > > > Out[3]= 0 > > > > The result should be 6, as it says in the > > book. I also get the result of 0 using > > the Grad[] and Curl[] functions, no matter > > what they are acting on. Any ideas? > > > > Sorry I missed this the first time! If you type > > In[2] := ??Cartesian > > Mathematica will tell you that the default coordinate variables are > Xx, Yy, Zz. If you do > > In[3] := Div[ {7 Xx, 0, -Zz} ] > > you will get the right answer. When I looked in my copy of ''Guide to > Standard Mathematica Packages'', it sure looks like the variables are > x, y, z, but then my copy is Version 2.2. I assume that this was > changed for 3.0. > > Robert > ___________________________________________________________________________ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There has indeed been a change in the default Cartesian coordinates in Version 3.0: ----- Version 2.2 ----- In[1]:= <<Calculus`VectorAnalysis` In[2]:= Div[ {7 x, 0, -z} ] Out[2]= 6 In[3]:= ?x {x,y,z} are the default Cartesian coordinates. ----- Version 3.0 ----- In[1]:= <<Calculus`VectorAnalysis` In[2]:= Div[ {7 Xx, 0, -Zz} ] Out[2]= 6 In[3]:= ?Xx ''{Xx,Yy,Zz} are the default Cartesian coordinates.'' In[7]:= ?x ''Global`x'' My guess is that this change was made to accomodate the use of x as a common user defined symbol. Tom Zeller Forum Moderator ___________________________________________________________________________ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
URL: , |
|