Turn a real number (with a complex closed form) into its trigonometric form This post outlines 'fake' complex numbers (real numbers with complex closed form that usually come from the roots of unfactorable cubics (the example I need right now), or they can come from things like $i^i = e^{-\frac{\pi}{2}}$), in his own answer he gives the example: $\sqrt[3]{1+i \sqrt{7}}+\sqrt[3]{1-i \sqrt{7}}$, which from first glance doesn't look like it could simplified any futher, then states:

Using Euler's formula we can find a trigonometric representation of this number. $2 \sqrt{2} \cos{\left(\frac{\tan^{-1}{\left(\sqrt{7}\right)}}{3}\right)}$

Which when put into WolframAlpha is confirmed, they are both approximately equal to $2.602$
How did he do that? Euler's formula, $e^{ix} = \cos(x) + i\sin(x)$ doesn't seem relevant, the example has no clear $a+ib$ form (and it shouldn't because it is a real number, $b$ will just be $0$, so a will just be the answer anyway) and there is an inverse tangent present in the expression, also covered by Euler's formula somehow? How does he just go from to $A$ to $B$ like it's common knowledge?
Question applies to the example but it would be nice to have further advice on how to turn other fake complex numbers into real forms like this without WolframAlpha.
 A: Recall DeMoivre's formula:
$$(\cos\theta + i\sin\theta)^n = \cos(n\theta) + i\sin(n\theta)$$
$$\operatorname{cis}(\theta)^n = \operatorname{cis}(n\theta)$$
This can trivially be derived from Euler's formula.
Also note that in polar coordinates,
$$1 + i\sqrt{7} = \sqrt{8} \operatorname{cis}(\tan^{-1}\sqrt{7})$$
So by DeMoivre's formula:
$$(1 + i\sqrt{7})^{1/3}$$
$$ = \left(\sqrt{8} \operatorname{cis}(\tan^{-1}\sqrt{7})\right)^{1/3}$$
$$ = 8^{1/6} \operatorname{cis}(\frac{1}{3}\tan^{-1}\sqrt{7})$$
$$ = \sqrt{2} \operatorname{cis}(\frac{\tan^{-1}\sqrt{7}}{3})$$
$$ = \sqrt{2} \cos(\frac{\tan^{-1}\sqrt{7}}{3}) + i\sqrt{2}\sin(\frac{\tan^{-1}\sqrt{7}}{3}) $$
Similarly,
$$(1 - i\sqrt{7})^{1/3}$$
$$ = \left(\sqrt{8} \operatorname{cis}(-\tan^{-1}\sqrt{7})\right)^{1/3}$$
$$ = 8^{1/6} \operatorname{cis}(-\frac{1}{3}\tan^{-1}\sqrt{7})$$
$$ = \sqrt{2} \operatorname{cis}(-\frac{\tan^{-1}\sqrt{7}}{3})$$
$$ = \sqrt{2} \cos(-\frac{\tan^{-1}\sqrt{7}}{3}) + i\sqrt{2}\sin(-\frac{\tan^{-1}\sqrt{7}}{3}) $$
$$ = \sqrt{2} \cos(\frac{\tan^{-1}\sqrt{7}}{3}) - i\sqrt{2}\sin(\frac{\tan^{-1}\sqrt{7}}{3}) $$
So adding the two cube roots gives $2\sqrt{2} \cos(\frac{\tan^{-1}\sqrt{7}}{3})$, QED.

More generally, if $z = r\operatorname{cis}\theta$, then
$$\sqrt[n]{z} + \sqrt[n]{\overline{z}} = 2\sqrt[n]{r} \cos\left(\frac{\theta}{n}\right)$$
Or if $z = x + iy$, then:
$$\sqrt[n]{x + iy} + \sqrt[n]{x - iy} = 2\sqrt[2n]{x^2 + y^2} \cos\left(\frac{\arg(x + iy)}{n}\right)$$
A: Notice that there is a clearly written complex number inside each of the cube roots, so we can express those in polar form via Euler's formula:
$$\begin{eqnarray} 1 + i\sqrt{7} & = & re^{i \theta} \\
& = & r \cos \theta + ir \sin \theta \\
r \cos \theta & = & 1 \\
r \sin \theta & = & \sqrt{7} \\
r^2(\cos^2 \theta + \sin^2 \theta) & = & 1^2 + \sqrt{7}^2 \\
r^2 & = & 8 \\
\tan \theta & = & \frac{\sin \theta}{\cos \theta} \\
& = & \frac{r \sin \theta}{r \cos \theta} \\
& = & \frac{\sqrt{7}}{1} \\
& = & \sqrt{7}\end{eqnarray}$$
So $1 + i \sqrt{7} = \sqrt{8} e^{i \tan^{-1} \sqrt{7}}$, and similarly we can find $1 - i \sqrt{7} = \sqrt{8} e^{i \tan^{-1} -\sqrt{7}} = \sqrt{8}e^{-i \tan^{-1} \sqrt{7}}$. We could then just say $1 + i\sqrt{7} = \sqrt{8} e^{i \theta}$ and $1 - i\sqrt{7} = \sqrt{8}e^{-i\theta}$, where $\tan \theta = \sqrt{7}$.
Then when we take the cube roots (presumably taking the principal cube root, since technically there are three choices), we have $\sqrt[3]{1 + i \sqrt{7}} = \sqrt[3] {\sqrt{8} e^{i \theta}} = \sqrt{2} e^{i \frac{\theta}{3}}$, by applying exponent rules. Likewise, $\sqrt[3]{1 - i \sqrt{7}} = \sqrt{2} e^{-i \frac{\theta}{3}}$.
Finally, to get to the final result, we can use the complex definition of cosine (or just expand out the exponentials via Euler's formula in the reverse direction and note that the imaginary parts cancel), giving the required expression.
