Quadratic Diophantine Equation$(x^2+x)(y^2-1)=240$ For whole numbers $x$ and $y$,  $$x,y | (x^2+x)(y^2-1)= 240$$
Find the biggest and smallest value for $x-y$.
How do you proceed with such a question?
Are their formulas or something for that type of equation?
I'd appreciate any help.
 A: Notice that $y^2-1$ is adivisor of $240$; 
also we know that $-1 \leq y^2-1$, 
by checking throuh all divisors of $240$, 
we get the folowing possibilities for $y^2-1$:  


*

*$y^2-1=-1$ but there is no pair in this case. 

*$y^2-1=0$ but there is no pair in this case. 

*$y^2-1=3$ and $x^2+x=80$; 
but notice that there is no solution to the equation $x^2+x=80$; so there is no pair $(x,y)$ for the main equation, in this case. 

*$y^2-1=8$ and $x^2+x=30$; 
which gives $(x,y)=(5,\pm3)$ and $(x,y)=(-6,\pm3)$. 

*$y^2-1=15$ and $x^2+x=16$; 
but notice that there is no solution to the equation $x^2+x=16$; so there is no pair $(x,y)$ for the main equation, in this case. 

*$y^2-1=24$ and $x^2+x=10$; 
but notice that there is no solution to the equation $x^2+x=10$; so there is no pair $(x,y)$ for the main equation, in this case. 

*$y^2-1=48$; and $x^2+x=5$; 
but notice that there is no solution to the equation $x^2+x=5$; so there is no pair $(x,y)$ for the main equation, in this case. 

*$y^2-1=80$; and $x^2+x=3$; 
but notice that there is no solution to the equation $x^2+x=3$; so there is no pair $(x,y)$ for the main equation, in this case. 

*$y^2-1=120$ and $x^2+x=2$; 
which gives $(x,y)=(1,\pm11)$ and $(x,y)=(-2,\pm11)$.
A: Here is a table of whole numbers $x$ so that $x^2+x\mid240$:
$$
\begin{array}{c|c}
x&1&2&3&4&5&15\\\hline
x^2+x&\color{#090}{2}&6&12&20&\color{#090}{30}&240
\end{array}
$$
For $x$ to work, we need $\frac{240}{x^2+x}+1=y^2$:
$\frac{240}{2}+1=11^2$
$\frac{240}{6}+1=41$
$\frac{240}{12}+1=21$
$\frac{240}{20}+1=13$
$\frac{240}{30}+1=3^2$
$\frac{240}{240}+1=2$
The choices we have are $\{x=1,y=11\}$ and $\{x=5,y=3\}$. Thus, the smallest is $x-y=-10$ and the largest is $x-y=2$.
A: $(x^2+x)(y^2-1)=240$ implies that 
$y = \sqrt{1 + \dfrac{240}{x(x+1)}}$
Clearly both $x$ and $x+1$ need to be divisors of $240$.
These are the divisors of $240$
\begin{align}
   1 &\quad 240 \\
   2 &\quad 120 \\
   3 &\quad 80 \\
   4 &\quad 60 \\
   5 &\quad 48 \\
   6 &\quad 40 \\
   8 &\quad 30 \\
   10 &\quad 24 \\
   12 &\quad 20 \\
   15 &\quad 16
\end{align}
For $x = 1,2,3,4,5,15$ we get 
$y = 11, \sqrt{41}, \sqrt{21}, \sqrt{13}, 3, \sqrt 2$
So the minimum value of $x-y$ is $1-11 = -10$
and the maximum value of $x-y$ is $5-3 = 2$
