Teaching maxima a new identity



--- Robert Dodier  wrote:

> Hi Dan,
> 
> > manipulations that result in equations involving
> the
> > expression u^2 + v^2 + w^2, and it would be nice
> if
> > Maxima would automatically replace this expression
> 
> In expressions in which u^2 + v^2 + w^2 appears as
> a separate factor (e.g. sin (u^2 + v^2 + w^2) or
> (u^2 + v^2 + w^2)^n, but not u^2 + v^2 + w^2 + x^2 +
> y^2)
> tellsimpafter can help --
> 
>   tellsimpafter (u^2 + v^2 + w^2, 1);
> 
>   sin (u^2 + v^2 + w^2);  => sin (1)
>   (u^2 + v^2 + w^2)^n  => 1
> 
> tellsimpafter carries out pattern matching.
> There is a lot to say about that. See tellsimpafter
> under
> "Rules and Patterns" at
> http://maxima.sf.net/docs/manual/en/maxima_toc.html

Hmmm ... doesn't really work.

(%i45) A;
(%o45) matrix([0,-w,v],[w,0,-u],[-v,u,0])
(%i46) V : eigenvectors(A);
(%o46)
[[[-sqrt(-w^2-v^2-u^2),sqrt(-w^2-v^2-u^2),0],[1,1,1]],[1,(w*sqrt(-w^2-v^2-u^2)-u*v)/(w^2+v^2),-(v*sqrt(-w^2-v^2-u^2)+u*w)/(w^2+v^2)],[1,-
(w*sqrt(-w^2-v^2-u^2)+u*v)/(w^2+v^2),(v*sqrt(-w^2-v^2-u^2)-u*w)/(w^2+v^2)],[1,v/u,w/u]]
(%i47) ratsubst(1, u^2 + v^2 + w^2, V);
(%o47)
[[[-%i,%i,0],[1,1,1]],[1,-(%i*w-u*v)/(u^2-1),(u*w+%i*v)/(u^2-1)],[1,(%i*w+u*v)/(u^2-1),(u*w-%i*v)/(u^2-1)],[1,v/u,w/u]]

Okay, fine so far, although I'm not sure why Maxima
chose to display some of these the expressions the way
it did.  [u, v, w] seems like a simpler way to express
that last e-vector, for example.

I suspect that the e-vector package solves for the
nullspace of (A - lI) using row operations, then just
sets the free parameter(s) to unity and calculates the
rest based on that?   

Fair enough ... it gave me three different (correct)
e-vectors, at least.

However:

(%i48) tellsimpafter(u^2 + v^2 + w^2, 1);
(%o48) [+RULE1,SIMPLUS]
(%i49) V : eigenvectors(A);

ALGSYS failure: The eigenvector(s) for the 1th
eigenvalue will be missing.

ALGSYS failure: The eigenvector(s) for the 2th
eigenvalue will be missing.
(%o49) [[[-%i,%i,0],[1,1,1]],[1,v/u,w/u]]

Is this a bug?

Thanks,
Dan


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com