2. How many solutions does the equation $\left[2 x-x^{2}\right]+2\{\cos 2 \pi x\}=0$ have? Indicate the smallest and the largest of them. Here $[a]$ is the integer part of the number $a$ - the greatest integer not exceeding $a$, $\{a\}=a-[a]$ is the fractional part of the number $a$.
Solution. Rewrite the equation as $\left[2 x-x^{2}\right]=-2\{\cos 2 \pi x\}$. Since

$$
\{\cos 2 \pi x\} \in[0 ; 1) \rightarrow\left[2 x-x^{2}\right] \in(-2 ; 0] \rightarrow\left[2 x-x^{2}\right]=-1,\left[2 x-x^{2}\right]=0
$$

There are two possible cases:

Case 1. $\left\{\begin{array}{l}{\left[2 x-x^{2}\right]=-1} \\ \{\cos 2 \pi x\}=\frac{1}{2}\end{array} ; \quad\right.$ Case 2. $\left\{\begin{array}{l}{\left[2 x-x^{2}\right]=0} \\ \{\cos 2 \pi x\}=0\end{array}\right.$.

Case 1. $\left\{\begin{array}{l}{\left[2 x-x^{2}\right]=-1} \\ \{\cos 2 \pi x\}=\frac{1}{2}\end{array} \leftrightarrow\left\{\begin{array}{c}-1 \leq 2 x-x^{2}0\end{array}\right. \\ \cos 2 \pi x=\frac{1}{2}+n, n \in Z\end{array} \leftrightarrow\right.\right.\right.$

$$
\leftrightarrow\left\{\begin{array}{c}
x \in[1-\sqrt{2} ; 0) \cup(2 ; 1+\sqrt{2}] \\
\cos 2 \pi x= \pm \frac{1}{2} \leftrightarrow x= \pm \frac{1}{6}+\frac{k}{2}, k \in Z
\end{array}\right.
$$

The first series $x=\frac{1}{6}+\frac{k}{2}$ falls into the interval $[1-\sqrt{2} ; 0)$ when $k=-1 \rightarrow x_{1}=-\frac{1}{3}$ and into the interval $(2 ; 1+\sqrt{2}]$ when $k=4 \rightarrow x_{2}=\frac{13}{6}$. The second series $x=-\frac{1}{6}+\frac{k}{2}$ falls into the interval $[1-\sqrt{2} ; 0)$ when $k=0 \rightarrow x_{3}=-\frac{1}{6}$ and into the interval $(2 ; 1+\sqrt{2}]$ when $k=5 \rightarrow x_{4}=\frac{7}{3}$.

Case 2. $\left\{\begin{array}{l}{\left[2 x-x^{2}\right]=0} \\ \{\cos 2 \pi x\}=0\end{array} \leftrightarrow\left\{\begin{array}{l}0 \leq 2 x-x^{2}0 \\ x(x-2) \leq 0\end{array}\right. \\ \cos 2 \pi x=n, n \in Z\end{array} \leftrightarrow\right.\right.\right.$

$$
\left\{\begin{array}{c}
x \in[0 ; 2], x \neq 1 \\
{\left[\begin{array} { c } 
{ \operatorname { c o s } 2 \pi x = \pm 1 } \\
{ \operatorname { c o s } 2 \pi x = 0 }
\end{array} \leftrightarrow \left[\begin{array}{l}
x=\frac{k}{2}, k \in Z \\
x=\frac{1}{4}+\frac{k}{2}
\end{array}\right.\right.}
\end{array}\right.
$$

The first series belongs to $x \in[0 ; 2], x \neq 1$ when $k=0,1,3,4$ and the corresponding solutions are $x_{5}=0, x_{6}=\frac{1}{2}, x_{7}=\frac{3}{2}, x_{8}=2$. The second series belongs to $x \in[0 ; 2], x \neq 1$ when $k=0,1,2,3$ and the corresponding solutions are $x_{9}=\frac{1}{4}, x_{10}=\frac{3}{4}, x_{11}=\frac{5}{4}, x_{12}=\frac{7}{4}$.

Answer: There are a total of 12 solutions, $x_{\min }=-\frac{1}{3}, x_{\max }=\frac{7}{3}$.