equivalent polynomial equations with yet different solutions? I encountered a strange situation that I cannot explain. I am solving this simple equation for $g$:
\begin{equation}
    g= \frac{p}{a-\lambda-g}+\frac{1-p}{-\lambda-g}
\end{equation}
where $a$ is a fixed value, $0\leq p \leq 1$ and $\lambda$ $\in \mathbb{C}$ unspecified.
If $a=0$ the equation simply is quadratic:
\begin{equation}
g=\frac{1}{-\lambda -g}
\end{equation}
\begin{equation}
\implies -g^2-g\lambda-1=0
\end{equation}
and the solution simply is:
$$g_{\pm}\to \frac{1}{2} \left(-\lambda \pm\sqrt{\lambda ^2-4}\right)$$
However if I solve for general $a$, then the equation becomes a polynomial of order $3$ (i.e $Ag^3+Bg^2+Cg+D=0$). I get three solutions for $g\in \mathbb{C}$. And here is the problem: when I put $a=0$ $\textit{after}$ solving this polynomial I do not recover my $g_{\pm}$ (I get very lengthy solutions on mathematica, which is why I am not putting them here).
The equations are equivalent when $a=0$. Why are the solutions not equivalent when $a=0$?
So strange. If someone could explain why it does not hold and shed some light on this question it would be much appreciated. Thanks!
Edit: Rewriting the first equation, we get:
$$
a g^{2}+a g \lambda-g^{3}-2 g^{2} \lambda-g \lambda^{2}-p a+a-g-\lambda=0
$$
Setting $a=0$ we obtain:
$$
\implies -g^{3}-2 g^{2} \lambda-g \lambda^{2}-g -\lambda=0
$$
Which is not the same quadratic equation as above. Why is that so?
 A: Short answer: The equation you get setting $a=0$ is not the original quadratic but contains the original quadratic. If you take
$$-g^2-g\lambda-1=0$$
and multiply it by $(g+\lambda)$, you recover
$$-g^3-2g^2\lambda-g\lambda^2-g-\lambda=0.$$
Longer answer: It's easy to introduce spurious roots when manipulating rational equations to cast them into polynomial shape. To obtain a quadratic, you first multiply your equation
$$g=\frac{1}{-\lambda-g}$$
by a factor of $(-\lambda-g)$. However, in the cubic case, your equation is
$$g=\frac{p}{a-\lambda-g}+\frac{1-p}{-\lambda-g},$$ so you multiply the equation by $(-\lambda-g)$ and by $(a-\lambda-g)$ to obtain a cubic. Your intuition is right, if we set $a=0$ we ought to recover the roots of the quadratic. However, by setting $a=0$ you still recover a third degree polynomial because you have, in practice, multiplied the equation $$g=\frac{1}{-\lambda-g}$$ by $(-\lambda-g)$ and by $(0-\lambda-g)$, which is to say by $(-\lambda-g)$ twice. The additional multiplication introduces the $g=-\lambda$ root (check you get this one numerically); as soon as you spot this, you recover the desired quadratic.
I hope this helps.
