Câu 1:
\(4x^2+8xy+28x+28y+8y^2+40=0\)
\(\Leftrightarrow\left(2x+2y+7\right)^2+4y^2-9=0\)
\(\Leftrightarrow\left(2x+2y+7\right)^2=9-4y^2\le9\)
\(\Rightarrow-3\le2x+2y+7\le3\)
\(\Leftrightarrow-8\le2y+2y+2\le-2\)
\(\Rightarrow-4\le x+y+1\le-1\)
\(\Rightarrow S_{max}=-1\) khi \(\left\{{}\begin{matrix}x=-2\\y=0\end{matrix}\right.\)
\(S_{min}=-4\) khi \(\left\{{}\begin{matrix}x=-5\\y=0\end{matrix}\right.\)
Câu 2:
\(x^2+y^2=6xy\Rightarrow\frac{x}{y}+\frac{y}{x}=6\)
Đặt \(\frac{x}{y}=a>1\Rightarrow a+\frac{1}{a}=6\Rightarrow a^2-6a+1=0\Rightarrow a=3+2\sqrt{2}\)
\(\Rightarrow P=\frac{x+y}{x-y}=\frac{\frac{x}{y}+1}{\frac{x}{y}-1}=\frac{a+1}{a-1}=\frac{3+2\sqrt{2}+1}{3+2\sqrt{2}-1}=\sqrt{2}\)