Collect
Collect[expr,x]
collects together terms involving the same powers of objects matching x.
Collect[expr,{x1,x2,…}]
successively collects together terms that involve the same powers of objects matching x1, then x2, ….
Collect[expr,var,h]
applies h to the expression that forms the coefficient of each term obtained.
Examples
open allclose allBasic Examples (4)
Scope (6)
Applications (1)
When a polynomial has many variables, it can be put into many different forms. Here is a polynomial in three variables:
Collect reorganizes the polynomial so that is the dominant variable:
If is specified as the parameter, the terms are organized with as the leading variable:
When two variables are specified, the function will collect with respect to first, then collect with respect to :
Or collect with respect to first, then collect with respect to :
Text
Wolfram Research (1988), Collect, Wolfram Language function, https://reference.wolfram.com/language/ref/Collect.html (updated 2007).
CMS
Wolfram Language. 1988. "Collect." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/Collect.html.
APA
Wolfram Language. (1988). Collect. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Collect.html