3

I want to solve the following quadratic Diophantine equation:

$$\frac{x(x-1)}{y(y-1)}=\frac{p}{q} \hspace{5 mm}, \hspace{5 mm}p\le q$$ For $p=1$ and $q=2$, it is easy to solve.

Let $y=x+z$. Then after some simplification we get

$x^2-(2z+1)x-(z^2-z)=0$

For integral solution, the discriminant of this equation must be a whole square. Hence

$8z^2+1=k^2$

Now it is a standard Pell's equation which can easily be solved. But for arbitrary $p$ and $q$, using similar approach I get

$(2pz+q-p)^2+4p(q-p)(z^2-z)=k^2$

I am stuck here. Can someone help me?

  • It is still a quadratic in $z$, and the earlier approach should work for any specific $p,q$. If you are looking for a general expression for the solutions in terms of $p,q$ I doubt you'll get it though. – Macavity Aug 30 '15 at 15:01
  • In earlier case I managed to get the standard Pell's equation of form $x^2-dy^2=1$. How can I approach for any $p$ and $q$. Yes, closed form is not possible in terms of $p$ and $q$, but there might be some other method. –  Aug 30 '15 at 15:09
  • You may want to take a look at http://math.stackexchange.com/questions/490617/quadratic-diophantine-to-pell-reduction/490714#490714 – Macavity Aug 30 '15 at 15:58
  • @guest123456: Actually, a closed-form is possible. – Tito Piezas III Aug 31 '15 at 04:45

2 Answers2

4

Here's a broad solution in integers. Given,

$$\frac{x(x-1)}{y(y-1)}=\frac{p}{q}\tag1$$

All you do is directly solve $(1)$ as a quadratic in $x$ and make its discriminant a square. After some manipulation, I find,

$$x = pv(u+qv)$$

$$y = qv(u+pv)$$

and $u,v$ solve,

$$u^2-pqv^2 = \color{red}-1\tag2$$

Or,

$$x = pv(u+qv)+1$$

$$y = qv(u+pv)+1$$

and $u,v$ solve,

$$u^2-pqv^2 = 1\tag3$$

  • It seems that you missed $+1$ at the end of both the expression of $x$ and $y$. –  Aug 31 '15 at 13:14
  • 1
    @guest123456: Oh, you're right. The first solution is for the negative Pell equation. I've edited, and also got rid of the unnecessary factor of 2. Thanks. :) – Tito Piezas III Aug 31 '15 at 13:36
  • 1
    Your method does not give the complete set of solutions. For example if $p=1$ and $q=2$, then your method gives $x=15$ and $y=21$, which is correct but not the smallest solution. Smallest solution is $x=3$ and $y=4$. –  Aug 31 '15 at 13:50
  • @guest123456: Yes, I know. That's why I carefully started with "Here's a broad..." Nowhere in your post did you ask for the complete solution. :) – Tito Piezas III Aug 31 '15 at 13:58
  • 1
    @guest123456: Using the negative Pell, it does give the smallest solution. Let $p,q=1,2$, and $u^2-2v^2 =-1$, so $u,v = 1,1$, and the formula yields $x,y = 3,4$. – Tito Piezas III Aug 31 '15 at 14:12
  • Sorry to bother you again. If I find the fundamental solution, then is it possible to find some linear recurrence to find other solutions? An 1-to-1 relation between the Pell's equation and original equation does not exist. So even if I find all the solutions of Pell's equation I don't get all the solutions of original equation. –  Aug 31 '15 at 15:47
  • WillJagy would be able to answer that better. Paging @WillJagy. – Tito Piezas III Aug 31 '15 at 15:53
  • It works perfectly with p,q = 1,2. But I don't get it when I try with p,q = 3,8. Ignoring u,v = 1,0, the next two smallest solutions I could find are u,v = 5,1 then x,y = 40, 65, and u,v = 49,10 then x,y = 3871,6321. Still x,y = 10,16 and x,y = 931,1520 also satisfy the condition. – Nin Jun 02 '20 at 14:06
0

I stopped at,

$$(2pz+q-p)^2+4p(q-p)(z^2-z)=k^2\tag1$$

After further simplification,

$$4pqz^2+(q-p)^2=k^2\tag2$$

then,

$$\big(\frac{k}{q-p}\big)^2-\frac{4pq}{(q-p)^2}z^2=1\tag3$$

which is the standard Pell's equation. Now it can easily be solved.