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 +

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92158] How to collect terms based the total power of x and y in (x + y +
  • From: Peng Yu <PengYu.UT at gmail.com>
  • Date: Mon, 22 Sep 2008 05:25:01 -0400 (EDT)

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