<s>[INST] When is the degree of this number 3? I am helping a friend of mine, that works in history of mathematics. She is studying the story of the solution of the cubic equation by Cardano. Sometimes she asks me some mathematical questions, that are very hard to motivate from a modern point of view, but that were interesting to Cardano. So please do not ask for motivations. The question is the following. Let $a$, $b$ be rational numbers, with $b$ not a square. Consider the number
$$
t=\sqrt[3]{a+\sqrt{b}}+\sqrt[3]{a-\sqrt{b}}-\sqrt{a^2-b}
$$
Under what conditions on $a$ and $b$ is the degree (over $\mathbb{Q}$) of $t$ equal to $3$? A sufficient condition can be found as follows. Let $P(x) = x^3+\alpha_2 x^2 + \alpha_1 x + \alpha_0$ be a rational polynomial. The general expression of the roots of $P$ is
$$
\sqrt[3]{- \frac{q}{2} + \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}} + \sqrt[3]{- \frac{q}{2} - \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}} - \frac{\alpha_2}{3},
$$
where
$$
q = \frac{2\alpha_2^3 - 9\alpha_2\alpha_1 + 27\alpha_0}{27}
$$
and
$$
p = \frac{3\alpha_1 - \alpha_2^2}{3},
$$
see here. So we can take $a = -\frac{q}{2}$ and $b = \frac{q^2}{4} + \frac{p^3}{27}$ and we need to force $\sqrt{a^2 -b} = \frac{\alpha_2}{3}$. This boils down to $\alpha_1 = \frac{\alpha_2^2 - 3 \sqrt[3]{3\alpha_2^2}}{3}$. We find that one of the solutions of
$$
x^3 + \alpha_2 x^2+ \frac{\alpha_2^2 - 3 \sqrt[3]{3\alpha_2^2}}{3}x+\alpha_0=0
$$
has the required form (of course we need to assume that $\alpha_2$ is such that $\sqrt[3]{3 \alpha_2^2}$ is rational). In this case $a$ and $b$ are given by the above expressions.
I suspect that if $t$ has degree $3$, then its minimal polynomial must be of this form and that $a$ and $b$ are as above, but I am not able to prove it. Note that the condition that $t$ has degree $3$ implies that it can be written as the sum of two cubic root and a rational number (because of the formula), but it is not completely clear that this way of writing $t$ is unique.
 [/INST] Edit: The takeaway is that there is another, exclusive way to generate $a$ and $b$ that given an equation of degree $3$. First, chose parameters $a$ and $s$ such that $2a/s(s^2-3)$ is not a perfect cube and $1-4/s^2(s^2-3)^2$ is not a perfect square. This is most such values of $s$. Then choose $b$ according to the formula:
$b=a^2\left(1-\frac{4}{s^2(s^2-3)^2}\right)$
Then the number asked in the question is this degree $3$ number:
$t=s\sqrt[3]{\frac{2a}{s(s^2-3)}}+ \frac{2a}{s(s^2-3)}$
and can not be written in the way described in the question.
We get that from this analysis:
This is equivalent to asking whether $a^2-b$ is the sixth power of a rational number, since $\sqrt[3]{3\alpha_2^2}=\sqrt[3]{27(a^2-b)}=3\sqrt[3]{a^2-b}$ is rational, and $\sqrt{a^2-b}=\alpha_2/3$ is also rational. Vice versa, if we know that $a^2-b=x^6$ we set:
$\alpha_0=-2a+x^9-3x^5-(2/3)x^6$
$\alpha_1=3x^6-3x^2$
$\alpha_2=3x^3$
We can gain additional insight using Galois theory. Consider the extension $\mathbb Q(\sqrt{a^2-b},\sqrt[3]{a+\sqrt{b}},\sqrt[3]{a-\sqrt{b}},\sqrt{-3})/\mathbb Q(a,b)$. This is a Galois extension of degree $72$, given by adjoining three square roots and then two cube roots. It is easy to check that the Galois group is $S_3 \times S_3 \times S_2$, with the first factor permuting the conjugates of $\sqrt[3]{a^2-b}$, the second permuting the conjugates of $\sqrt[3]{\frac{a+\sqrt{b}}{a-\sqrt{b}}}+\sqrt[3]{\frac{a-\sqrt{b}}{a+\sqrt{b}}}$, and the third permuting the conjugates of $\sqrt{a^2-b}$.
The stabilizer of the formula is Klein four group, generated by a transposition in each $S_3$, the first switching $\sqrt{-3}$ and $-\sqrt{-3}$ and the second switching $\sqrt{-3b}$ and $-\sqrt{-3b}$. Thus, the generic degree is $18$, as Igor Rivin's numerical evidence suggested.
For a specific value of $a$ and $b$, the Galois group is a subgroup of this. To be degree $3$, the Galois group, mod its intersection with the Klein four group, must have order $3$, so the Galois group must have order $6$ or $12$. Whatever subgroup it is, the elements of the field fixed by it are rational numbers. For instance, since every possible subgroup fixes $\sqrt{a^2-b}$, it is always rational.
Assume that $\sqrt{-3b}$ is irrational. Then the subgroup must have order $12$, since $\sqrt{b}$, $\sqrt{-3}$, and $\sqrt{-3b}$ are all irrational, the action on them implies the subgroup must have order a multiple of $4$, thus exactly $12$, so it contains the either Klein four group. There are two subgroups of order $12$ with this property, the one containing the entire first $S_3$ and the one containing the entire second $S_3$.
For the one containing the second $S_3$, the invariants are generated by $\sqrt{a^2-b}$ and $\sqrt[3]{a^2-b}$. This is the case discussed in the question. We are asked to eliminate the other cases.
For the one containing the first $S_3$, the invariants are $\sqrt{a^2-b}$ and $\sqrt[3]{\frac{a+\sqrt{b}}{a-\sqrt{b}}}+\sqrt[3]{\frac{a-\sqrt{b}}{a+\sqrt{b}}}$. Calling them $x$ and $y$, we have the formulas $y^3-3y=\frac{a+\sqrt{b}}{a-\sqrt{b}}+\frac{a-\sqrt{b}}{a+\sqrt{b}}=2\frac{a^2+b}{a^2-b}=4\frac{a^2}{a^2-b}-2$, so we have the nodal cubic curve:
$y^3-3y+2=\left(\frac{2a}{x}\right)^2=z^2$
setting $z=2a/x$, we can parametrize the curve $(y-1)^2(y+2)=z^2$, so $y=s^2-2$, $z=s(s^2-3)$ provides a rational parameterization. (Thanks to Ricky for pointing out it is singular.) At this point we can just set $b=a^2-4a^2/z^2=a^2\left(1-\frac{4}{s^2(s^2-3)^2}\right)$. This gives the formula above.
</s>