Let $a>b>0$. Suppose we want to minimize $$ f(x)=(x-a)^2+(1/x-b)^2, $$ over $x>0$. Equating $f'(x)=0$ leads to the quartic equation $$ x^4-ax^3+bx-1=0. $$ Is there any reasonable way general analytic way to proceed from here? Is there any way to determine which root of the equation is the right one? (e.g. smallest/largest). I tried various things, e.g. considering the expression $f(x)-f(\tilde x)$ when $x, \tilde x$ are roots, bot got essentially nowhere. In particular, at any given root $x$, $$ f(x)=(x-a)^2(1+x^4), $$ but this does not seem to help much.