9. Determine all values of $a$ for which the equation $4 x^{2}-16|x|+(2 a+|x|-x)^{2}=16$ has exactly two distinct roots. Specify these roots for each of the found values of $a$.
# Solution:

I. $x \leq 0, x^{2}+4 x+(a-x)^{2}=4 ; 2 x^{2}-2(a-2) x+a^{2}-4=0$;

$D / 4=a^{2}-4 a+4-2 a^{2}+8=12-4 a-a^{2}$.

The equation has two distinct non-positive roots $x_{1,2}=\left(a-2 \pm \sqrt{12-4 a-a^{2}}\right) / 2$,

if $\left\{\begin{array}{c}12-4 a-a^{2}>0, \\ a-2 \leq 0\end{array} \Leftrightarrow\left\{\begin{array}{c}a \in(-6 ; 2), \\ a \leq 2\end{array} \Leftrightarrow a \in(-6 ; 2)\right.\right.$

II. $x>0, x^{2}-4 x+a^{2}-4=0 ; D / 4=8-a^{2}$.

The equation has two distinct positive roots $x_{1,2}=2 \pm \sqrt{8-a^{2}}$, if $\left\{\begin{array}{c}8-a^{2}>0, \\ a^{2}-4>0, \\ 2>0\end{array} \Leftrightarrow\left[\begin{array}{c}-\sqrt{8}<a<\sqrt{8}, \\ a<-2 \text{ or } a>2\end{array}\right.\right.\right.$

![](https://cdn.mathpix.com/cropped/2024_05_06_18575ac96ab43cb21cd9g-17.jpg?height=243&width=1193&top_left_y=210&top_left_x=360)

Answer: $a \in(-6 ;-\sqrt{8}), x_{1,2}=\left(a-2 \pm \sqrt{12-4 a-a^{2}}\right) / 2$;

$$
\begin{aligned}
& a \in(-2 ; 2], x_{1}=\left(a-2-\sqrt{12-4 a-a^{2}}\right) / 2, x_{2}=2+\sqrt{8-a^{2}} \\
& a \in(2 ; \sqrt{8}), x_{1,2}=2 \pm \sqrt{8-a^{2}}
\end{aligned}
$$