<s>[INST] What is the minimum value of $a+b+\frac{1}{ab}$ if $a^2 + b^2 = 1$? For the case when $a,b>0,$ I used AM-GM Inequality as follows that:
$\frac{(a+b+\frac{1}{ab})}{3} \geq (ab\frac{1}{ab})^\frac{1}{3}$
This implies that $(a+b+\frac{1}{ab})\geq 3$. Hence, the minimum value of $(a+b+\frac{1}{ab})$ is 3
But the answer is $2+\sqrt{2}$ ... how is it ?
 [/INST] If $a,b>0$, one can make the substitution $u=ab,$ where $0<u\leq \frac 1 2$ (by AM-GM). Note that $$1=a^2+b^2=(a+b)^2-2ab,$$ hence $$a+b=\sqrt{1+2u}.$$ It follows that one needs to minimize $$f(u):=a+b+\frac 1{ab}=\sqrt{1+2u}+\frac 1 u, \qquad 0<u\leq \frac 1 2.$$
By Calculus, it is easy to see that $f$ has a global mimimum at $u_0\in (1,2)$ with $u_0^4-2u_0-1=0$, but $f$ is decreasing on $(0,\frac 1 2].$ It follows that $f$ achieves absolute minimum over $(0,\frac 1 2]$ at $u=\frac 1 2=ab,$ i.e. when $a=b=\frac{\sqrt{2}}2$ (the case of equality by AM-GM: $1=a^2+b^2\geq 2ab).$ Hence $$f(1/2)=2+\sqrt{2}$$ is the minimum of $a+b+\frac 1 {ab}.$ QED
</s>