Currently I am trying to deduce Cardano's formula for cubics, however near the very end I am struggling with the signs and can't figure out what is wrong. We will be trying to find a solution for cubics of the form
$$X^3 + pX = q.\tag{1}$$
Similiar to many others I will complete the cube as depicted in the following picture:
So for this particular case I am going to extend the cube $(u-v)^3$ to be almost $u^3$, more specific
$$(u-v)^3 + 3uv(u-v) = u^3 - v^3.\tag{2}$$
Apparently by adding three cuboids of volume $3uv(u-v)$ we have an entire cube but a small cube itself. Let $X=u-v$ then we can find a solution for $X$ in $(1)$ if we find a solution for $(u,v)$ in $(2)$. Comparing $(1)$ and $(2)$ obviously yields
$$p=3uv\tag{3}$$ as well as $$q=u^3-v^3.\tag{4}$$ From $(3)$ we obtain $v=p/(3u)$ and plugging it in to $(4)$ and multiplying with $u^3$ and finally substituting $s=u^3$ yields
$$\begin{align} q &= u^3 - \left(\frac{p}{3u}\right)^3 \\ qu^3 &= u^6 - \left(\frac{p}{3}\right)^3 \\ u^6 - qu^3 - \left(\frac{p}{3}\right)^3 &= 0\\ s^2 - qs - \left(\frac{p}{3}\right)^3 &= 0.\tag{5} \end{align}$$
Equation $(5)$ has the solutions
$$s_{1/2}=\frac{q}{2}\pm\sqrt{\left(\frac{q}{2}\right)^2 + \left(\frac{p}{3}\right)^3}.$$
This can be repeated for $v$ as well. From $(3)$ we obtain $u=p/(3v)$ and plugging it in to $(4)$ and multiplying with $v^3$ and finally substituting $t=v^3$ yields
$$\begin{align} q &= \left(\frac{p}{3v}\right)^3 - v^3 \\ qv^3 &= \left(\frac{p}{3}\right)^3 - v^6 \\ v^6 + qv^3 - \left(\frac{p}{3}\right)^3 &= 0\\ t^2 + qt - \left(\frac{p}{3}\right)^3 &= 0.\tag{6} \end{align}$$
Equation $(6)$ has the solutions
$$t_{1/2}=-\frac{q}{2}\pm\sqrt{\left(\frac{q}{2}\right)^2 + \left(\frac{p}{3}\right)^3}.$$
At this point equation $(4)$ should imply which $s_m$ and $t_n$ have to be taken into consideration, but I can't see it actually. Anyways, since we substituted $X=u-v$ we can now see that
$$X = u-v = \sqrt[3]{\frac{q}{2}\pm\sqrt{\left(\frac{q}{2}\right)^2 + \left(\frac{p}{3}\right)^3}} - \sqrt[3]{-\frac{q}{2}\pm\sqrt{\left(\frac{q}{2}\right)^2 + \left(\frac{p}{3}\right)^3}}$$
for the correct signs.
Unfortunately, this isn't Cardano's formula and not correct. Not even manipulating by factoring $-1=\sqrt[3]{-1}$ helped me. Do you see where I made mistakes with the signs?
