Ta có:
\(B=x^2+4-x+\frac{1}{x^2-x+1}\)
\(B=\left(x^2-x+1+\frac{1}{x^2-x+1}\right)+3\)
Áp dụng BĐT Cauchy ta được:
\(B\ge2\sqrt{\left(x^2-x+1\right)\cdot\frac{1}{x^2-x+1}}+3=2\cdot1+3=5\)
Dấu "=" xảy ra khi: \(x^2-x+1=\frac{1}{x^2-x+1}\)
\(\Leftrightarrow\left(x^2-x+1\right)^2=1\) mà \(x^2-x+1=\left(x-\frac{1}{2}\right)^2+\frac{3}{4}>0\left(\forall x\right)\)
\(\Rightarrow x^2-x+1=1\Leftrightarrow x\left(x-1\right)=0\Rightarrow\orbr{\begin{cases}x=0\\x=1\end{cases}}\)
Vậy Min(B) = 5 khi \(\orbr{\begin{cases}x=0\\x=1\end{cases}}\)