\(M=5x^2+y^2-2x+2y+2xy+2004\)
\(=\left(x^2+2x+1\right)+2y\left(x+1\right)+y^2+4x^2-4x+1+2002\)
\(=\left(x+1\right)^2+2y\left(x+1\right)+y^2+\left(2x-1\right)^2+2002\)
\(=\left(x+1+y\right)^2+\left(2x-1\right)^2+2003\ge2002\) với mọi x,y
=> \(M_{min}=2002\Leftrightarrow\left\{{}\begin{matrix}x+y+1=0\\2x-1=0\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}y=-\dfrac{3}{2}\\x=\dfrac{1}{2}\end{matrix}\right.\)
Vậy \(M_{min}=2002\)