\(x^2+\left(y-3\right)x+y^2-4y+4=0\)
\(\Delta=\left(y-3\right)^2-4\left(y^2-4y+4\right)\ge0\)
\(\Leftrightarrow-3y^2+10y-7\ge0\Rightarrow1\le y\le\frac{7}{3}\)
\(y^2+\left(x-4\right)y+x^2-3x+4=0\)
\(\Delta=\left(x-4\right)^2-4\left(x^2-3x+4\right)\ge0\)
\(\Leftrightarrow-3x^2+4x\ge0\Rightarrow0\le x\le\frac{4}{3}\)
Mặt khác ta có:
\(P=3x^3-3y^3+20x^2+5y^2+39x+2\left(-x^2-y^2+4y+3x-4\right)\)
\(P=\left(3x^3+18x^2+45x\right)+\left(-3y^3+3y^2+8y-8\right)=f\left(x\right)+f\left(y\right)\)
Xét hàm \(f\left(x\right)=3x^3+18x^2+45x\) trên \(\left[0;\frac{4}{3}\right]\)
\(f'\left(x\right)=9x^2+36x+45>0\Rightarrow f\left(x\right)\) đồng biến
\(\Rightarrow f\left(x\right)\le f\left(\frac{4}{3}\right)=\frac{892}{9}\)
Xét \(f\left(y\right)=-3y^3+3y^2+8y-8\) trên \(\left[1;\frac{7}{3}\right]\)
\(f'\left(y\right)=-9y^2+6y+8=0\Rightarrow y=\frac{4}{3}\)
\(f\left(1\right)=0\) ; \(f\left(\frac{4}{3}\right)=\frac{8}{9}\) ; \(f\left(\frac{7}{3}\right)=-\frac{100}{9}\)
\(\Rightarrow f\left(y\right)_{max}=f\left(\frac{4}{3}\right)=\frac{8}{9}\Rightarrow f\left(y\right)\le\frac{8}{9}\)
\(\Rightarrow P\le\frac{892}{9}+\frac{8}{9}=100\)