\(\text{a) Ta có:}xy=1\Rightarrow\hept{\begin{cases}2xy=2\\-2xy=-2\end{cases}}\)
\(\text{Ta lại có: }x^2+y^2=2\Rightarrow\hept{\begin{cases}x^2+y^2+2xy=2+2=4\\x^2+y^2-2xy=2-2=0\end{cases}\Rightarrow\hept{\begin{cases}\left(x+y\right)^2=4\\\left(x-y\right)^2=0\end{cases}\Rightarrow}\hept{\begin{cases}x+y=\pm2\\x-y=0\end{cases}}}\)
\(\text{b) Ta có: }x+y=5\)
\(\Rightarrow\left(x+y\right)^2=25\)
\(\Rightarrow x^2+2xy+y^2=25\)
\(\Rightarrow x^2+4+y^2=25\)
\(\Rightarrow x^2+y^2=21\)
\(\text{b) Ta có: }x^2+y^2=21\)
\(\Rightarrow x^2-2xy+y^2=21-2xy\)
\(\Rightarrow\left(x-y\right)^2=21-4\)
\(\Rightarrow\left(x-y\right)^2=17\)
\(\Rightarrow x-y=\pm\sqrt{17}\)