$$f(x) = x + \frac{2}{x}$$ I tried to find the minimum of $f(x)$ with the Cauchy–Schwarz inequality, but I find different answers.
First I suppose $a = (\sqrt{\frac{2}{x}} ,\sqrt x,0)$ and
$b = (\sqrt x,\sqrt{\frac{2}{x}} ,0)$ and the minimum of function becomes $2\sqrt 2$.
Second I suppose $a = (\sqrt{\frac{2}{x}} ,\sqrt x,0)$ and
$b = (\sqrt x,0 ,\sqrt{\frac{2}{x}})$ and the minimum of function becomes $\sqrt 2$.
I know the first answer is true and in the second condition the inequality doesn't have a problem but it's not the minimum of the function.
Do we know from this we can't use the Cauchy–Schwarz inequality to find the minimum of a function?