Find $a^2+b^2+2(a+b)$ minimum if $ab=2$ Let $a,b\in R$,and such 
$$ab=2$$
Find the minimum of the $a^2+b^2+2(a+b)$.
I have used $a=\dfrac{2}{b}$, then
$$a^2+b^2+2(a+b)=\dfrac{4}{b^2}+b^2+\dfrac{4}{b}+2b=f'(b)$$
Let $$f'(b)=0,\,b=-\sqrt{2}$$
So $$a^2+b^2+2(a+b)\ge 4-4\sqrt{2}$$
I wanted to know if there is other way to simplify the function and find the required value without using messy methods. Can we cleanly use AM-GM inequality?

Using AM-GM:
$$a^2+b^2+2(a+b)\ge 2ab+2(a+b)=4+2(a+b).$$
If $a,b>0,$ then $a+b \to min$ subject to $ab=2$. Using AM-GM: $a+b\ge 2\sqrt{ab}=2\sqrt{2}.$ Hence: $4+4\sqrt{2}$ is min.
If $a,b<0,$ then $a+b \to max$ subject to $ab=2.$ Maximize $f(a)=a+\frac2a$ to get $a=b=-\sqrt{2}$. Hence: $4-4\sqrt{2}$ is min.
