Finding parameters of an ellipse in terms of Semi-Latus Rectum and Directrix. I am trying to solve for all the parameters of an ellipse in terms of the Semi-Latus Rectum, $\ell$, and Directrix, $x$. This is for some equation tables I am making so I am looking for the most simplistic expression. In nearly all the cases it comes down to solving a cubic function. 
For example in the case of the linear eccentricity, $c$, I know that:
$$
\ell=\frac{\sqrt{c}(c-x)}{\sqrt{x}}
$$
Which gets rearranged into:
$$
c^3-2c^2 x+c x^2-x \ell^2 = 0
$$
Solving for c using the normal general solution to the cubic equation gives me something nasty. Mathematica also doesn't help. Using a trigonometric solution helps however it gives me a piecewise solution:
$$
c =\begin{cases}
 &  \dfrac{2x}{3}  \left (1 + sin \left (\frac{arcsin\left (1 - \frac{27 \ell^2}{2 x^2}\right )}{3} \right ) \right )\\ 
 & \dfrac{4x}{3}  sin^2 \left (\frac{arccos\left (1 - \frac{27 \ell^2}{2 x^2}\right )}{6} \right )
\end{cases} 
$$ 
I feel that this can be simplified further through either assumptions on $x$ and $\ell$ or some trig identity I am unaware of. 
If anyone has a reference where they solved for the parameters of an ellipse in terms of just the semi-latus rectum and directrix that would be wonderful. Otherwise any insights on how to reduce the answer further or other methods to attack this problem would be appreciated.

There's one bug in the first equation though it's unaffected after squaring both sides.
\begin{align}
  x &= \frac{a^2}{c} \\
  a &= \sqrt{cx} \\
  \ell &= \frac{b^2}{a} \\
  &= \frac{a^2-c^2}{a} \\
  &= \frac{cx-c^2}{\sqrt{cx}} \\
  \ell \sqrt{x} &= \sqrt{c} \, \color{red}{(x-c)} \\
  0 &= c\sqrt{c}-x\sqrt{c}+\ell \sqrt{x} \\
  \sqrt{c} &= 2\sqrt{\frac{x}{3}} \sin
  \left(
     \frac{1}{3} \sin^{-1} \frac{3\sqrt{3}\, \ell}{2x}+\frac{2k\pi}{3}
  \right) \\
  c &= \frac{4x}{3} \sin^2
  \left(
    \frac{1}{3} \sin^{-1} \frac{3\sqrt{3}\, \ell}{2x}+\frac{2k\pi}{3}
  \right)
\end{align}

It is quite standard for a cubic equation.  The roots are irreducible and also  inconstructible by compasses and ruler.

Further points to be noticed:


*

*$k=0,1 \implies\sqrt{c}>0 \implies \text{two ellipses}$

*$k=2 \quad \implies\sqrt{c}<0 \implies \text{a hyperbola}$

*$\dfrac{X^2}{\frac{4x^2}{3} \sin^2
    \left(
      \frac{1}{3} \sin^{-1} \frac{3\sqrt{3}\, \ell}{2x}+\frac{2k\pi}{3}
    \right)}+
    \dfrac{Y^2}{\frac{2\ell x}{\sqrt{3}} \sin
    \left(
      \frac{1}{3} \sin^{-1} \frac{3\sqrt{3}\, \ell}{2x}+\frac{2k\pi}{3}
    \right)}=1$

*$e=\dfrac{2}{\sqrt{3}}
      \left|
        \sin \left(
               \dfrac{1}{3} \sin^{-1} \dfrac{3\sqrt{3}\, \ell}{2x}+
               \dfrac{2k\pi}{3}
             \right)
      \right|$

