Integer solutions of $xy+9(x+y)=2006$ [Completing a product / rectangle]

How many integer solutions does $xy+9(x+y)=2006$ have? Here $x$ and $y$ are both integers.

My trying: I have tried to solve this problem. But I have no idea to solve this. Please help


Solution 1:

Add $81$ to both sides to give $$xy + 9x + 9y + 81 = (x+9)(y+9) = 2087,$$ and then consider the divisors of the RHS.

Solution 2:

Key Idea $\ $ Completing a square $ $ generalizes to $ $ completing a product (rectangle)

$$\begin{eqnarray} x^2\:\! &+&\ \ \,2bx &=& (x + b)^2 - b^2\\ \iff\ x\color{#c00}x &+& bx\!+\!b\color{#c00}x &=\,& (x+b)(\color{#c00}x+b)-b^2\\ \iff \ x\color{#c00}y &+& bx\!+\!b\color{#c00}y\ &=& (x+b)(\color{#c00}y+b)-b^2\\ {\rm generally}\quad {xy}&+&bx\!+\!cy &=& \color{#0a0}{(x+c)(y+b) - bc} \end{eqnarray}\quad\ \ \,$$

Remark $\ $ The AC-method extends it to non-monics (lead coef $\,a\neq 1)$ as follows

$$\begin{eqnarray} && \ \ \ a\ x\ y &+& b\ x&+&c\ y &=&\ \ d\\ \smash{ \overset{\large \times\ a}\iff} && \ \ ax\,ay &+& b\,ax &+& c\,ay &=& ad\\ \iff && \ \ \ {X\ Y} &+& {b\,X} &+& {c\,Y} &=& ad,\quad X = ax,\ \ Y = ay\\ \iff && \ \color{#0a0}{(X\!+\!c)}&&\!\!\!\!\! \color{#0a0}{(Y\!+\!b)}&\color{#0a0}-&\, \color{#0a0}{bc} &=\,& ad,\quad {\rm by\ \ \color{#0a0}{monic\ \ case}\ \ above}\\ \iff && (ax\!+\!c)\!\!&&\!\!\!\!\!\!(ay\!+\!b)\!\! && &=& ad\!+\!bc \end{eqnarray}$$

Summarizing, if $\,a\,$ is cancellable (e.g. $\,a\neq 0\,$ in $\Bbb Z)\,$ then

$$\bbox[1px,border:3px solid #c60]{\bbox[8px,border:1px solid #c00]{\begin{align} axy + bx + cy &\,=\, d\\[.2em] \!\!\!\iff (ax+c)(ay+b) &\,=\, ad+bc\end{align}}}\qquad\qquad\qquad$$

This is one case of Lagrange's solution of the general quadratic binary Diophantine equation.

Note $ $ The special monic case $(a = 1)$ is sometimes called Simon's Favorite Factoring Trick in some problem solving / contest communities.