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.
 A: I assume your formula is $a+b=\dfrac ab+\dfrac ba,$ then $a^2+b^2=ab(a+b)$ and since $a^2+b^2=(a+b)^2-2ab,$ we have $$x^2-2y=xy,$$ where $x=a+b$ and $y=ab.$ From here you can find $x$ in-terms of $y$ as $$x=\dfrac{y\pm\sqrt{y^2+8y}}{2}.$$ Then $$\color{Green}{a^2+b^2=\left(\dfrac{y\pm\sqrt{y^2+8y}}{2}\right)y},$$ where $y$ is a parameter.  

Also, if you only interest on $a,b$ integer solutions, we need to find $y$ so that $y^2+8y$ is a perfect square.

Edit:
To do this, note that $z^2=y^2+8y=(y+4)^2-16$ implies $16=(y-z+4)(y+z+4).$ Now find the all possible values of $y-z+4$ and $y+z+4$ using factors of $16.$ Then you will have to solve few simultaneous equations to find corresponding $y.$
Later:  

As @MANMAID pointed out $y=1$ is the only possible value and this gives us $$\color{Red}{a^2+b^2=2.}$$

A: Lemma(1): Let $a$ & $b$ to be integers such that $ab \mid a^2+b^2$. 
If $\gcd(a,b)=1$, then prove that $a=\pm b$. 
Proof: We claim that $ab=\pm 1$.


*

*Proof of the claim: Suppose on contrary; that $1 < |ab|$. 
So there exist a prime number $p$, which divides $ab$; i.e. $p \mid ab$. 
Without loss of generality we can assume that $p \mid a$. 
So $p$ must divides $b^2=(a^2+b^2)-a^2$. 
[Because $p$ divides both of the $(a^2+b^2)$ & $a^2$.] 
So we can conclude that $p$ must divides $b$; 
which is an obvious contradiction with the assumption that $\gcd(a,b)=1$.


So we can conclude that $a=\pm 1$ & $b=\pm 1$; which implies that $a=\pm b$.


Lemma(2): Let $a$ & $b$ to be integers such that $ab \mid a^2+b^2$. 
Prove that $a=\pm b$. 
Proof: Let $d:=\gcd(a,b)$, 
so there exist integers $a^{\prime}$ & $b^{\prime}$ such that: 
$$ 
a=da^{\prime} \ , \ \ \ \ \ \ \ 
b=db^{\prime} \ , \ \ \ \ \ \ \ 
\gcd(a^{\prime},b^{\prime})=1 . $$
The relation $ab \mid a^2+b^2$, implies that there is an integer $k$, 
such that: 
$$
k(ab) = a^2+b^2  
\Longrightarrow 
k\big( (da^{\prime})(db^{\prime}) \big) = (da^{\prime})^2+(db^{\prime})^2 
\Longrightarrow 
k\big( a^{\prime}b^{\prime} \big) = (a^{\prime})^2+(b^{\prime})^2 , 
$$ 
so we obtain a pair $(a^{\prime},b^{\prime})$ such that: 
$$a^{\prime}b^{\prime} \mid (a^{\prime})^2+(b^{\prime})^2 \ , 
\ \ \ \ \ \ \ \ \ \ \ \ 
\gcd(a^{\prime},b^{\prime})=1 .$$
So by Lemma(1) we have: 
$$a=d(a^{\prime})=d(\pm b^{\prime})=\pm d(b^{\prime})=\pm b .$$


The relation 
$$a+b=\frac{a}{b} + \frac{b}{a} \ \ , \ \ \ \ \ \ \ (*)  $$ 
implies $ab(a+b)=a^2+b^2$, 
so we have: $ab \mid a^2+b^2$, 
so by the Lemma(2) we have one of the two folowing cases: 


*

*$a= + b$ , in this case both of the fractions 
on the Right-hand-side of the relation $(*)$, 
both are equal to $+1$, 
so the R-H-S is equal to $+ 2$. 
On the other hand in this case the Left-hand-side of the relation $(*)$ is equal to $2a$, so must have: $2a=+2$, which yields the solution $a=b=+1$. 

*$a= - b$ , in this case both of the fractions 
on the Right-hand-side of the relation $(*)$, 
both are equal to $-1$, 
so the R-H-S is equal to $- 2$. 
On the other hand in this case the Left-hand-side of the relation $(*)$ is equal to $0$, so must have: $0=-2$, which is impossible. 
So the quantity $a^2+b^2$ will be equal to $2$.
A: 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!
A: Let $|a|= a'd$, $\>|b|= b'd$ with $d\geq1$ and ${\rm gcd}(a',b')=1$. Then
$$a+b={a\over b}+{b\over a}=\pm\left({a'\over b'}+{b'\over a'}\right)$$
is integer only if both fractions on the right hand side are integers, and this is only the case if $a'=b'=1$. It follows that $|a|=|b|$ and $a+b=\pm2$, hence $a=b=\pm1$ and $a^2+b^2=2$.
A: $$a+b=\frac{a}{b} + \frac{b}{a}$$
therefore,$$a^2+b^2=ab(a+b)$$
or,$$a^2(1-b)+b^2(1-a)=0$$
from this relation we can say $1-b=1-a=0$
therefore,$$a=b=1$$
so finally,
$$a^2+b^2=2$$
