# Several variables, consider polynomail as polynomial only of $X$, group coefficients

Suppose I have variables `d`

, `e`

and `x`

and I somehow using symbolic calculation get polynomial like this:

$$9d^2e^2x^2 - 36d^2ex^3 + 18de^2x^2$$

I want sage to group coefficients at `x`

and consider my polynomial as polynomial only of `x`

, I want other variables to be no more than just parameters. In short I want to see something like this:

$$9de^2(d + 2)x^2 - 36d^2ex^3$$

Is it possible to exploit such an approach in Sage?

P.S. I shortened my example. In real life example it is not so easy to see such a grouping by hands.