Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Dot Product in Cylindrical Coordinates

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69276] Re: Dot Product in Cylindrical Coordinates
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Tue, 5 Sep 2006 05:30:40 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <edadqd$pgc$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <edadqd$pgc$1 at smc.vnet.net>,
 Sergio Miguel Terrazas Porras <sterraza at uacj.mx> wrote:

> When I calculate the dot product of vectors {1,Pi/4,0} and {2,0,1} in
> Cylindrical Coordinates Mathematica 5.1 returns the result Sqrt[2], when the
> result should be 2.

Notwithstanding several of the other responses, the result _is_ Sqrt[2]. 
When you write {1,Pi/4,0}, surely you mean

  {rho, phi, z} == {1, Pi/4, 0}

and _not_ that 

  {x, y, z} == {1, Pi/4, 0} ?

After loading

  Needs["Calculus`VectorAnalysis`"]

and selecting Cylindrical coordinates,

  SetCoordinates[Cylindrical];

then in cartesian coordinates, this point is

  p1 = CoordinatesToCartesian[{1, Pi/4, 0}]

  {1/Sqrt[2], 1/Sqrt[2], 0}

Similarly,

  p2 = CoordinatesToCartesian[{2, 0, 1}]

  {2, 0, 1}

Hence the dot product of the coordinate vectors (relative to the origin 
{0,0,0}), computed in cartesian coordinates, is

  p1 . p2

  Sqrt[2]  

This is the same result that you got, presumably using,

  DotProduct[ {1, Pi/4, 0}, {2, 0, 1} ]

  Sqrt[2]

Of course, if you really mean

  {x, y, z} == {1, Pi/4, 0}

then there is no need to load Calculus`VectorAnalysis`: the dot product 
is just

  {1, Pi/4, 0} . {2, 0, 1}

  2

Note that Dot is _not_ modified when this package is loaded so 
Jean-Marc's response,

  Needs["Calculus`VectorAnalysis`"]
  SetCoordinates[Cylindrical];
  {1, Pi/4, 0} . {2, 0, 1}

is bogus -- the first two lines have no effect on the third.

Modifying Andrzej's code, we have

 Simplify[(JacobianMatrix[] . p1) . (JacobianMatrix[] . p2)]

 Sqrt[2]

Cheers,
Paul

_______________________________________________________________________
Paul Abbott                                      Phone:  61 8 6488 2734
School of Physics, M013                            Fax: +61 8 6488 1014
The University of Western Australia         (CRICOS Provider No 00126G)    
AUSTRALIA                               http://physics.uwa.edu.au/~paul


  • Prev by Date: Using FullSimplify to check hand algebra
  • Next by Date: Re: Re: Trigonometric simplification
  • Previous by thread: Re: Dot Product in Cylindrical Coordinates
  • Next by thread: RE: Re: Dot Product in Cylindrical Coordinates