part of equation as function



Hello!

On Wed, Mar 14, 2012 at 10:05 AM, Mike Valenzuela
<mickle.mouse at gmail.com> wrote:
> (%i1) f(x) := expand( x*(x+1) );
> (%o1) f(x) := expand(x (x + 1))
>
> (%i2) g(x) := ''( expand( x*(x+1) ) )
> (%o2) g(x) := x^2 + x

But:

(%i6) z=x+y;
(%o6) z=y+x

(%i8) f(x,y):=''rhs(%o6);
(%o8) f(x,y):=rhs(%o6)

(%i9) f(1,2);
(%o9) y+x

And:

(%i10) define(g(x,y),rhs(%o6));
(%o10) g(x,y):=y+x

(%i11) g(1,2);
(%o11) 3

Javier



-- 
Lee mi blog: "Un peque?o paso para Neil" http://up3n.wordpress.com/
?Ahora tambi?n en Twitter! http://twitter.com/javierarantegui