Đặt \(\left\{{}\begin{matrix}a-2=x\ge0\\b=y\ge0\end{matrix}\right.\) \(\Rightarrow2y+4=\left(x+2\right)y\Rightarrow xy=4\)
\(P=\dfrac{\sqrt{x^2+2x}}{x+1}+\dfrac{\sqrt{y^2+2y}}{y+1}+\dfrac{1}{x+y+2}\)
\(P=\dfrac{\sqrt{2x\left(x+2\right)}}{\sqrt{2}\left(x+1\right)}+\dfrac{\sqrt{2y\left(y+2\right)}}{\sqrt{2}\left(y+1\right)}+\dfrac{1}{x+1+y+1}\)
\(P\le\dfrac{1}{2\sqrt{2}}\left(\dfrac{3x+2}{x+1}+\dfrac{3y+2}{y+1}\right)+\dfrac{1}{4}\left(\dfrac{1}{x+1}+\dfrac{1}{y+1}\right)\)
\(P\le\dfrac{1}{2\sqrt{2}}\left(3-\dfrac{1}{x+1}+3-\dfrac{1}{y+1}\right)+\dfrac{1}{4}\left(\dfrac{1}{x+1}+\dfrac{1}{y+1}\right)\)
\(P\le\dfrac{3\sqrt{2}}{2}-\dfrac{\sqrt{2}-1}{4}\left(\dfrac{1}{x+1}+\dfrac{1}{y+1}\right)\)
Ta có:
\(\dfrac{1}{x+1}+\dfrac{1}{y+1}=\dfrac{x+y+2}{xy+x+y+1}=\dfrac{x+y+2}{x+y+5}=1-\dfrac{3}{x+y+5}\ge1-\dfrac{3}{2\sqrt{xy}+5}=\dfrac{2}{3}\)
\(\Rightarrow P\le\dfrac{3\sqrt{3}}{2}-\dfrac{\sqrt{2}-1}{4}.\dfrac{2}{3}=...\)
Dấu "=" xảy ra khi \(x=y=2\) hay \(\left(a;b\right)=\left(4;2\right)\)