Skip to content

SquareFreeQ

SquareFreeQ[expr] returns True if expr is a square-free polynomial.

Attributes[SquareFreeQ] := {Protected, ReadProtected}

Simple examples

In[1]:= SquareFreeQ[Expand[(x + 1)*(x + 2)^2]]
Out[1]= False
In[2]:= SquareFreeQ[(x + 1)*(x + 2)]
Out[2]= True
In[3]:= SquareFreeQ[Expand[(2*x + 3)*(x + 2)]]
Out[3]= True
In[4]:= SquareFreeQ[(2*x + 3)^2]
Out[4]= False