Task 3. (15 points) Solve the equation $3 x-x^{2}+\sqrt{\left(9-x^{2}\right)\left(6 x-x^{2}\right)}=0$.
Solution.

Rewrite the equation as $\sqrt{\left(9-x^{2}\right)\left(6 x-x^{2}\right)}=x^{2}-3 x$,

$$
\sqrt{(x-3)(x+3) x(x-6)}=x^{2}-3 x
$$

Rearrange the factors $x(x-3)$ and $(x+3)(x-6)$, we get

$$
\begin{gathered}
\sqrt{x(x-3)\left(x^{2}-3 x-18\right)}=x(x-3) \\
\left\{\begin{array}{c}
x(x-3) \geq 0 \\
x(x-3)\left(x^{2}-3 x-18\right)=x^{2}(x-3)^{2}
\end{array}\right. \\
x(x-3)\left(x^{2}-3 x-18\right)-x^{2}(x-3)^{2}=0 \\
18 x(x-3)=0 \\
x_{1}=0, x_{2}=3
\end{gathered}
$$

Answer. $\{0 ; 3\}$.