7. Find the real solutions of the equation $\frac{2 x+2}{x^{2}+2 x+2}+x^{4}-8 x^{2}+17=0$.
(58th Moldova Mathematical Olympiad)
Hint: The formula is
$$
\begin{array}{l}
0=\frac{2 x+2}{x^{2}+2 x+2}+x^{4}-8 x^{2}+17 \\
=\left(x^{2}-4\right)^{2}+\frac{(x+2)^{2}}{(x+1)^{2}+1},
\end{array}
$$

and $\left(x^{2}-4\right)^{2} \geqslant 0, \frac{(x+2)^{2}}{(x+1)^{2}+1} \geqslant 0$.
Then $x^2-4=0, \frac{(x+2)^{2}}{(x+1)^{2}+1}=0$.
Solving gives $x=-2$.