Lời giải:
Ta có: \(a^2+b^2-2ab=(a-b)^2\geq 0\)
\(\Rightarrow a^2+b^2\geq 2ab\)
\(\Rightarrow 1\geq 2ab\Rightarrow ab\leq \frac{1}{2}\)
Cũng từ \(a^2+b^2\geq 2ab\Rightarrow 2(a^2+b^2)\geq a^2+b^2+2ab\)
\(\Rightarrow 2(a^2+b^2)\geq (a+b)^2\)
\(\Rightarrow 2\geq (a+b)^2\Rightarrow a+b\leq \sqrt{2}\)
Vậy \(S=ab+2(a+b)\leq \frac{1}{2}+2\sqrt{2}=S_{\max}\)
Dấu "=" xảy ra khi \(a=b=\frac{1}{\sqrt{2}}\)