# CoefficientRules for huge expressions

Is there some idea to get the coefficients for a very complicated, huge, and explicit polynomial expression to avoid insufficient memory problem? I am trying to use GroebnerBasisDistributedTermsList and CoefficientRules. One problem I find is, their obtained coefficients are also expanded.

exp = (t1 + t2)^3 x1 + (t2 t1)^4 x1 x1 ;


And,

  CoefficientRules[exp, {x1}]
{{2} -> t1^4 t2^4, {1} -> t1^3 + 3 t1^2 t2 + 3 t1 t2^2 + t2^3}


Is there a simple way or option to get,

   {{2} -> (t2 t1)^4, {1} -> (t1 + t2)^3}


In this case, I think probably it is useful for the treatment of the huge expressions using CoefficientRules.

• FullSimplify[CoefficientRules[exp, {x1}]]? – kglr Jun 10 '19 at 5:27
• Try CoefficientList` instead. – bbgodfrey Jun 10 '19 at 5:35
• Note that the size of the output may not be the determining factor in the amount of memory used to obtain the output. – bbgodfrey Jun 10 '19 at 5:49
• @kglr It works for this simple example. But I actually want to deal with the huge expressions in this way. – Orders Jun 10 '19 at 6:02
• @bbgodfrey Yes, CoefficientList is a good choice. Thanks. Any idea to extract the coefficient of handle huge amounts of expressions? Sorry, this is a too general question. – Orders Jun 10 '19 at 6:05