Solving a complex cubic equation I am trying to solve the following equation:
$$
z^3 + z +1=0
$$
Attempt: I tried to factor out this equation to get a polynomial term, but none of the roots of the equation is trivial.
 A: Given your equation $x^3+x+1=0$, in standard form ($ax^3+bx^2+cx+d=0$) your equation has $$\qquad a=1\qquad b=0\qquad c=1\qquad d=1$$
The "common" cubic formula is
$$x=\sqrt[3]{\biggl(\frac{-b^3}{27a^3 }+\frac{bc}{6a^2}-\frac{d}{2a}\biggr)+\sqrt{\biggl(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a}\biggr)^2+\biggl(\frac{c}{3a}-\frac{b^2}{9a^2}\biggr)^3}}+\sqrt[3]{\biggl(\frac{-b^3}{27a^3 }+\frac{bc}{6a^2}-\frac{d}{2a}\biggr)-\sqrt{\biggl(\frac{-b^3}{27a^3}+\frac{bc}{6a^2}-\frac{d}{2a}\biggr)^2+\biggl(\frac{c}{3a}-\frac{b^2}{9a^2}\biggr)^3}}-\frac{b}{3a}$$
and if you plug in the coefficients, the $b$ terms will drop out and you will have something a "little" simpler. You may encounter transient complex terms under the square root but WolframAlpha can deal with them. You can also give WolframAlpha a try at solving the equation directly as it does here yielding $1$ real and $2$ complex roots. I think the real root you are seeking is here.
A: Indeed, none of the roots is trivial. In this case, your best option is probably to apply Cardano's formula. It gives a real root and two complex non-real roots.
A: Hint:
Like How to solve the cubic $x^3-3x+1=0$?,
let $z=a\cos t,a\ne0$ such that $\dfrac{a^3}4=\dfrac{-a}3\implies a^2=-\dfrac43\implies a=\pm\dfrac2{\sqrt3}i$
$$-1=a^3\cos^3t+a\cos t=\dfrac{a\cos3t}{-3}$$
$$\iff\cos3t=\dfrac3a$$
If we choose $a=-\dfrac{2i}{\sqrt3},\cos3t=\dfrac{3\sqrt3i}2,\sin3t=\pm\sqrt{1+\dfrac{27}4}$
$$e^{i3t}=i\left(\dfrac{3\sqrt3}2\pm\sqrt{1+\dfrac{27}4}\right)$$
A: Substitute $x=\frac2{\sqrt3}\sinh t$ to rewrite the equation  $x^3+x+1=0 $ as
$$4\sinh^3t+3\sinh t + \frac{3\sqrt3}2=0$$
Comparing with the identity $4\sinh^3t+3\sinh t = \sinh3t$
results in $\sinh 3t =- \frac{3\sqrt3}2$, or
$t = -\frac13\sinh^{-1} \frac{3\sqrt3}2$. Thus, one real root of the cubic equation is
$$x_0= -\frac2{\sqrt3}\sinh \left( \frac13\sinh^{-1} \frac{3\sqrt3}2\right) \approx -0.6823
$$
Then, factorize the cubic equation as
$$x^3+x+1=(x-x_0)(x^2+x_0 x-\frac1{x_0})$$
and the quadratic factor gives a pair of complex roots
$$x_{1,2}=-\frac{x_0}2 \pm \frac i2 \sqrt{1-\frac3{x_0}}$$
