<s>[INST] Find $(a^2+b^2),$ where $(a+b)=\dfrac{a}{b}+\dfrac{b}{a}$ The question is the same .Find $a^2+b^2$. I think we have to find $a$ and $b$ firstly. Given that $a$ and $b$ are integers.
 [/INST] The condition gives $$(a+b)ab=a^2+b^2$$ or
$$(b-1)a^2+b^2a-b^2=0.$$
If $b=1$ we obtain $a=1$ and $a^2+b^2=2$.
If $b\neq1$ we need $b^4+4b^2(b-1)=m^2$, where $m\in\mathbb N$ or
$$b^2+4b-4=n^2,$$
where $n\in\mathbb N$ or
$$(b+2)^2=8+n^2$$ or
$$(n-b-2)(n+b+2)=-8$$ and since $n>0$, we obtain two cases only:


*

*$n-b-2=4$ and $n+b+2=-2$, which gives $n=1$, $b=-5$, $a=\frac{5}{2}$ or $a=\frac{5}{3},$ which is impossible;

*$n-b-2=-2$ and $n+b+2=4$, which gives $n=1$, $b=1,$ which is impossible here.
Done!
</s>