Subject: How to compose multi-variate polynomials?
From: Barton Willis
Date: Sun, 7 May 2006 06:10:04 -0500
> Q2: How can I define a poly f, so that f is
> viewed as a 1-variable function, but the variable comes from,
> say, 3-dim'al space and the output is a point in
> 3-dim'al space? So, for instance, I can write
>
> f(f(f([1,2,3]))) ?
>
> (...except that the input-point [1,2,3] might be
> some other kind of Maxima object other than a list.)
Maybe you want to do something like:
(%i1) f(x) := block([x1 : part(x,1), x2 : part(x,2)], [-x2, -x1]);
(%o1) f(x):=block([x1:part(x,1),x2:part(x,2)],[-x2,-x1])
(%i2) f([1,4]);
(%o2) [-4,-1]
(%i3) f(f([1,4]));
(%o3) [1,4]
(%i4) f(f(f([1,4])));
(%o4) [-4,-1]
The function 'part' can be applied to (I think) any
non-atomic object, so maybe something like this would
work if the input to f was not a list. Does this help,
or did I misunderstand?
Good luck with your project.
Barton