Subject: Is there a package for physics vector notation?
From: Richard Hennessy
Date: Sat, 10 Mar 2012 14:14:53 -0500
Quoting myself, "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."
Actually that is not true, it works fine as is.
Thanks a lot Jamie.
Rich
-----Original Message-----
From: Richard Hennessy
Sent: Saturday, March 10, 2012 1:25 PM
To: Jaime Villate ; maxima at math.utexas.edu
Subject: Re: [Maxima] Is there a package for physics vector notation?
Hi Jaime,
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.
Rich
-----Original Message-----
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.
>
Hi Richard,
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))$
(%i5) infix(?)$
(%i6) v1: .7*i-3.4*j-.6*k;
(%o6) [0.7,-3.4,-0.6]
(%i7) v2: 1.4*i+6.9*j-9.78*k;
(%o7) [1.4,6.9,-9.78]
(%i8) v1.v2;
(%o8) -16.612
(%i9) v1?v2;
(%o9) [37.392,6.006,9.59]
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)
Regards,
Jaime
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima