Teaching maxima a new identity



If you want to save typing, try

s(x):=ratsubst(1,u^2+v^2+w^2,x);

then type
s(%);
every so often.

or you could define a rule and use
tellsimp or tellsimpafter.
Then it would be used automatically,
but perhaps too much.

As for ::
it is almost never used.  It certainly
doesn't do what you seem to think it does.

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




RJf

BadDogSprocket wrote:

> All:
> 
> I have an expression involving a vector p = [u, v, w]'
> for which it is known in advance that |p| == 1, i.e.
> the point p lies on the unit sphere.  I am doing some
> 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
> with unity without me having to type 
> 
> ratsubst(1, u^2 + v^2 + w^2, %);
> 
> after every other command.  I'm getting Carpal Tunnel
> over here.
> 
> Is there a way to do this?  I tried using the "::"
> operator, which from the documentation, seems like it
> should accomplish what I want, but:
> 
> 1 :: u^2 + v^2 + w^2;
> 
> yields an "invalid assignment" error.
>  
> Related uestion: if this is not what "::" is
> supposed to do, then what *does* it do, exactly?
> 
> Robert: I suggest you answer the question 'What is
> the difference between ":" and  "::"' with examples in
> your minimal-maxima guide.
>  
> Dan
> 
> P.S. Has anyone ever been able to successfully post a
> new topic to this group through the gmane.org web
> interface?  Every time I try, the web interface seems
> to accept my post, but withing five minutes, the mail
> server bounces my post back at me.
> 
> 
> 	
> 		
> __________________________________ 
> Yahoo! Mail - PC Magazine Editors' Choice 2005 
> http://mail.yahoo.com
> 
> _______________________________________________
> Maxima mailing list
> Maxima@math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima