4. Find all values of the parameter $a$ for which the equation $|2+| x|-a|-|a-| x+1|-| x-1||=2+|x|+|x+1|+|x-1|-2 a$ has exactly two integer solutions.

Specify these solutions for each of the found $a$.

(16 points)
Solution:

Let $\quad u=2+|x|-a$, $v=a-|x+1|-|x-1| . \quad$ Then the original equation will have the form $|u|-|v|=u-v$. The solutions to the latter equation are all $u$ and $v$ such that $u \geq 0, v \geq 0$, or $u=v$, $\left[\begin{array}{c}\left\{\begin{array}{c}2+|x|-a \geq 0, \\ a-|x+1|-|x-1| \geq 0,\end{array}\right. \\ 2+|x|-a=a-|x+1|-|x-1|,\end{array}\right.$
$\left[\begin{array}{c}a \leq 2+|x|, \\ a \geq|x+1|+|x-1|,\end{array}\right.$
$a=1+(|x+1|+|x-1|+|x|) / 2$. In the Ocha system, we will construct the graphs of the functions $a=2+|x|$, $a=|x+1|+|x-1|$ $a=1+(|x+1|+|x-1|+|x|) / 2$.

![](https://cdn.mathpix.com/cropped/2024_05_06_98d1c66abeb3b26d6d6dg-11.jpg?height=1199&width=1219&top_left_y=680&top_left_x=727)

All functions are even. If $x \geq 0, a=2+|x|=2+x$. If $x \in[0 ; 1], a=|x+1|+|x-1|=2$, if $x \geq 1, a=|x+1|+|x-1|=2 x . \quad$ If $\quad x \in[0 ; 1], a=1+(|x+1|+|x-1|+|x|) / 2=2+x / 2, \quad$ if $x \geq 1, a=1+(|x+1|+|x-1|+|x|) / 2=1+3 x / 2$.

For $a \in(2 ; 3]$ we have two solutions $x=-1, \quad x=1$.

For $a=1+3 n / 2, n \in \square, n \geq 2$, we have two solutions $x=-n, \quad x=n$.

Answer: $a \in(2 ; 3] x_{1}=-1, \quad x_{2}=1 ; a=1+3 n / 2, n \in \square, n \geq 2, x_{1}=-n, \quad x_{2}=n$.