I'm trying to find the factors of function x**2+x+1.
Most of the suggetions are to use factor and you get the answer. However, factor(f) doesn't work for all the equations.
I also tried factor(f,gaussian=True) but gives the same result.
import sympy as sp
x = sp.Symbol('x')
f = x**2 + x + 1
sp.factor(f)
Output of the code: x**2 + x + 1
Expected output: complex roots
-1/2 - sqrt(3)*i/2
-1/2 + sqrt(3)*i/2