ĐKXĐ: ...
Đặt \(\sqrt{2+x}+\sqrt{2-x}=t>0\)
\(t=\sqrt{2+x}+\sqrt{2-x}\le\sqrt{2\left(2+x+2-x\right)}=2\sqrt{2}\) (Bunhiacopxki)
\(t^2=4+2\sqrt{4-x^2}\ge4\Rightarrow t\ge2\) (1)
\(\Rightarrow2\le t\le2\sqrt{2}\)
Cũng từ (1) ta có \(\sqrt{4-x^2}=\frac{t^2-4}{2}\)
\(\Rightarrow P=t-\frac{t^2-4}{2}=\frac{-t^2+2t+4}{2}=\frac{t\left(2-t\right)+4}{2}\)
Do \(t\ge2\Rightarrow2-t\le0\Rightarrow t\left(2-t\right)\le0\)
\(\Rightarrow P\le\frac{0+4}{2}=2\Rightarrow P_{max}=2\) khi \(t=2\) hay \(\left[{}\begin{matrix}x=2\\x=-2\end{matrix}\right.\)
\(P=\frac{-t^2+2t+4}{2}=\frac{-t^2+2t+8-4\sqrt{2}-4+4\sqrt{2}}{2}=\frac{\left(2\sqrt{2}-t\right)\left(t+2\sqrt{2}-2\right)-4+4\sqrt{2}}{2}\)
Do \(t\le2\sqrt{2}\Rightarrow2\sqrt{2}-t\ge0\Rightarrow\left(2\sqrt{2}-t\right)\left(t+2\sqrt{2}-2\right)\ge0\)
\(\Rightarrow P\ge\frac{-4+4\sqrt{2}}{2}=2\sqrt{2}-2\)
\(\Rightarrow P_{min}=2\sqrt{2}-2\) khi \(t=2\sqrt{2}\Leftrightarrow2+x=2-x\Rightarrow x=0\)