# [Maxima] How to compose multi-variate polynomials?

Robert Dodier robert.dodier at gmail.com
Sun May 7 11:06:14 CDT 2006

```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], ....

Hope this helps,
Robert Dodier

```