3. (4 points) Solve the equation of the form $f(f(x))=x$, given that $f(x)=x^{2}+5 x+1$.

#
# Solution:

It is clear that some solutions to the equation $f(f(x))=x$ can be found by solving the simpler equation $f(x)=x$, which in this case is:

$$
x^{2}+5 x+1=x \Leftrightarrow x^{2}+4 x+1=0 \Leftrightarrow x=-2 \pm \sqrt{3} \text {. }
$$

Since the roots of the polynomial $f(x)-x=x^{2}+4 x+1$ are also roots of the polynomial $f(f(x))-x=x^{4}+10 x^{3}+32 x^{2}+34 x+7$, the first polynomial divides the second. The result of the division is $x^{2}+6 x+7$. Therefore, the original equation is equivalent to the system of equations:

$$
\left[\begin{array} { l } 
{ x ^ { 2 } + 4 x + 1 = 0 } \\
{ x ^ { 2 } + 6 x + 7 = 0 }
\end{array} \Leftrightarrow \left[\begin{array}{l}
-2 \pm \sqrt{3} \\
-3 \pm \sqrt{2}
\end{array} .\right.\right.
$$

Answer: $-2 \pm \sqrt{3},-3 \pm \sqrt{2}$.