4

Write down the set of distinct solutions and prove your list is complete. $x$ and $y$ are positive integers.

I have rewritten it as $\frac{(x+y)}{xy} = \frac1p$, but I don't understand where to go from here?

pink floyd
  • 1,274
  • 8
    the equation is equivalent to $(x-p)(y-p)=p^2$ and you can look in this site you can find it for general $p$ – Elaqqad May 01 '15 at 17:16

3 Answers3

3

Hint: this type of diophantine equation is solvable by a generalization of completing the square. Namely, completing a square generalizes to completing a product as follows:

$$\begin{eqnarray} &&axy + bx + cy\, =\, d,\ \ a\ne 0\\ \overset{\times\,a}\iff\, &&\!\! (ax+c)(ay+b)\, =\, ad+bc\end{eqnarray}\qquad\qquad$$

Therefore we deduce: $\, xy - px - py = 0 \iff (\color{#0a0}{x-p})(y-p) = \color{#c00}{p^2}$

Therefore, by uniqueness of prime factorizations $\ \color{#0a0}{x-p}\,\in\:\! \pm \{\color{#c00}{1,p,p^2}\}\ $ so $\ x = \,\ldots$

Remark $ $ A handy tool when learning these topics is Dario Alpern's online bivariate diophantine equation solver, which can provide a step-by-step explanation of the methods used.

Bill Dubuque
  • 272,048
1

Expanding a bit on Elaqqad comment. $$\frac{x+y}{xy}=\frac{1}{p}\implies xy=p(x+y)\\xy-px-py=0\\x(y-p)-py=0\\x(y-p)-py+p^2=p^2\\(x-p)(y-p)=p^2$$ Now $p^2$ has only 3 divisors $1,p,p^2$ since $p$ is prime,then you either have that $x-p=p,y-p=p$ or $x-p=1,y-p=p^2$ or $x-p=p^2,y-p=1$ or equivalently $(x,y)=(2p,2p)\lor (p+1,p^2+p)\lor(p^2+p,p+1)$.

kingW3
  • 13,496
  • I completely get your working, but obviously it is based on seeing that the gcd of that thing is x+y and unfortunately I can't see that immediately :( –  May 01 '15 at 17:42
  • What's the purpose of introducing $k$? You directly get $xy=p(x+y)$ from the stated equation. – egreg May 01 '15 at 17:54
  • @egreg Thanks,you're right,I guess it's just my common practice.Edited the answer to remove the $k$ – kingW3 May 01 '15 at 18:10
  • Okay completely understand now! However I am supposed to be able to get actual numerical values, then prove that my list is complete. Does that proof come from the fact we've stated that only 3 cases can come from the equation? (x-p,y-p)=(1, p^2) , (x-p,y-p)=(p^2,1) and (x-p,y-p)=(p,p). From those 3 solutions I get the equations 1) y=x(x-1), 2) x=y(y-1) and 3) x=y=2p. I don't know how I'm supposed to get values from those? –  May 03 '15 at 05:37
0

You have: $p(x+y) = xy \Rightarrow p \mid xy \Rightarrow p \mid x$ or $p \mid y$ since $p$ is a prime. If $p \mid x \Rightarrow x = kp$, and substitute this into the equation: $p(kp+y) = kpy \Rightarrow kp+y=ky \Rightarrow kp = (k-1)y \Rightarrow p \mid (k-1)y \Rightarrow p \mid (k-1)$ or $p \mid y$. Now if $p \mid y \Rightarrow y = np \Rightarrow kp = np(k-1) \Rightarrow k = n(k-1)$. If $n = 1 \Rightarrow k = k-1$, contradiction. Thus $n \geq 2$, and if $n = 2 \Rightarrow k = 2(k-1) \Rightarrow k = 2$. Thus $(x,y) = (2p,2p)$ is a solution. If $n > 2$ it is easy to see the equation has no natural solutions. If $p \mid (k-1) \Rightarrow k - 1 = mp \Rightarrow k = 1 + mp \Rightarrow (1+mp)p = mpy \Rightarrow 1+mp = my \Rightarrow 1 = m(y-p) \Rightarrow 1 = m = y-p \Rightarrow y = k = p+1 \Rightarrow x = kp = p(p+1) \Rightarrow (x,y) = (p^2+p, p+1)$ is another solution.And since the equation is symmetric in $y$ as well, you would obtain the same solution if $p\mid y$, and conclude that those two solutions are the ones for the equation above.

DeepSea
  • 77,651