Collect3
Collect3[expr, {x, y, ...}]
collects terms involving the same powers of monomials xn1, yn2, …
The option Factor
can bet set to True
or False
, which factors the coefficients.
The option Head
(default Plus
) determines the applied function to the list of monomials multiplied by their coefficients.
See also
Overview, Collect2, Isolate.
Examples
Collect3[2 a (b - a) (h - 1) - b^2 (e a - c) + b^2, {a, b}]
−2a2h+2a2−ab2e+2abh−2ab+b2c+b2
Collect3[Expand[(a - b - c - d)^5], {a}]
a5−5a4b−5a4c−5a4d+10a3b2+20a3bc+20a3bd+10a3c2+20a3cd+10a3d2−10a2b3−30a2b2c−30a2b2d−30a2bc2−60a2bcd−30a2bd2−10a2c3−30a2c2d−30a2cd2−10a2d3+5ab4+20ab3c+20ab3d+30ab2c2+60ab2cd+30ab2d2+20abc3+60abc2d+60abcd2+20abd3+5ac4+20ac3d+30ac2d2+20acd3+5ad4−b5−5b4c−5b4d−10b3c2−20b3cd−10b3d2−10b2c3−30b2c2d−30b2cd2−10b2d3−5bc4−20bc3d−30bc2d2−20bcd3−5bd4−c5−5c4d−10c3d2−10c2d3−5cd4−d5