7.3.1. (12 points) Find the sum of all real roots of the equation

$$
\sin \left(\pi\left(x^{2}-x+1\right)\right)=\sin (\pi(x-1))
$$

belonging to the interval $[0 ; 2]$.
Answer: 4.73.

Solution. The equation is equivalent to the system

$$
\left[\begin{array}{l}
\pi\left(x^{2}-x+1\right)=\pi(x-1)+2 \pi k \\
\pi\left(x^{2}-x+1\right)=\pi-(x-1) \pi+2 \pi n
\end{array}(k, n \in \mathbb{Z})\right.
$$

By transforming the system, we get that

$$
\left[\begin{array} { l } 
{ x ^ { 2 } - x + 1 = ( x - 1 ) + 2 k , } \\
{ x ^ { 2 } - x + 1 = 1 - ( x - 1 ) + 2 n , }
\end{array} \Longleftrightarrow \left[\begin{array} { l } 
{ ( x - 1 ) ^ { 2 } = 2 k - 1 } \\
{ x ^ { 2 } = 2 n + 1 }
\end{array} \Longleftrightarrow \left[\begin{array}{l}
x=1 \pm \sqrt{2 k-1} \\
x= \pm \sqrt{2 n+1}
\end{array}\right.\right.\right.
$$

If $0 \leq 1 \pm \sqrt{2 k-1} \leq 2$, then $-1 \leq \pm \sqrt{2 k-1} \leq 1 \Leftrightarrow 0 \leq 2 k-1 \leq 1 \Leftrightarrow k=1$, then $x=0$ or $x=2$. If $0 \leq \sqrt{2 n+1} \leq 2$, then $0 \leq 2 n+1 \leq 4 \Leftrightarrow n=0$ or $n=1$; then $x=1$ or $x=\sqrt{3}$. Answer: $0+1+2+\sqrt{3}$.