function for regrouping/factoring the following expression



On 7/25/2010 1:11 PM, Julien Martin wrote:
> Hello,
> I would like to find the Maxima function for isolating the x^3, x^2, x 
> in say, the following expression:
> A*x^2 + B*x^3 -2*B*x^2 +A*x-5*B*x+3*B
> So that I have (A-2*B)*x^2 etc... with x^3, x^2 and x appearing only 
> once in the resulting expression.

try rat(...,X);