\(M=x^2+y^2\)
\(=\left(x^2+2xy+y^2\right)-2xy\)
\(=\left(x+y\right)^2-2xy\)
\(=19^2-2.18=325\)
Cách 2: \(\left\{{}\begin{matrix}x+y=19\\x.y=18\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}x=19-y\\\left(19-x\right)y=18\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}x=19-y\\19y-y^2-18=0\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}x=19-y\\\left[{}\begin{matrix}y=18\\y=1\end{matrix}\right.\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}\left\{{}\begin{matrix}x=18\\y=1\end{matrix}\right.\\\left\{{}\begin{matrix}x=1\\y=18\end{matrix}\right.\end{matrix}\right.\)
\(N=x^3-y^3\)
\(=1^3-18^3=-5831\)
hoặc \(N=18^3-1=5831\)