MathLabs

Problem 2

Find all positive integers a,ba,b such that a2+bb2−a\frac{a^2+b}{b^2-a} and b2+aa2−b\frac{b^2+a}{a^2-b} are both integers.
Step 4 of 7: Case a=b
a=b:a2+aa2−a=a+1a−1∈Z  ⟹  a−1∣2  ⟹  a=2,3.a=b:\quad\frac{a^2+a}{a^2-a}=\frac{a+1}{a-1}\in\mathbb Z\implies a-1\mid2\implies a=2,3.
Detailed analysis

For a=b, the first fraction is positive only for a>1 and equals 1 plus 2 divided by a-1. Hence a is 2 or 3.