# Integer solutions of $xy+9(x+y)=2006$

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

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

• This answer is too awesome . – Way to infinity Jan 25 '14 at 16:42
• This is popularly called Simon's Favorite Factoring Trick. – Ayesha Jan 25 '14 at 17:05
• Seems like this can be generalized. Assuming $a\neq 0$, from $$axy+bx+cy=d$$ we can always change it to $$(ax+c)(ay+b)=ad+bc$$ (not the form presented in APoS.) – Yong Hao Ng Jan 25 '14 at 17:58
• @BillDubuque Thanks, nice to know some algebraic connections. :) – Yong Hao Ng Jan 25 '14 at 19:23
• YongHaoNg Yes, one easily reduces it to the monic case by using the AC method (see my remark there that it also works in the multivariate case). I've explained this in a Remark in my answer. – Bill Dubuque Jan 25 '14 at 19:23

Key Idea $$\,\$$ Completing a square generalizes to completing a product

$$\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 $$\$$ This extends to the non-monic case by using the AC-method

$$\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}$$