\(\left\{{}\begin{matrix}S=x+y=-p\\P=xy=q\end{matrix}\right.\)
Nên \(x;y\) là nghiệm của phương trình
\(X^2-SX+P=0\)
\(\Leftrightarrow X^2+pX+q=0\)
\(\Leftrightarrow\left\{{}\begin{matrix}x=\dfrac{-p\pm\sqrt[]{p^2-4q}}{2}\\y=\dfrac{-p\mp\sqrt[]{p^2-4q}}{2}\end{matrix}\right.\left(1\right)\)
\(B=x\left(1+y\right)-y\left(xy-1\right)-x^2\)
\(\Leftrightarrow B=x+xy-xy^2+y-x^2\)
\(\Leftrightarrow B=x+y+xy-x\left(x+y\right)\)
\(\Leftrightarrow B=\left(x+y\right)\left(1-x\right)+xy\)
\(\Leftrightarrow B=-p\left(1-x\right)+q\)
\(\left(1\right)\Leftrightarrow B=-p\left[\left(1-\dfrac{-p\pm\sqrt[]{p^2-4q}}{2}\right)\right]+q\)