Subject: How to compose multi-variate polynomials?
From: Jonathan LF King
Date: Sun, 7 May 2006 14:27:37 -0400 (EDT)
Dear Robert
From: "Robert Dodier" <robert.dodier at gmail.com>
Date: Sun, 7 May 2006 10:06:14 -0600
Hi Jonathan,
> H maps 2N-dimensional space to N-dim'al space, and
> f,g1,g2 each map N-dim'al space to N-dim'al space.
>
> We'll want to test if
>
> H(g1(xvec), g2(xvec))
>
> equals f(xvec) .
I'm afraid I don't see what's going on here.
Maybe this point can be clarified with an example.
> define(funmake(f, makelist(concat( 'x,j) , j , 1,N)) , ''expression_in_xvec)
Maxima allows subscripted variables x[1], x[2], x[3], ...
I don't completely understand what you need to do, but
it seems likely that working with subscripted variables
is going to be easier than constructing symbols x1, x2, x3, ...
For example, when expression_in_xvec is an expression
in the variables x[1], x[2], x[3], ... you can just write
f (x) := ''expression_in_xvec;
and then f ([a, b, c, ...]) causes a, b, c, ... to be substituted for
x[1], x[2], x[3], ....
That looks good. Executing
f[1](x) := x[1]*m + x[2] ;
f[2](x) := 2*x[2] ;
f(x) := makelist(f[j](x), j , 1,2 );
follow by
(%I117) f(f(f(f([3,5]))));
gave
(%o117) [m (m (m (3 m + 5) + 10) + 20) + 40, 80]
================================================================
Is there a way to get either lists or matrices to be
indexed from zero (as Common Lisp does) rather than 1? My
variables are more naturally x[0], x[1], x[2] ... since they
correspond to powers of a number (an algebraic integer),
starting with the zero-th power.
Thanks again, -Jonathan
--
Prof. Jonathan LF King Mathematics dept, Univ. of Florida
<squash at math.ufl.edu>, <http://www.math.ufl.edu/~squash/>