\(\frac{1}{x}+\frac{1}{y}=\frac{1}{2}\)
<=> \(\frac{y+x}{xy}=\frac{1}{2}\)
<=> \(2x+2y=xy\)
<=> \(2x-xy+2y=0\)
<=> \(x\left(2-y\right)+2y-4+4=0\)
<=> \(x\left(2-y\right)-2\left(2-y\right)=-4\)
<=>\(\left(x-2\right)\left(2-y\right)=-4\)
x;y duong nen ta co x-2 va 2-y la cac uoc cua -4
x-2 | 1 | -1 | 2 | -2 | 4 | -4 | ||||||
2-y | -4 | 4 | -2 | 2 | -1 | 1 | ||||||
x | ||||||||||||
y |
Từ \(\frac{1}{x}+\frac{1}{y}=\frac{1}{2}\Leftrightarrow\frac{2x+2y}{2xy}=\frac{xy}{2xy}\Rightarrow2x+2y=xy\)
\(\Rightarrow2y-xy=-2x\)
\(\Rightarrow y\left(2-x\right)=-2x\)
\(\Rightarrow y=-\frac{2x}{2-x}\)
\(\Rightarrow y=\frac{2x}{x-2}\)
\(\Rightarrow y=\frac{2x-4+4}{x-2}\)
\(\Rightarrow y=\frac{2\left(x-2\right)+4}{x-2}\)
\(\Rightarrow y=2+\frac{4}{x-2}\)
Vì y là số nguyên dương nên \(2+\frac{4}{x-2}\) dương
\(\Rightarrow\frac{4}{x-2}\) dương \(\Rightarrow x-2\in\text{Ư}\left(4\right)=\left\{1;2;4\right\}\)
\(x-2=1=>x=3\left(tm\right)\)
\(x-2=2=>x=0\left(lo\text{ại}\right)\)
\(x-2=4=>x=6\left(tm\right)\)
* Với \(x=3\Rightarrow y=2+\frac{4}{3-2}=2+4=6\left(tm\right)\)
*Với \(x=6=>y=2+\frac{4}{6-2}=2+1=3\left(tm\right)\)
Vậy các cặp số nguyên dương \(\left(x;y\right)\) cần tìm là \(\left(3;6\right);\left(6;3\right)\)