Show that $y=\log (1+x)-\frac{2 x}{2+x}, x>-1$, is an increasing function of $x$ throughout its domain.
We have,
$y=\log (1+x)-\frac{2 x}{2+x}$
$\therefore \frac{d y}{d x}=\frac{1}{1+x}-\frac{(2+x)(2)-2 x(1)}{(2+x)^{2}}=\frac{1}{1+x}-\frac{4}{(2+x)^{2}}=\frac{x^{2}}{(1+x)(2+x)^{2}}$
Now, $\frac{d y}{d x}=0$
$\Rightarrow \frac{x^{2}}{(1+x)(2+x)^{2}}=0$
$\Rightarrow x^{2}=0 \quad[(2+x) \neq 0$ as $x>-1]$
$\Rightarrow x=0$
Since $x>-1$, point $x=0$ divides the domain $(-1, \infty)$ in two disjoint intervals i.e., $-1
When $-1
$x<0 \Rightarrow x^{2}>0$
$x>-1 \Rightarrow(2+x)>0 \Rightarrow\left(2+x^{2}\right)>0$
$\therefore y^{\prime}=\frac{x^{2}}{(1+x)(2+x)^{2}}>0$
Also, when $x>0$ :
$x>0 \Rightarrow x^{2}>0,(2+x)^{2}>0$
$\therefore y^{\prime}=\frac{x^{2}}{(1+x)(2+x)^{2}}>0$
Hence, function f is increasing throughout this domain.