Teaching maxima a new identity



--- Richard Fateman  wrote:

> Why not just set w:  sqrt(1-u^2-v^2).

Actually, I just tried this approach, and it is having
some unintended (read: bad, bad, bad) side effects.

(%i35) A;
(%o35) matrix([0,-w,v],[w,0,-u],[-v,u,0])
(%i36) w : sqrt(1 - u^2 - v^2);
(%o36) sqrt(-v^2-u^2+1)
(%i37) A : ''A;
(%o37)
matrix([0,-sqrt(-v^2-u^2+1),v],[sqrt(-v^2-u^2+1),0,-u],[-v,u,0])
(%i38) eigenvectors(A);
(%o38)
[[[-%i,%i,0],[1,1,1]],[1,-(%i*sqrt(-v^2-u^2+1)-u*v)/(u^2-1),(u*sqrt(-v^2-u^2+1)+%i*v)/(u^2-1)],[1,(%i*sqrt(-v^2-u^2+1)+u*v)/(u^2-1),
(u*sqrt(-v^2-u^2+1)-%i*v)/(u^2-1)],[1,v/u,sqrt(-v^2-u^2+1)/u]]

This last form is unfortunately replacing *every*
instance of w with sqrt(1 - u^2 - v^2), which is not
what I want.  I only want the implicit substitution
(u^2 + v^2 + w^2 = 1) made.  The explicit solution of
w in terms of u and v is actually making the final
expression more complicated than it needs to be.

/* shameless plug alert */

To give you some context, I am using Maxima to help me
derive Rodrigues' Formula for 3D Rotation Matrices:

http://mathworld.wolfram.com/RodriguesRotationFormula.html

To get a rotation matrix R, you start out with a
skew-symmetric "cross matrix," which is a way to
express a cross product of any 3D (real) vector with
the pole vector p = [u, v, w].  By convention, p has
unit length, and t is the rotation (in radians) about
this pole vector.

The rotation R(p, t) = matrixexp(A, t), where A =
crossmatrix(p).  Because p lies in the nullspace of A,
the transformation R takes any scalar multiple of p
and maps it back to itself (i.e., for such points, R
acts like an identity matrix).

Dan


		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com