Maxima Function
polydecomp (p, x)
Decomposes the polynomial p in the variable x
into the functional composition of polynomials in x.
polydecomp
returns a list [p_1, ..., p_n]
such that
lambda ([x], p_1) (lambda ([x], p_2) (... (lambda ([x], p_n) (x)) ...))
is equal to p. The degree of p_i is greater than 1 for i less than n.
Such a decomposition is not unique.
Examples:
(%i1) polydecomp (x^210, x); 7 5 3 2 (%o1) [x , x , x , x ] (%i2) p : expand (subst (x^3 - x - 1, x, x^2 - a)); 6 4 3 2 (%o2) x - 2 x - 2 x + x + 2 x - a + 1 (%i3) polydecomp (p, x); 2 3 (%o3) [x - a, x - x - 1]
The following function composes L = [e_1, ..., e_n]
as functions in x
;
it is the inverse of polydecomp:
compose (L, x) := block ([r : x], for e in L do r : subst (e, x, r), r) $
Re-express above example using compose
:
(%i3) polydecomp (compose ([x^2 - a, x^3 - x - 1], x), x); 2 3 (%o3) [x - a, x - x - 1]
Note that though compose (polydecomp (p, x), x)
always returns p (unexpanded),
polydecomp (compose ([p_1, ..., p_n], x), x)
does not
necessarily return [p_1, ..., p_n]
:
(%i4) polydecomp (compose ([x^2 + 2*x + 3, x^2], x), x); 2 2 (%o4) [x + 2, x + 1] (%i5) polydecomp (compose ([x^2 + x + 1, x^2 + x + 1], x), x); 2 2 x + 3 x + 5 (%o5) [------, ------, 2 x + 1] 4 2