<s>[INST] If $a^b = b^a$ and $a=2b$ then find the value of $a^2+b^2$ If $a^b = b^a$ and $a=2b$ then find the value of $a^2+b^2$
My Attempt, 
$$a^b = b^a$$
$$a^b =b^{2b}$$
$$a^b =b^b.b^b$$.
Now, what should I do further? 
 [/INST] If we assume that $a>0$ and $b>0$, then from $a^b=b^a$ and taking log we have $b\ln a=a\ln b$. With $a=2b$, we have
$b\ln(2b)=2b\ln b$ which implies $b(\ln(2b)-2\ln b)=0$.
Hence $b=0$ or $\ln(2b)-2\ln b=0$   or $2b=b^2$ or $b(b-2)=0$
Therefore $b=0$ or $b=2$. But $b>0$ from assumption so we choose $b=2$ so $a=4$, hence $a^2+b^2=20$
</s>