Factor
[expr]Factor[x ^ 2 + 2 x + 1]
Factor[1 / (x^2+2x+1) + 1 / (x^4+2x^2+1)]
Factor can also be used with equations:
Factor[x a == x b + x c]
And lists:
Factor[{x + x^2, 2 x + 2 y + 2}]
It also works with more complex expressions:
Factor[x ^ 3 + 3 x ^ 2 y + 3 x y ^ 2 + y ^ 3]
You can use Factor to find when a polynomial is zero:
x^2 - x == 0 // Factor