Question: What is the generalized formula for denesting
$$\sqrt[3]{A+B\sqrt{C}}$$
Recently I've posted a question about nested radicals in solving the cubic equation. I received a comment about an ingenious method to denest the radical by solving a cubic equation, but, I was still not satisfied. See $\sqrt[3]{\text{something}\pm\sqrt{\text{something}}}$ and the link from the comments Denesting Phi, Denesting Cube Roots.
Trying to solve cubic equations, sometimes I would get something like $\sqrt[3]{-27+6\sqrt{21}}$, which is not easily denested by hand. I had to go and solve another cubic equation. The radical derives from the equation $x^3+x-2=0$. The cubic equation I had to solve for the radical would be more complex than the equation itself. I tried searching the internet for a denesting formula but I couldn't find a definitive one. All I could find was something about Galois theory which is mathematics I don't understand (I'm a 10th grader in Romania).
So, I tried making my own algorithm. Based on the idea from Denesting Phi, Denesting Cube Roots, I might have generalized it to solving a depressed cubic equation, which should be relatively easy and, in lucky cases, immediate. Keep in mind this is not a formula, but a simplification.
See the answer below.
$$\sqrt[3]{A+B\sqrt{C}}$$ We want to write $A+B\sqrt{C}$ as $(a+b\sqrt{C})^3$. $$(a+b\sqrt{C})^3=(a^3+3ab^2C)+(b^3C+3a^2b)\sqrt{C}$$ $$\Rightarrow A+B\sqrt{C}=(a^3+3ab^2C)+(b^3C+3a^2b)\sqrt{C}$$ $$ \Rightarrow \begin{cases} A=a^3+3ab^2C&(1) \\ B=b^3C+3a^2b&(2) \end{cases} $$ $$\text{Let}~\alpha=\frac{A}{B}\Rightarrow A=\alpha B.\text{ Multiply equation (2) by }\alpha\text{ and we get }$$ $$B\alpha=\alpha b^3C+3\alpha a^2b.\text{ But }B\alpha=A=a^3+3ab^2C$$ $$\Rightarrow a^3+3ab^2C=\alpha b^3C+3\alpha a^2b$$ $$\text{Dividing by }b^3\text{ we get }\Big(\frac{a}{b}\Big)^3+3C\Big(\frac{a}{b}\Big)=3\alpha\Big(\frac{a}{b}\Big)^3+\alpha C.$$ $$\text{ Make the notation }w=\frac{a}{b}\text{ so }w^3+3Cw=3\alpha w^3+\alpha C.$$ $$\text{Moving terms to the left hand side we have }\underbrace{1}_aw^3\underbrace{-3\alpha}_b w^2\underbrace{+3C}_cw\underbrace{-\alpha C}_d=0.$$ $$ \text{Solve the cubic equation using the cubic formula. I have emphasized the coefficients above.} $$ $$\Delta_0=b^2-3ac=9(\alpha^2-C)$$ $$\Delta_1=2b^3-9abc+27a^2d=-54\alpha(\alpha^2-C)$$ $$\text{Now calculate the cubic constant }$$ $$\mathcal{C}=\sqrt[3]{\frac{\Delta_1\pm\sqrt{\Delta_1^2-4\Delta_0^3}}{2}}$$ $$\text{ Note this }\mathcal{C}\text{ is not the }C\text{ from the nested radical! }$$ $$\sqrt{\Delta_1^2-4\Delta_0^3}=\sqrt{\big(-54\alpha(\alpha^2-C)\big)^2-4\big(9(\alpha^2-C)\big)^3}=\sqrt{54^2(\alpha^2-C)^2\big(\alpha^2-(\alpha^2-C)\big)}$$ $$\sqrt{\Delta_1^2-4\Delta_0^3}=54|\alpha^2-C|\sqrt{C}$$ $$\mathcal{C}=\sqrt[3]{\frac{-54\alpha(\alpha^2-C)\pm54|\alpha^2-C|\sqrt{C}}{2}}$$ $$\text{But the }\pm\text{ and the }|\alpha^2-C|\text{ go meh and we are left with }$$ $$\mathcal{C}=\sqrt[3]{\frac{-54\alpha(\alpha^2-C)\pm54(\alpha^2-C)\sqrt{C}}{2}}$$ $$\text{Let's consider the }-\text{ solution because we will have}-54\text{ common factor and we will be left only with }+\text{ inside the radical. }\mathcal{C}\text{ simplifies to be}$$ $$\mathcal{C}=\sqrt[3]{\frac{-54(\alpha^2-C)(\alpha-\sqrt{C})}{2}}=-3\sqrt[3]{(\alpha^2-C)(\alpha+\sqrt{C})}$$ $$\text{One of the roots will have the formula }w=-\frac{1}{3a}\Big(b+\mathcal{C}+\frac{\Delta_0}{\mathcal{C}}\Big).$$ $$\frac{\Delta_0}{\mathcal{C}}=\frac{9(\alpha^2-C)}{-3\sqrt[3]{(\alpha^2-C)(\alpha^2-\sqrt{C})}}=-3\frac{(\alpha+\sqrt{C})(\alpha-\sqrt{C})}{\sqrt[3]{\alpha+\sqrt{C}}\sqrt[3]{(\alpha-\sqrt{C})^2}}$$ $$\text{We have }\frac{z}{\sqrt[3]{z}}=\sqrt[3]{z^2}\text{ and }\frac{z}{\sqrt[3]{z^2}}=\sqrt[3]{z}\text{ by rationalizing.}$$ $$\text{For }z=\alpha+\sqrt{C}\text{ and }z=\alpha-\sqrt{C}\text{ respectively we obtain }$$ $$\frac{\Delta_0}{\mathcal{C}}=-3\sqrt[3]{(\alpha^2+C)(\alpha-\sqrt{C})}$$ $$w=-\frac{1}{3}\Big(-3\alpha-3\sqrt[3]{(\alpha^2-C)(\alpha-\sqrt{C})}-3\sqrt[3]{(\alpha^2-C)(\alpha+\sqrt{C})}\Big)$$ $$w=\alpha+\sqrt[3]{\alpha^2-C}\Big(\sqrt[3]{\alpha-\sqrt{C}}+\sqrt[3]{\alpha+\sqrt{C}}\Big)$$ $$ \text{Make the following notations: } \begin{cases} R=\sqrt[3]{\alpha^2-C} \\ T=\underbrace{\sqrt[3]{\alpha-\sqrt{C}}}_p+\underbrace{\sqrt[3]{\alpha+\sqrt{C}}}_q \end{cases} $$ $$\text{We will work on }T.~T^3=(p+q)^3=p^3+q^3+3pq(p+q).$$ $$p^3+q^3=2\alpha$$ $$3pq(p+q)=3\sqrt[3]{\alpha^2-C}\cdot T=3RT$$ $$T^3=2\alpha+3RT\Rightarrow T^3-3RT-2\alpha=0$$ $$\mathbf{And~here~we~stop.}$$ This is a depressed equation which should be OK to solve by hand. We will suppose $T$ is calculated through this equation. Hence, we have calculated: $\alpha$, $R$ and $T$ and should be able to go for $w=\alpha+RT$. Coming back to our system of equations, we have $\frac{a}{b}=w\Rightarrow a=wb$, and by substituting in $(2)$ we get $$B=3w^2b^3+Cb^3\Rightarrow b^3(3w^2+C)=B\Rightarrow b=\sqrt[3]{\frac{B}{3w^2+C}}$$ $$B=b^3C+3a^2b\Rightarrow 3a^2b=B-b^3C\Rightarrow a=\pm\sqrt{\frac{B-b^3C}{3b}}$$ $$\mathbf{And~these~are~the~final~formulas.}$$ Let's recap the algorithm for $\sqrt[3]{A+B\sqrt{C}}$. We have $$ \begin{cases} \alpha=\frac{A}{B} \\ R=\sqrt[3]{\alpha^2-C} \\ T^3-3RT-2\alpha=0 \\ w=\alpha+RT \\ b=\sqrt[3]{\frac{B}{3w^2+C}} \\ a=\pm\sqrt{\frac{B-b^3C}{3b}} \end{cases} $$ Let's take for example $\sqrt[3]{2+\sqrt{5}}$. $$ \begin{cases} A=2 \\ B=1 \\ C=5 \\ \alpha=2 \\ R=-1 \\ T^3+3T-4=0\Rightarrow T=1\text{ (obvious)} \\ w=1 \\ b=\frac{1}{2} \\ a=\frac{1}{2} \end{cases} $$ Our final form is $a+b\sqrt{C}=\frac{1}{2}+\frac{1}{2}\sqrt{5}$. So $\sqrt[3]{2+\sqrt{5}}=\frac{1}{2}+\frac{1}{2}\sqrt{5}$.
Another example: $\sqrt[3]{7+5\sqrt{2}}$. $$ \begin{cases} A=7 \\ B=5 \\ C=2 \\ \alpha=\frac{7}{5} \\ R=-\sqrt[3]{\frac{1}{25}}=-\frac{\sqrt[3]{5}}{5} \\ T^3+\frac{3\sqrt[3]{5}}{5}T-\frac{14}{5}=0\Leftrightarrow5T^3+3\sqrt[3]{5}T-14=0 \\ \end{cases} $$ $$T\text{ will be of the form }\frac{k}{\sqrt[3]{5}}\Rightarrow k^3+3k-14=0.\text{ By trial we get }k=2\text{ and }T=\frac{2}{\sqrt[3]{5}}$$ $$ \begin{cases} w=1 \\ b=1 \\ a=1 \end{cases} $$ Conclusion: $\sqrt[3]{7+5\sqrt{2}}=1+\sqrt{2}$
Let's see the example from the question: $\sqrt[3]{-27+6\sqrt{21}}$ $$ \begin{cases} A=-27 \\ B=6 \\ C=21 \\ \alpha=-\frac{9}{2} \\ R=-\frac{\sqrt[3]{3}}{\sqrt[3]{2}}=-\frac{\sqrt[3]{6}}{2} \\ T^3+\frac{3\sqrt[3]{6}}{2}T+9=0\Leftrightarrow2T^3+3\sqrt[3]{6}T+18=0 \\ \end{cases} $$ $$T\text{ will be of the form }\frac{k}{\sqrt[3]{6}}\Rightarrow\frac{k^3}{3}+3k+18=0\Leftrightarrow k^3+9k+54=0.$$ $$k\text{ must be negative.}$$ $$\text{For }-1\text{ and }-2\text{ we get }44\text{ and }28\text{ respectively.}$$ $$\text{It feels like we're approaching the answer. Let's try }-3\text{ and we get identity.}$$ $$k=-3\text{ with }T=-\frac{3}{\sqrt[3]{6}}$$ $$ \begin{cases} w=-3 \\ b=\frac{1}{2} \\ a=-\frac{3}{2}\text{ (notice that we used the negative solution)} \end{cases}$$ Thus, $\sqrt[3]{-27+6\sqrt{21}}=-\frac{3}{2}+\frac{\sqrt{21}}{2}$.
FINAL NOTES
Signed by Neox