### Related

##### polydecomp

eq: 1 -2.7607*z + 3.8...

polydecomp(eq,z);

Calculate

? polydecomp;

Calculate

##### polydecomp

eq: 1 -2.7607*z + 3.8...

polydecomp(eq,z);

Calculate

? polydecomp;

Calculate

### polydecomp

Run Example
```(%i1)? polydecomp;

-- 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

(%o1)                                true
(%i2) ```
Run Example
```eq:(x^2-17*x+1)^(x^2-34*x+1)=1;
2
2            x  - 34 x + 1
(%o1)                  (x  - 17 x + 1)              = 1
(%i2) ratdisp:false;
(%o2)                                false
(%i3) ratsimpexpons:true;
(%o3)                                true
(%i4) ratexpand(lhs(eq));
2                               2
2   2            x  - 34 x          2            x  - 34 x
(%o4) x  (x  - 17 x + 1)          - 17 x (x  - 17 x + 1)
2
2            x  - 34 x
+ (x  - 17 x + 1)
(%i5) rat(lhs(eq));
2
2               2            x
(x  - 17 x + 1) (x  - 17 x + 1)
(%o5)/R/               ---------------------------------
2            x 34
((x  - 17 x + 1) )
(%i6) polydecomp(lhs(eq), x);
2                        2                   2
2   2            x           2            x      2            x
x  (x  - 17 x + 1)   - 17 x (x  - 17 x + 1)   + (x  - 17 x + 1)
(%o6) [-----------------------------------------------------------------]
2            34 x
(x  - 17 x + 1)
(%i7) taylor(lhs(eq), x, 0, 3);
2         3
(%o7)/T/              1 - 17 x + 579 x  - 4964 x  + . . .
(%i8) ```
Run Example
```eq:(x^2-17*x+1)^(x^2-34*x+1)=1;
2
2            x  - 34 x + 1
(%o1)                  (x  - 17 x + 1)              = 1
(%i2) ratdisp:false;
(%o2)                                false
(%i3) ratsimpexpons:true;
(%o3)                                true
(%i4) ratexpand(lhs(eq));
2                               2
2   2            x  - 34 x          2            x  - 34 x
(%o4) x  (x  - 17 x + 1)          - 17 x (x  - 17 x + 1)
2
2            x  - 34 x
+ (x  - 17 x + 1)
(%i5) rat(lhs(eq));
2
2               2            x
(x  - 17 x + 1) (x  - 17 x + 1)
(%o5)/R/               ---------------------------------
2            x 34
((x  - 17 x + 1) )
(%i6) polydecomp(lhs(eq), x);
2                        2                   2
2   2            x           2            x      2            x
x  (x  - 17 x + 1)   - 17 x (x  - 17 x + 1)   + (x  - 17 x + 1)
(%o6) [-----------------------------------------------------------------]
2            34 x
(x  - 17 x + 1)
(%i7) taylor(lhs(eq));
2
2               2            x
(x  - 17 x + 1) (x  - 17 x + 1)
(%o7)/T/           --------------------------------- + . . .
2            x 34
((x  - 17 x + 1) )
(%i8) ```

### Related Help

Help for Polydecomp