However, there's another way to solve this equation using 2 Bezout theorems about roots of polynomial. According to the 1st one, the polynomial p(x) can be exactly divided by the binomial (x - a) if x = a and the quotient is p(a), and according to the 2nd one if the polynomial with the whole coefficients have roots that are the whole numbers then these roots are divisors of the polynom's constant term.
In this case we should apply the theorem 2 first and look for divisors of 6. They are -1,1;-2,2;-3,3;-6;6. Then we insert into the equation them to make sure whether one of them fits it. The suitable integer is 3. As the coeffs of the expression are the whole numbers the polynomial is being divided by the binomial x - 3 exactly, so its 1rst root is x = 3. To find the other roots we should divide the polynomial x^3-x^2-4x-6 by x - 3. Performing long division we get the quotient x^2 + 2x + 2, so the full arrangement will look as (x - 3)(x^2 + 2x + 2) = 0 The first factor has the root already had been calculated (x = 3). The second equation has no roots among the real numbers but has two roots among the complex numbers: x2 = -1+ i, x3 = -1 - i
solve(x^3-x^2-(4x)-6 = 0,x)