Solve the equation $\left(a x^{2}+b x+14\right)^{2}+\left(b x^{2}+a x+8\right)^{2}=0$ in the set of integers, where $a$ and $b$ are integers.
Solution. The sum of two squares can only be zero if each of them is zero. That is, in this case,

\[
\begin{array}{r}
a x^{2}+b x+14=0 \\
b x^{2}+a x+8=0
\end{array}
\]

is satisfied. Add the two equations:

\[
a x^{2}+b x+b x^{2}+a x+22=0
\]

Transform into a product:

\[
a x(x+1)+b x(x+1)=-22
\]

Factor out \(x(x+1)\):

\[
x(x+1)(a+b)=-22
\]

The prime factorization of 22 is \(1 \cdot 2 \cdot 11=22\). The product of these three numbers can only be negative if either all three factors are negative or one is negative and the other two are positive. Since \(x\) and \(x+1\) are consecutive integers, their signs are the same, so two cases are possible ( \(x\) cannot be -1, because then \(x+1=0\)): either \(x=1, x+1=2\) and \(a+b=-11\); or \(x=-2, x+1=-1\) and \(a+b=-11\). In the first case, substituting the value of \(x\) into (1), we get \(a+b=-14\), and \(a+b=-8\), which is a contradiction.

In the second case, \(x=-2\), substituting this into (1):

\[
\begin{aligned}
& 4 a-2 b=-14 \\
& 4 b-2 a=-8
\end{aligned}
\]

From the first equation, \(b=2 a+7\), substituting into the second equation \(8 a+28-2 a=-8\) and from this \(a=-6\), and \(b=-5\). \(x=-2\) is indeed a solution, which can be verified by substitution:

\[
\begin{aligned}
& -6 x^{2}-5 x+14=0, \text { and }-5 x^{2}-6 x+8=0 \\
& -24+10+14=0, \quad-20+12+8=0
\end{aligned}
\]