Question:-
Find the range of real number $\alpha$ for which the equation $z+ \alpha \left| z-1\right| + 2i = 0$; $z=x+iy$ has a solution. Also find the solution.
Attempt at a solution:-
On substituting $z=x+iy$ in the equation $z+ \alpha \left| z-1\right| + 2i = 0$, we get that the imaginary part of the complex variable $z$ should be $-2$, i.e $y=-2$. So, the complex variable is of the form $z=x-2i$.
As, the real part of the equation is also $0$, so we get the following equation for the real part
$$\begin{equation}x=-\alpha\sqrt{x^2-2x+5} \end{equation} \tag{1}$$
After squaring both sides of the equation, we arrive at the following quadratic equation.
$$\begin{equation} (\alpha^2-1)x^2-2\alpha^2x+5\alpha^2=0 \end{equation} \tag{2}$$
Now, as $x$ has to be real so $D \ge 0 \implies 5-4\alpha^2 \ge 0 \implies -\dfrac{\sqrt{5}}{2}\le \alpha \le \dfrac{\sqrt{5}}{2}$
Now, let's consider different cases.
Case 1:-
When $\alpha^2=1$, then from $(2)$, we get $x=\dfrac{5}{2}$. Now, after plugging $x=\dfrac{5}{2}$ in $(1)$, we get $\dfrac{5}{2}=-\alpha\left(\dfrac{5}{2}\right)$, so from this we conclude that when $x=\dfrac{5}{2}$, then, $\alpha=-1$
The place where I am getting stuck:-
I am not able to think up of the different solutions of $x$, when $\alpha^2 \neq 1$. If anyone can help me think of how to go about solving for the remaining cases.
From $(1)$, $\alpha=0$ works. If $\alpha\not=0$, then $$\sqrt{(x-1)^2+4}=\frac{x}{-\alpha}\gt 0\tag3$$
From $(2)$, for $-\frac{\sqrt 5}{2}\le \alpha\le\frac{\sqrt 5}{2}$ with $\alpha^2\not=1$, $$x=\frac{\alpha^2\pm \alpha\sqrt{5-4\alpha^2}}{\alpha^2-1}$$
Case 1 : For $\alpha=0$, $x=0$.
Case 2 : For $\alpha^2=1$, you've already done. ($\alpha=-1,x=5/2$)
Case 3 : For $-\frac{\sqrt 5}{2}\le \alpha\lt -1$, from $(3)$, $x\gt 0$, so $x=\frac{\alpha^2\color{red}{\pm} \alpha\sqrt{5-4\alpha^2}}{\alpha^2-1}$.
Case 4 : For $-1\lt \alpha\lt 0$, from $(3)$, $x\gt 0$, so $x=\frac{\alpha^2\color{red}{+} \alpha\sqrt{5-4\alpha^2}}{\alpha^2-1}$.
Case 5 : For $0\lt \alpha\lt 1$, from $(3)$, $x\lt 0$, so $x=\frac{\alpha^2\color{red}{+} \alpha\sqrt{5-4\alpha^2}}{\alpha^2-1}$.
Case 6 : For $1\lt \alpha\le\frac{\sqrt 5}{2}$, from $(3)$, $x\lt 0$, so there is no solution.
Therefore, the range of real number $\alpha$ for which the equation $z+ \alpha \left| z-1\right| + 2i = 0$; $z=x+iy$ has a solution is $\color{red}{-\frac{\sqrt 5}{2}\le\alpha\lt 1}$.
And the solution is $$\color{red}{x=\frac{\alpha^2\pm \alpha\sqrt{5-4\alpha^2}}{\alpha^2-1}\qquad\text{for $\ -\frac{\sqrt 5}{2}\le\alpha\lt -1$}}$$
$$\color{red}{x=\frac 52\qquad\text{for $\ \alpha=-1$}}$$ $$\color{red}{x=\frac{\alpha^2+ \alpha\sqrt{5-4\alpha^2}}{\alpha^2-1}\qquad\text{for $\ -1\lt\alpha\lt 1$}}$$