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.
 A: You know that $a^2b+b^2a=a^2+b^2$. However, you haven't used that $a,b$ are positive integers. Rewrite the expression as $a^2(b-1)+b^2(a-1)=0$. Then, since $a,b > 0$, we have $a^2 >0$ and $b^2>0$. Also, $b-1\geq 0$ and $a-1\geq 0$. So $a^2(b-1)+b^2(a-1)$ is positive or zero, where it is zero if $b-1= 0$ and $a-1= 0$.
Hence $a=b=1$ and hence $a^2+b^2=1^2+1^2=2$. 
A: Hint: you are missing the last step:
$$a^2(b - 1) + b^2(a - 1) = 0$$
A: Hint for one way to do this:
Here $a,b$ are positive integers. In particular they are both $\ge1$. But then
$$
\frac ab\le a
$$
and
$$
\frac ba\le b
$$
with equality only if $b$ (resp. $a$) $=1$.
But the sum
$$
\frac ab +\frac ba=a+b,
$$
so....?
A: 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.
