({{, (RefLink[Variables, paclet:ref/Variables])[poly]
gives a list of all independent variables in a polynomial. }})

OpenersPrimaryExamplesSection(Spacer1)Examples  (8)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Find a list of variables of a polynomial:

Variables[(x+y)^2+3z^2-y z+7]

OpenersExampleSection1(Spacer1)Scope  (4)

A polynomial:

Variables[x^4+y^4+z^4-3x y z]

A list of polynomials:

Variables[{x^2-a y,y^2-b z,z^2-c x}]

A rational function:

Variables[(a-b)/(x+y)-2/z]

Find variables in a radical expression:

Variables[Sqrt[x+y-z^2]+(-2 t)^(2/3)]

OpenersExampleSection2(Spacer1)Options  (1)

OpenersExampleSubsection0(Spacer1)Modulus  (1)

Find variables present after reducing coefficients modulo 2:

Variables[x+2y+3z,Modulus->2]

OpenersExampleSection3(Spacer1)Properties & Relations  (1)

Use (RefLink[CoefficientList, paclet:ref/CoefficientList]) to find coefficients of polynomials:

f=x^2-2 x y+3 y^2+4 x+5y+6;

CoefficientList[f,Variables[f]]

OpenersExampleSection4(Spacer1)Possible Issues  (1)

(RefLink[Variables, paclet:ref/Variables]) looks for variables only inside sums, products, and rational powers:

Variables[Sin[x]+Cos[x]]

Variables[E^x]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Coefficient, paclet:ref/Coefficient])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Finding the Structure of a Polynomial, paclet:tutorial/FindingTheStructureOfAPolynomial])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Polynomial Algebra, paclet:guide/PolynomialAlgebra])}})}})