<s>[INST] Positive integers $a$ and $b$ are such that $a + b =\frac{ a}{b} +\frac{ b}{a}$. What is the value of $a^2 + b^2$? I tried to take $a = 1$ and $b = 2$ and arrive at the conclusion that $a^2 + b^2 = 2$ which indeed is the answer.
However, I wanted to prove this equation algebraically without using the replacement technique.
 [/INST] If $a>1$ or $b>1$, then it follows that $a>\frac{a}{b}$ or $b>\frac{b}{a}$ so $$a+b=\frac{a}{b}+\frac{b}{a}<a+b$$
Which is a contradiction. 
Thus we conclude that $a,b \le 1$, and thus $a=b=1$. Therefore, the answer is $2$. 
</s>