Lời giải:
\(S=\frac{a}{a+1}+\frac{b}{b+1}=1-\frac{1}{a+1}+1-\frac{1}{b+1}\)
\(=2-\left(\frac{1}{a+1}+\frac{1}{b+1}\right)=2-\frac{a+b+2}{(a+1)(b+1)}=2-\frac{a^2+b^2+2}{ab+a+b+1}(1)\)
Áp dụng BĐT Cauchy cho các số không âm:
\(a^2+b^2\geq 2ab\)
\(a^2+1\geq 2a; b^2+1\geq 2b\)
Cộng theo vế \(2a^2+2b^2+2\geq 2ab+2a+2b\)
\(\Leftrightarrow 2a^2+2b^2+4\geq 2ab+2a+2b+2\)
\(\Leftrightarrow a^2+b^2+2\geq ab+a+b+1(2)\)
Từ \((1);(2)\Rightarrow S\leq 2-\frac{ab+a+b+1}{ab+a+b+1}=1\)
Vậy $S_{\max}=1$. Dấu "=" xảy ra khi $a=b=1$
Cách khác:
Ta đã biết \(S=2-\left(\frac{1}{a+1}+\frac{1}{b+1}\right)\)
Áp dụng BĐT S.Vacxo: \(\frac{1}{a+1}+\frac{1}{b+1}\geq \frac{4}{a+1+b+1}=\frac{4}{a+b+2}\)
Áp dụng BĐT Cauchy: \(a+b=a^2+b^2\geq \frac{(a+b)^2}{2}\)
\(\Rightarrow 1\geq \frac{a+b}{2}\Rightarrow a+b\leq 2\)
Do đó: \(\frac{1}{a+1}+\frac{1}{b+1}\geq \frac{4}{a+b+2}\geq \frac{4}{2+2}=1\)
\(\Rightarrow S=2-\left(\frac{1}{a+1}+\frac{1}{b+1}\right)\leq 2-1=1\)
Vậy $S_{\max}=1$ khi $a=b=1$