Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Vector analysis in mathematica

  1. Sep 19, 2009 #1
    Hi all,

    I'm trying to do some vector analysis in Mathematica 6. I have the vector analysis package loaded via: << VectorAnalysis`

    I'm working in the default cartesian coordinate system, but just to be on the safe side I have set: SetCoordinates[Cartesian]

    The grad operator seems to work ok, as in the example in the help file:

    Grad[2 Xx^2 + Yy]
    gives
    {4 Xx, 1, 0}

    But anything else seems to just return the input. Eg:

    Cross[Xx,Yy]
    gives
    Xx\[Cross]Yy

    But I know this should be Zz!

    Same for Dot, Curl etc. I'm not too experienced with Mathematica. Hopefully someone can point out a simple mistake I'm making!

    Thanks in advance!
     
    Last edited: Sep 19, 2009
  2. jcsd
  3. Sep 20, 2009 #2

    lurflurf

    User Avatar
    Homework Helper

    Cross is not defined
    try
    CrossProduct[Xx,Yy]
     
  4. Sep 20, 2009 #3
    Whoops, that was just a mistake in my copying code over to the forum. I had it as CrossProduct. Still no dice.

    I managed to do what I needed to do by specifying all the components explicitly. Ie:
    x = {1,0,0}; etc.

    It seems there should be a better way of doing this though, else what would even be the purpose of Mathematica recognising the variable names Xx, Yy, Zz as "special"?
     
    Last edited: Sep 21, 2009
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Vector analysis in mathematica
  1. Mathematica help (Replies: 3)

  2. Mathematica help (Replies: 2)

  3. Plots in Mathematica (Replies: 1)

  4. Mathematica Trouble (Replies: 2)

Loading...