[Maxima] Is there a package for physics vector notation?
rich.hennessy at verizon.net
Sat Mar 10 12:25:46 CST 2012
Thanks, this is just what I have been looking for. The only thing is, I
don't mind the answers coming back as lists except when you have to use the
answer as input in another computation, then you would have to turn the list
back into i,j,k notation. Is that something you have done? I may be able to
figure out something, or not.
From: Jaime Villate
Sent: Saturday, March 10, 2012 4:36 AM
To: maxima at math.utexas.edu
Subject: Re: [Maxima] Is there a package for physics vector notation?
On 03/10/2012 04:31 AM, Richard Hennessy wrote:
> I want to use Maxima to use i, j, k notation for vectors and have a dot
> product and cross product operation for two vectors inputted this way. I
> have quickly tried the dirty method below but if there is something
> already written then maybe I can avoid reinventing the wheel.
I have to work with vectors in Maxima very often and the best solution
I've found is to represent them as lists.
Check this out to see whether you like it:
(%i1) display2d: false$
(%i2) fpprintprec: 12$
(%i3) [i,j,k]: [[1,0,0],[0,1,0],[0,0,1]]$
(%i4) ×(a,b) := determinant(matrix([i,j,k],a,b))$
(%i6) v1: .7*i-3.4*j-.6*k;
(%i7) v2: 1.4*i+6.9*j-9.78*k;
If you do not want to use the Unicode character × that I used for the
cross product, or if the Lisp
flavor you are using will not allow it, you can also define the cross
product as cross(a,b)
Maxima mailing list
Maxima at math.utexas.edu
More information about the Maxima