Đặt \(\frac{x}{y}+\frac{y}{x}=a\Rightarrow\frac{x^2}{y^2}+\frac{y^2}{x^2}=a^2-2\)
Ta cũng có: \(a=\frac{x^2+y^2}{xy}=\frac{\left(x-y\right)^2}{xy}+2\ge2\)
Vậy \(B=2\left(a^2-2\right)-a+1\) với \(a\ge2\)
\(B=2a^2-a-3=2a^2-a-6+3\)
\(B=\left(a-2\right)\left(2a+3\right)+3\)
Do \(a\ge2\Rightarrow\left\{{}\begin{matrix}a-2\ge0\\2a+3>0\end{matrix}\right.\) \(\Rightarrow\left(a-2\right)\left(2a+3\right)\ge0\)
\(\Rightarrow B\ge3\Rightarrow B_{min}=3\) khi \(a=2\) hay \(x=y\)