9. Specify all values of $a$ for which the equation $(x-a)^{2}=\frac{x}{|x|}+a+1$ has at least one solution, and solve it for each $a$.

#
# Solution:

I. For $x>0 \quad x^{2}-2 a x+a^{2}-a-2=0 \quad(*)$. Equation (*) has two distinct positive roots $x_{1,2}=a \pm \sqrt{a+2}$, if: $\left\{\begin{array}{c}D / 4=a+2>0, \\ a>0, \\ a^{2}-a-2>0\end{array} \Leftrightarrow\left\{\begin{array}{c}a>-2, \\ a>0, \\ {\left[\begin{array}{c}a2\end{array}\right.}\end{array} \Leftrightarrow a>2\right.\right.$. Equation (*)

![](https://cdn.mathpix.com/cropped/2024_05_06_331dee27c7cee369cafag-13.jpg?height=465&width=1788&top_left_y=2206&top_left_x=177)

II. For $x0, \\ a0 .\end{array}\right.$ has no solutions.

Equation (**) has one negative root $x=a-\sqrt{a}$, if

![](https://cdn.mathpix.com/cropped/2024_05_06_331dee27c7cee369cafag-14.jpg?height=474&width=1553&top_left_y=580&top_left_x=303)

Answer: for $a \in(-1 ; 0] \cup[1 ; 2] x=a+\sqrt{a+2}$; for $(0 ; 1) x_{1}=a+\sqrt{a+2}, x_{2}=a-\sqrt{a}$; for $a \in(2 ;+\infty) x_{1,2}=a \pm \sqrt{a+2}$.