<s>[INST] Positive integers $a$ and $b$ are such that $a+b=a/b + b/a$. Find $a^2+ b^2$. This is PRE RMO 2015 question. Positive integers $a$ and $b$ are such that $$a+b=a/b + b/a$$ Find $$a^2+ b^2$$
My try:-
Given that
$$a+b=a/b + b/a$$On simplification we get
$$a^2 b+ b^2 a= a^2 + b^2$$
But in my book the given answer is 2. Please tell me how it is possible.
 [/INST] This is not that elegant but provides any way of treating this question.
WLOG, we can assume a is larger than b by k (i.e. a = b + k; where k is an integer).
Positive integer $= a + b = \dfrac {a}{b} + \dfrac {b}{a} = \dfrac { b + k }{ b } + \dfrac { b }{ b + k } = 1 + \dfrac { k }{ b } + \dfrac { b }{ b + k }= 1 + \dfrac {bk + k^2 + b^2}{b(b + k)}$ 
Note that the last fraction must be reduced to an integer but the numerator cannot be further factorized and hence there is no way to cancel the factors in the denominator. The only way that cancelling can be done is when $k = 0$ and this leads to $a = b$.
Result follows after applying the finding to the given equality.
</s>