I am trying to solve the following set of equations for $L'$ as described in this publication excerpt:
So basically, to re-write that, I have the following series of equations:
$a=X/2$
$b=-(75X^2 + 147Y^2)/80$
$c = -9X^3/16$
$P = 2a^3−9ab+ 27c$
$Q = P^2 -4(a^2-3b)^3$
$w_1=−0.5 +\frac{i\sqrt{3}}{2}$
$w_2=−0.5 -\frac{i\sqrt{3}}{2}$
Which lead to the following three possible solutions:
$L'_1 = -\frac{1}{3} * [a+\sqrt[3]{0.5*(P+\sqrt{Q})} +\sqrt[3]{0.5*(P-\sqrt{Q})}]$
$L'_1 = -\frac{1}{3} * [a+w_2\sqrt[3]{0.5*(P+\sqrt{Q})} +w_1\sqrt[3]{0.5*(P-\sqrt{Q})}]$
$L'_1 = -\frac{1}{3} * [a+w_1\sqrt[3]{0.5*(P+\sqrt{Q})} +w_2\sqrt[3]{0.5*(P-\sqrt{Q})}]$
I am now trying to solve $L'$, but I'm not actually sure how to do it.
My problem is for any input of $X$ or $Y$, $P$ I believe can end up positive or negative, but $Q$ is always a negative.
So let's say hypothetically $P = 2$ and $Q = -3$, then how do you solve:
$\sqrt[3]{0.5*(P-\sqrt{Q})} = \sqrt[3]{1-0.5*i\sqrt{3}}$
What would be the next step?
Basically, I don't know how to solve these equations if $Q$ is negative or if $0.5*(P-\sqrt{Q})$ is negative. I don't know much about complex math. I've used Euler's formula in other situations but I'm not sure here.
Any help? Thanks.

For this equation, I should strongly recommend to use the trigonometric method for three real roots since $$\Delta=6914880 \left(175 X^4 Y^2+230 X^2 Y^4+147 Y^6\right) >0 \quad \forall X,Y$$ $$p=-\frac{49}{240} \left(5 X^2+9 Y^2\right)\qquad\qquad q=\frac{49}{4320} X \left(27 Y^2-35 X^2\right)$$ which gives for the roots $$L'_{k}=-\frac X 6+\frac{7 \sqrt{5 X^2+9 Y^2}}{6 \sqrt{5}}\times $$ $$\cos \left(\frac{2 \pi k}{3}-\frac{1}{3} \cos ^{-1}\left(-\frac{\sqrt{5} X \left(27 Y^2-35 X^2\right)}{7 \left(5 X^2+9 Y^2\right)^{3/2}}\right)\right)$$ with $k=0,1,2$.