Consider the equation:
$$x^2 - |x| = mx(x + 1)$$
with $m \in \mathbb{R}$. I have to find the solutions of this equation depending on $m$.
This is what I tried:
$$x^2 - |x| = mx(x + 1)$$
$$x^2 - |x| -mx^2 -mx = 0$$
$$mx^2 + mx -x^2 + |x| = 0$$
Case $1$: $x < 0 \Rightarrow |x| = -x$,
$$mx^2 + mx -x^2 -x = 0$$
$$(m - 1)x^2 + (m - 1 )x = 0$$
$$(m - 1)(x^2 + x) = 0$$
So we have either:
$$m - 1= 0 \Rightarrow m = 1$$
Or:
$$x^2 + x = 0$$
We get:
$$x_1 = 1 \hspace{2cm} x_2 = - 1$$
But since we're working with the case when $x < 0$ we only get one solution:
$$x = -1$$
Case $2$: $x \ge 0 \Rightarrow |x| = x$,
$$mx^2 + mx -x ^2 + x = 0$$
$$x^2(m - 1) + (m + 1)x = 0$$
$$x[x(m - 1) + m + 1] = 0$$
We have either:
$$x = 0$$
Or:
$$x(m - 1) + m + 1 = 0$$
$$x = - \dfrac{m + 1}{m - 1}$$
So I concluded that:
For $m = 1$ the solutions are:
$$x \in (-\infty, 0]$$
And for $m \ne 1$ the solutions are:
$$x_1 = 0 \hspace{2cm} x_2 = -1 \hspace{2cm} x_3 = - \dfrac{m + 1}{m - 1}$$
Is this correct? Should I have solved this differently? More efficiently? What could be improved/corrected to my solution?
For Case 1, your result is correct but you need to change $x_1=1$ to $x_1=0$. Also you need to state the other solution that you found i.e. if $m=1$ then all $x<0$ are solutions.
For Case 2 when $x\ne 0$, $x = - \dfrac{m + 1}{m - 1}$ requires $(1+m)(1-m)$ to be positive i.e $|m|<1$. So the solutions you have obtained should be stated as $$x=-1,x=0, x=- \dfrac{m + 1}{m - 1} \text { if } |m|<1.$$
Your method of solution was fine so perhaps the main thing is to check your final answer with the original equation (e.g checking what happens if $m=1$) and being careful to state your results more precisely.