Tim,
Try entering
declare([a,b,c,d],scalar);
before evaluating your expression with atensimp().
Viktor
-----Original Message-----
From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
On Behalf Of Tim Hutt
Sent: Sunday, October 22, 2006 9:39 AM
To: maxima at math.utexas.edu
Subject: Quaternions
Hi, I'm trying to do some simple quaternion maths with maxima.
So far I have:
load(atensor)
init_atensor(quaternion)
i:v[1]
j:v[2]
k:v[1].v[2]
After this simple stuff works like:
atensimp(i.i)
-1
But if I try:
atensimp((a . i + b . j) . (c . i + d . j)) (where a,b,c,d are scalars)
Then it gives me answers involving 'sf(v[1], b)' and things like that. If I
alter the definition of sf to be:
sf(u,v):=if abasep(u) and abasep(v) then aform[part(u,1),part(v,1)] else
u.v
(instead of 'else sf(u, v)')
Then it seems to work, but is no longer able to simplify a.a (to a^2).
Is there some crazy thing I have to do to tell it that a,b,c,d are scalars?
Thanks
-Tim Hutt
PS: Please CC me - not on list.
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima