How to arrive at Ramanujan's nested radicals? Ramanujan found that $\sqrt[3]{\cos\left(\frac {2\pi}{7}\right)}+\sqrt[3]{\cos\left(\frac {4\pi}{7}\right)}+\sqrt[3]{\cos\left(\frac {8\pi}{7}\right)}=\sqrt[3]{\frac {1}{2}\left(5-3\sqrt[3]{7}\right)}$ on the last page of Ramanujan's second notebook.
He also found that $\sqrt[3]{\sec\left(\frac {2\pi}{9}\right)}+\sqrt[3]{\sec\left(\frac {4\pi}{9}\right)}-\sqrt[3]{\sec\left(\frac {\pi}{9}\right)}=\sqrt[3]{6\sqrt[3]{9}-6}$
My question: How do we find the denesting with only the knowledge on the nested radical? Example: How would you find the denestings for $\sqrt[3]{\frac {1}{2}\left(5-3\sqrt{7}\right)}$ without knowledge on $\sqrt[3]{\cos\left(\frac {2\pi}{7}\right)}+\sqrt[3]{\cos\left(\frac {4\pi}{7}\right)}+\sqrt[3]{\cos\left(\frac {8\pi}{7}\right)}$?

Those identities are not difficult to prove once established. For instance, $\alpha=\cos\left(\frac{2\pi}{7}\right),\beta=\cos\left(\frac{4\pi}{7}\right),\gamma=\cos\left(\frac{6\pi}{7}\right)=\cos\left(\frac{8\pi}{7}\right)$ are algebraic conjugates, roots of the polynomial:
$$ p(x) = 8x^3+4x^2-4x-1.$$
If follows that $\alpha^{1/3},\beta^{1/3},\gamma^{1/3}$ are roots of the polynomial:
$$ q(x) = 8x^9-4x^6-4x^3-1 $$
and it is not difficult to compute, from $q(x)$, a polynomial that vanishes over $\alpha^{1/3}+\beta^{1/3}+\gamma^{1/3}$.
With some god-like inspiration, one may notice that
$$ r(x) = 4x^9-30x^6+75x^3+32 $$
is a factor of such polynomial. Then the conjecture
$$ \alpha^{1/3}+\beta^{1/3}+\gamma^{1/3} = \sqrt[3]{\frac{5-3\sqrt[3]{7}}{2}} $$
is natural, since $r(x)$ is the minimal polynomial of the RHS, and it is straightforward to check.
However, how Ramanujan actually saw that is a mystery to me. Probably the term genius was forged for a reason.
