MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

How to collect terms based the total power of x and y in (x + y +


Hi,

In[(x + y + 1)^3 // Expand

The above command gives me the following results.

1 + 3 x + 3 x^2 + x^3 + 3 y + 6 x y + 3 x^2 y + 3 y^2 + 3 x y^2 + y^3

I'm wondering how to collect terms based on the sum of the power
coefficients of both x and y. For example, I want the following

1 + (3 x + 3 y) + (3 x^2 + 6 x y + 3 y^2) + (x^3 + 3 x^2 y + 3 x y^2 +
y^3)

Thanks,
Peng


  • Prev by Date: Import specific columns from a tsv-file
  • Next by Date: Re: the graphic of a function
  • Previous by thread: Re: Import specific columns from a tsv-file
  • Next by thread: Using FindRoot or interpolation function with symbolic argument