Đặt A=\(-x^2+2x\left(y+1\right)-\left(y-1\right)^2-3y^2+8y+6\)
=\(-\left(x-y+1\right)^2-3\left(y^2-\frac{8}{3}y+\frac{16}{9}\right)+\frac{34}{3}\)
=\(-\left(x-y+1\right)^2-3\left(y-\frac{4}{3}\right)^2+\frac{34}{3}\le\frac{34}{3}\)
dấu = xảy ra khi \(\left\{\begin{matrix}x-y+1=0\\y-\frac{4}{3}=0\end{matrix}\right.\Leftrightarrow\left\{\begin{matrix}x=\frac{1}{3}\\y=\frac{4}{3}\end{matrix}\right.\)
Vậy max A=\(\frac{34}{3}\)khi và chỉ khi x=1/3, y=4/3