Đặt:
\(S=5-\left|x+1\right|\)
\(\left|x+1\right|\ge0\)
\(S_{MAX}\Rightarrow\left|x+1\right|_{MIN}\)
\(\left|x+1\right|_{MIN}=0\)
\(\Rightarrow x+1=0\Rightarrow x=-1\)
\(\Rightarrow S_{MAX}=5-0=5\)
\(\left|x\right|+\left|y\right|=2\)
\(\Rightarrow\left\{{}\begin{matrix}\left|x\right|\ge0\\\left|y\right|\ge0\end{matrix}\right.\)
\(\Rightarrow2=\left(1+1\right);\left(0+2\right);\left(2+0\right)\) ( các số tự nhiên vì gttđ của x;y lớn hơn hoặc bằng 0)
\(\Rightarrow\left\{{}\begin{matrix}\left|x\right|=1\Rightarrow x=\pm1\\\left|y\right|=1\Rightarrow y=\pm1\end{matrix}\right.\)
\(\Rightarrow\left\{{}\begin{matrix}\left|x\right|=0\Rightarrow x=0\\\left|y\right|=2\Rightarrow y=\pm2\end{matrix}\right.\)
\(\Rightarrow\left\{{}\begin{matrix}\left|x\right|=2\Rightarrow x=\pm2\\\left|y\right|=0\Rightarrow y=0\end{matrix}\right.\)