Re: cross-product in cylindrical problem

*To*: mathgroup at smc.vnet.net*Subject*: [mg51264] Re: [mg51258] cross-product in cylindrical problem*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Mon, 11 Oct 2004 01:25:23 -0400 (EDT)*References*: <200410100952.FAA25275@smc.vnet.net> <3B366122-1AC0-11D9-BEB1-000A95B4967A@mimuw.edu.pl>*Sender*: owner-wri-mathgroup at wolfram.com

I forgot to include the line: SetCoordinates[Cylindrical[Ï?, Ï?, z]]; Without that JacobianMatrix[] should be replaced by JacobianMatrix[Cylindrical[Ï?, Ï?, z]]. Andrzej On 10 Oct 2004, at 22:28, Andrzej Kozlowski wrote: > On 10 Oct 2004, at 18:52, news wrote: >> >> I'm really puzzled by this behavior of Mathematica, I have two >> vectors in >> cylindrical coordinates and would like to take their cross-product in >> cylindrical, but it seems to give me incorrect answer, see below: >> >> define parametric path {r,phi,z} >> >> In[110]:= >> f[\[Rho]_, \[Phi]_] = {\[Rho], \[Phi], 0} >> Out[110]= >> {\[Rho], \[Phi], 0} >> >> take derivates of path w.r.t. r then w.r.t phi, get {1,0,0}, and >> {0,1,0} >> >> In[113]:= >> v1 = D[f[\[Rho], \[Phi]], \[Rho]] >> v2 = D[f[\[Rho], \[Phi]], \[Phi]] >> Out[113]= >> {1, 0, 0} >> Out[114]= >> {0, 1, 0} >> >> then cross them in cylindrical coords, and should get {0,0,1}, but >> instead >> get wrong answer below >> >> In[117]:= >> n = CrossProduct[v1, v2, Cylindrical[\[Rho], \[Phi], z]] // >> FullSimplify >> Out[117]= >> {0, 0, 0} >> >> As you can see, when I cross {1,0,0} with {0,1,0} in cylindrical >> coords, I >> get {0,0,0}, when I should be getting {0,0,1}. >> >> Can anyone help? >> >> > The problem is with the meaning of "two vectors in cylindrical > coordinates". Even if your default coordinate system is cylindrical, > Mathematica still represents tangent vectors using Cartesian > coordinates. In other words, the meaning of a vector {a,b,c} in > cylindrical coordinates is the vector given by: > > << Calculus`VectorAnalysis` > > CoordinatesToCartesian[{a,b,c},Cylindrical] > > Thus, the vectors {1,0,0} and {0,1,0} are turned to: > > > CoordinatesToCartesian[{1, 0, 0}, Cylindrical] > > {1, 0, 0} > > and > CoordinatesToCartesian[{0,1,0},Cylindrical] > > {0,0,0} > > So you get the zero vector (since {0,1,0} in cylindrical coordinates > represents just the origin) and hence the result you get. > I am not hundred percent sure what you meant. But I suppose thatt by > {1,0,0} and {0,1,0} in cylindrical coordinates you meant the basic > vector fields in the tangent bundle of R^3 (in other words vectors > changing from point to point). Presumably (I am guessing) the vector > (field) {1,0,0} is > > JacobianMatrix[] . {1, 0, 0} > > {Cos[Ï?], Sin[Ï?], 0} > > and the vector (field) {0,1,0} is > > JacobianMatrix[] . {0, 1, 0} > > {(-Ï?)*Sin[Ï?], Ï?*Cos[Ï?], 0} > in Cartesian coordinates. > > In that case > > Simplify[Cross[JacobianMatrix[] . {1, 0, 0}, JacobianMatrix[] . {0, 1, > 0}]] > > {0, 0, Ï?} > > which is the vector field sometimes denoted by {0,0,1} in cylindrical > coordinates. > > Andrzej Kozlowski > Chiba, Japan > http://www.akikoz.net/~andrzej/ > http://www.mimuw.edu.pl/~akoz/ > >

**References**:**cross-product in cylindrical problem***From:*"news" <anonym@bamboo.com>