Vector analysis in mathematica

In summary, the conversation was about using vector analysis in Mathematica 6 and encountering issues with certain operations returning incorrect results. The person was not very experienced with Mathematica and was looking for guidance on how to properly use the software. They also mentioned finding a workaround by explicitly specifying the vector components.
  • #1
big-ted
4
0
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:
Mathematics news on Phys.org
  • #2
Cross is not defined
try
CrossProduct[Xx,Yy]
 
  • #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:

Related to Vector analysis in mathematica

1. What is vector analysis in Mathematica?

Vector analysis in Mathematica is a branch of mathematics that deals with operations on vectors, such as addition, subtraction, multiplication, and division. It is used to perform calculations and manipulate vectors in three-dimensional space.

2. How do I create a vector in Mathematica?

To create a vector in Mathematica, you can use the built-in function "Vector" and specify the vector's components. For example, Vector[{1,2,3}] will create a vector with components x = 1, y = 2, and z = 3.

3. Can I perform vector operations in Mathematica?

Yes, Mathematica has a variety of built-in functions for performing vector operations, such as DotProduct, CrossProduct, and Norm. These functions allow you to add, subtract, multiply, and divide vectors, as well as find the magnitude and direction of a vector.

4. How can I plot vectors in Mathematica?

To plot vectors in Mathematica, you can use the built-in function "VectorPlot3D". This function allows you to input a vector field and visualize it in three-dimensional space. You can also use "VectorPlot" for two-dimensional vector plots.

5. Are there any special functions for working with vector calculus in Mathematica?

Yes, Mathematica has several built-in functions specifically designed for vector calculus operations, such as Grad, Div, and Curl. These functions allow you to calculate the gradient, divergence, and curl of a vector field, which are important concepts in vector analysis.

Similar threads

Replies
2
Views
941
Replies
14
Views
1K
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
Replies
64
Views
2K
  • Precalculus Mathematics Homework Help
Replies
12
Views
3K
  • STEM Academic Advising
Replies
16
Views
690
Back
Top