4. Find the probability that a number randomly taken from the interval $[0 ; 5]$ is a solution to the equation $\sin (x+|x-\pi|)+2 \sin ^{2}(x-|x|)=0$.

#
# Solution.

Case 1. $x \in[0 ; \pi]$. The equation takes the form: $\sin (x+\pi-x)+2 \sin ^{2}(x-x)=0$, i.e., any $x \in[0 ; \pi]$ is a solution to the equation, therefore, $P(A)=\frac{\pi}{5}$.

Case $2, x \in(\pi ; 5]$. The equation takes the form: $\sin (x+x+\pi)+2 \sin ^{2}(x-x)=0$ or $\sin 2 x=0$. Then $x=\frac{3 \pi}{2}$ and ,therefore, $P(A)=0$.

Answer: $P(A)=\frac{\pi}{5}$.