2. Find the minimum value of the expression $\frac{1+x^{2}}{1+x}$, for $x \geq 0$.
Solution. If $f(x)=\frac{1+x^{2}}{1+x}=\frac{x^{2}-1+2}{1+x}=(x-1)+\frac{2}{x+1}=\left((x+1)+\frac{2}{x+1}\right)-2$. Using the inequality $a+b \geq 2 \sqrt{a b}$, we get

$$
f(x) \geq 2 \sqrt{(x+1) \frac{2}{x+1}}-2=2 \sqrt{2}-2
$$

i.e., the minimum value of the expression $f(x)=\frac{1+x^{2}}{1+x}$ is $2(\sqrt{2}-1)$ and it is achieved for $x=\sqrt{2}-1$.