I'm trying to solve this and I have a mistake somewhere, but I don't know where. I calculated the rational roots with Rolle's theorem, so I know, that I should get $-3$ and $2$ somehow.
So, first of all. I tried to write $x^3-x^2-8x+12$ as the polynomial of $x-1$. I used Horner's method to divide the original polynomial with $x-1$.
So my result is $(x-1)^3-8(x-1)-4$. Which doesn't seem to be equal to the first polynomial. Could you help me, please?
Instead of using the cubic formula, it's easier to derive the result from first principles. When the equation is specified with numerical values for the coefficients, this is easier because numerical values can be added up, multiplied etc.. But if the coefficients are symbols then the expressions are going to grow in size by some factor in each step. This is why the general solution for N linear equations with N unknowns is unwieldy for N larger than 3, yet you won't find it a big deal to solve ten equations with ten unknowns using Gaussian elimination, if the coefficients are numerical quantities.
To solve 3rd degree equation, you should get rid of the quadratic term by putting$ x = y + 1/3$:
$$x^3 - x^2 - 8 x + 12 = y^3 -\frac{25}{3}y + \frac{250}{27}$$
Then we invoke the identity:
$$(A+B)^3 = A^3+ 3 A^2B +3 AB^3 + B^3$$
which we can write as:
$$(A+B)^3 - 3 AB (A+B) - (A^3 + B^3)$$
So, if we can find and $A$ and a $B$ such that
$$A B = \frac{25}{9}$$
and
$$A^3 + B^3 = - \frac{250}{27}$$
Then $A + B$ will satisfy the equation.
If we put $A^3 = a$ and $B^3 = b$, then we have:
$$a b = \left(\frac{25}{9}\right)^3$$
and
$$a + b = - \frac{250}{27} $$
This then gives rise to a quadratic equation for e.g. $a$:
$$a^2 + \frac{250}{27} a + \left(\frac{25}{9}\right)^3 = 0$$
The solution for $a$ is:
$$a = -\frac{125}{27}$$
And $b$ has the same solution:
$$b = -\frac{125}{27}$$
$A$ and $B$ are the cube roots of $a$ and $b$, respectively, but such that the product of $A$ and $B$ equals $ \frac{25}{9}$, so if we choose one of the 3 possible a cube root for $A$, the cube root we need to choose for $B$ is fixed.
The solution are thus given by:
$$y_n = A_n + B_n$$
for $n = 0,1,2$
where:
$$A_n = -\frac{5}{3}\exp\left(\frac{2 \pi i n}{3}\right)$$
$$B_n = -\frac{5}{3}\exp\left(\frac{-2 \pi i n}{3}\right)$$
We can simplify this as:
$$y_n = -\frac{10}{3}\cos\left(\frac{2 \pi n}{3}\right)$$
Therefore:
$$x_n = \frac{1}{3} -\frac{10}{3}\cos\left(\frac{2 \pi n}{3}\right)$$
The solutions are thus $x = -3$ and $x = 2$, the latter having a multiplicity of 2.