Task B-1.2. Solve the equation in the set of real numbers:

$$
f(x)+f(2-x)=2
$$

where

$$
f(x)= \begin{cases}|x|, & x \leq 1 \\ 2-x, & x>1\end{cases}
$$
Solution.

$$
f(2-x)= \begin{cases}|2-x|, & \text { for } 2-x \leq 1, \text { i.e. } x \geq 1 \\ x, & \text { for } 2-x>1, \text { i.e. } x<1\end{cases}
$$

1. For $x>1$ the equation becomes

$$
\begin{array}{r}
2-x+|2-x|=2 \\
|2-x|=x
\end{array}
$$

Then we have

$$
2-x=x \quad \text { or } \quad 2-x=-x
$$

The solution $x=1$ does not satisfy (because $x>1$).

2. For $x<1$ the equation becomes

$$
|x|=2-x
$$

The solution $x=1$ does not satisfy (because $x<1$).

3. For $x=1$ the equation is

$$
|x|+|2-x|=2
$$

We conclude that $x=1$ is the only solution.