In $\mathbb{R}$, solve the following equation: $$ |x^{2} − p| = (p − 1)x$$ where $p$ is a parameter.
I have the solution as well to check:
If $\;p=\{-1\}\implies K=\{-1\}$
If $\;p\in(\infty;-1)\cup(-1;0]\implies K=\{-1;p\}$
If $\;p\in(0;1)\implies K=\{-1;-p\}$
If $\;p\in(1;\infty)\implies K=\{1;p\}$
If $\;p=\{1\}\implies K=\{\pm1\}\,$.
Thank you greatly in advance.