10.4. Given the function $f(x)=\sqrt{x^{2}-x}$. Find the domain of the function $y=f(f(x))$.
Answer. $\quad\left(-\infty, \frac{1-\sqrt{5}}{2}\right] \cup\{0\} \cup\{1\} \cup\left[\frac{1+\sqrt{5}}{2},+\infty\right)$.

Solution. We have $y=\sqrt{u^{2}-u}$, where $u=\sqrt{x^{2}-x}$. To find the domain, we need to solve the inequality $u^{2}-u \geq 0 \Leftrightarrow u \leq 0$ or $u \geq 1$.

In the first case, we have $\sqrt{x^{2}-x} \leq 0 \Leftrightarrow x^{2}-x=0 \Leftrightarrow x=0$ or $x=1$.

In the second case, $\sqrt{x^{2}-x} \geq 1 \Leftrightarrow x^{2}-x \geq 1 \Leftrightarrow\left(x-x_{1}\right)\left(x-x_{2}\right) \geq 0$, where $x_{1,2}=\frac{1 \pm \sqrt{5}}{2}$ are the roots of the equation $x^{2}-x-1=0$. We get $x \geq \frac{1+\sqrt{5}}{2}$ or $x \leq \frac{1-\sqrt{5}}{2}$.