7. (1994 Bulgarian Mathematical Olympiad) Find all integer solutions to the following equation: $\cos \left(\frac{\pi}{8}\left(3 x-\sqrt{9 x^{2}+160 x+800}\right)\right)=1$.


7. Let $x$ be an integer solution of the original equation, then there must exist an integer $n$ such that
$$
\frac{\pi}{8}\left(3 x-\sqrt{9 x^{2}+160 x+800}\right)=2 n \pi,
$$

which means
$$
\begin{array}{l}
9 x^{2}+160 x+800=(3 x-16 n)^{2}, \\
x(3 n+5)=8 n^{2}-25,
\end{array}
$$

But $8 n^{2}-25=\frac{8}{9}(3 n+5)(3 n-5)-\frac{25}{9}$,
so $x(3 n+5)=\frac{8}{9}(3 n+5)(3 n-5)-\frac{25}{9}$,
$$
\begin{array}{l}
8(3 n+5)(3 n-5)-9 x(3 n+5)=25, \\
(3 n+5)(24 n-40-9 x)=25 . \\
3 n+5 \in\{ \pm 1, \pm 5, \pm 25\} .
\end{array}
$$

Noting that $n$ is an integer, we get
$$
n \in\{-2,0,-10\} \text {. }
$$

Substituting $n=-2$ into (1) yields $\quad x=-7$;
Substituting $n=0$ into (1) yields $\quad x=-5$;
Substituting $n=-10$ into (1) yields $\quad x=-31$.
Upon verification, $x=-5$ is an extraneous root. Therefore, the integer solutions of the original equation are $x=-7$ or $x=-31$.