PDA

View Full Version : vector analysis in mathematica


big-ted
Sep19-09, 02:07 PM
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!

lurflurf
Sep20-09, 06:23 AM
Cross is not defined
try
CrossProduct[Xx,Yy]

big-ted
Sep20-09, 09:32 PM
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"?