I want to solve for $x$ in the following expression:
$t(x)=\frac{1}{3}x^3+x^2-3x+1$
I couldn't factorize it because I found no exact factor, so I tried Cardano's method.
First of all: $k=\frac {-a}{3}=\frac {-1}{3}$ where $a$ comes from $ax^2$ from the original expression.
From here on it's only replacing $y+k$ in every $x$ from the original expression and simplifying.
$t(x)=\frac{1}{3}(y-\frac{1}{3})^3+(y-\frac{1}{3})^2-3(y-\frac{1}{3})+1$
$t(x)=\frac{1}{3}(y^3-\frac{1}{3}3y^2+\frac{1}{9}3y-\frac{1}{9})+(y^2-\frac{1}{3}2y+\frac{1}{9})-(3y-1)+1$
$t(x)=\frac{1}{3}(y^3-y^2+\frac{1}{3}y-\frac{1}{9})+(y^2-\frac{2}{3}y+\frac{1}{9})-(3y-1)+1$
$t(x)=\frac{1}{3}y^3-\frac{1}{3}y^2+\frac{1}{9}y-\frac{1}{27}+y^2-\frac{2}{3}y+\frac{1}{9}-3y+1+1$
$t(x)=\frac{1}{3}y^3+(-\frac{1}{3}+1)y^2+(\frac{1}{9}-\frac{2}{3}-\frac{3}{1})y+(-\frac{1}{27}+\frac{1}{9}+1+1)$
$t(x)=\frac{1}{3}y^3+\frac{2}{3}y^2-\frac{32}{9}y+\frac{56}{27}$
I stopped here because I already know that $ay^2|a\neq{}0$ and Cardano's method needs $y^3+py+q=0$ where there is no $y^2$. Where did I mess up? Can I solve Cardano's method just ignoring $y^2$?
EDIT: If there is a better way to solve my cubic function I would really appreciate some suggestions.
You're looking for problems. First of all rewrite the equation as $$ x^3+3x^2-9x+3-3y=0 $$ Now the substitution is $x=z-1$ (you can't use $y$ with two meanings in the same equation): $$ z^3-3z^2+3z-1+3z^2-6z+3-9z+27+3-3y=0 $$ or $$ z^3-12z+32-3y=0 $$ For Cardano’s formulas, we have $p=-12$ and $q=32-3y$, so $$ z=\sqrt[3]{\frac{3y-32}{2}+\sqrt{\frac{(32-3y)^2}{4}-64}} +\sqrt[3]{\frac{3y-32}{2}-\sqrt{\frac{(32-3y)^2}{4}-64}} $$ and therefore $$ x=1+\sqrt[3]{\frac{3y-32}{2}+\sqrt{\frac{(32-3y)^2}{4}-64}} +\sqrt[3]{\frac{3y-32}{2}-\sqrt{\frac{(32-3y)^2}{4}-64}} $$