Collect

WMA link


Collect[expr, x]

Expands expr and collect together terms having the same power of x.

Collect[expr, {$x_1$, $x_2$, ...}]

Expands expr and collect together terms having the same powers of $x_1$, $x_2$, ....

Collect[expr, {$x_1$, $x_2$, ...}, filter]

After collect the terms, applies filter to each coefficient.

Collect each power of x:

Collect terms involving y:

Simplify each coefficient:

CoefficientList
Denominator