I am looking for information about the following diophantine equation :

$N = \displaystyle\frac{x^2+y}{x+y^2}$

Has it been studied ? Is there any efficient algorithm to solve it?
Any links?

I have tried to solve it by myself this week-end, but haven't made any progress ...

Thanks in advance

My first post. Sorry for being unclear.
Does this equation have solutions in integers x,y for all integer N > 0 ?

  • $\begingroup$ What does it mean to have an efficient algorithm to solve a Diophantine equation? $\endgroup$ – Qiaochu Yuan May 22 '11 at 11:29
  • $\begingroup$ What are the methods in your course? Do you expect to find a general solution? Have you tried to simplify the expression and complete the squares? $\endgroup$ – Phira May 22 '11 at 11:32
  • $\begingroup$ Is $N$ a fixed number or an unknown in your equation ? Because taking $N = 1$ and $x = y$ for example gives you a bunch of (trivial) solutions. $\endgroup$ – Joel Cohen May 22 '11 at 11:47
  • $\begingroup$ It looks like a problem that cries for "vieta-jumping"... $\endgroup$ – Myself May 22 '11 at 11:58
  • 1
    $\begingroup$ Recently posted related post: When is $\frac{a^2+b}{b^2+a}$ an integer? $\endgroup$ – Martin Sleziak Nov 30 '17 at 6:09

Follow user9325's suggestion about completing the squares, and then (look up and) apply the theory of Pell equations.

Edit: OK, I guess you didn't get anything out of user9325's suggestion, so I'll take it up for you.

$N=(x^2+y)/(x+y^2)$, $Ny^2-y=x^2-Nx$, $U^2-NV^2=1-N^3$ where $U=2Ny-1$, $V=2x-N$. This has the solution $U=-1$, $V=\pm N$. The solution $U=-1$, $V=N$ corresponds to $x=N$, $y=0$, which already shows that there's a solution for each $N$, but maybe that's too trivial. Then take any solution to $a^2-Nb^2=1$ and you get another solution, $U=-a\pm bN^2$, $V=-b\pm aN$. Now $a^2-Nb^2=1$ has lots of solutions - that's the Pellian I alluded to. For $y$ to be an integer, you need $a\equiv 1\pmod N$, so you have to study enough of the theory to see if that can be made to happen.

If $N$ is a square, say, $N=m^2$, then the Pellian doesn't apply, but you have something simpler; $(U+mV)(U-mV)=1-m^6$. Now you'll get at most finitely many solutions, since there are only finitely many ways to factor $1-m^6$. Here's one example; take $N=4=2^2$ so $m=2$ and $1-m^6=-63$; take $U+2V=63$, $U-2V=-1$ to get $U=31$, $V=16$; then $x=10$, $y=4$.

  • $\begingroup$ Hi Gerry, That's perfect. Thank you very much for this very clear explanation. $\endgroup$ – PhilippeC May 23 '11 at 16:06
  • $\begingroup$ @Gerry Myerson: This question was asked recently. I came up with three parametric solutions for N, x, and y which did not use the Pell equation here: math.stackexchange.com/questions/2543688/… $\endgroup$ – marty cohen Nov 30 '17 at 20:17
  • 1
    $\begingroup$ @Gerry Myerson: The trick is to prove that the solution exists for square $N$. Your method guaranteees that there is some solution for $U,V$ but it’s not obvious that it translates to integer $x$ and $y$. For non square $N$ I have the whole proof here: math.stackexchange.com/questions/2802933/… $\endgroup$ – Oldboy Jun 16 '18 at 5:20

Thanks for @Gerry Myerson's solution.

As far as I'm concernd, the solution could be stated as follows.


The equation could be rewritten as $$u^2-nv^2=1-n^3 \tag1$$where $u=2nb-1,v=2a-n$.

$\textbf{Case 1:}$ $n$ is not a square number.

Take $x,y$ such that $$x^2-ny^2=1.\tag2$$. This is always possible, because $x^2-ny^2=1$ is a Pell equation. Then, \begin{align*}(x+ yn^2)^2-n(y+xn)^2&=x^2+2xyn^2+y^2n^4-ny^2-2xyn^2-x^2n^3\\&=(x^2-ny^2)+n^3(ny^2-x^2)\\&=1-n^3.\end{align*}This shows that $u=x+yn^2$ and $v=y+xn$ is a solution for $(1)$. That's to say, all $a,b$ such that $2nb-1=x+yn^2$ and $2a-n=y+xn$ could satisfy $(1)$. Hence,$$a=\frac{(x+1)n+y}{2},b=\frac{x+yn^2+1}{2n}.\tag3$$ But, the problem comes out here. We need that $a,b \in \mathbb{N+}$, but the $a,b$ obtained from $(3)$ are not always like thus for all $x,y$.

So, how to show that we can find $x,y$ such that $(2)$ hold and $a,b \in \mathbb{N+}$?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.