Showing $\frac{x}{1+x}<\mathrm{log}(1+x)<x$ for all $x>0$ using the mean value theorem

I want to show that

$\frac{x}{1+x}<\mathrm{log}(1+x)<x$

for all $x>0$ using the mean value theorem. I tried to prove the two inequalities separately.

$\frac{x}{1+x}<\mathrm{log}(1+x)\iff \frac{x}{1+x}-\mathrm{log}(1+x)<0$

Let

$f(x)=\frac{x}{1+x}-\mathrm{log}(1+x).$

Since

$f(0)=0$

and

${f}^{\prime}(x)=\frac{1}{(1+x{)}^{2}}-\frac{1}{1+x}<0$

for all $x>0$, $f(x)<0$ for all $x>0$. Is this correct so far?

I go on with the second part: Let

$f(x)=\mathrm{log}(x+1)$. Choose $a=0$ and $x>0$ so that there is, according to the mean value theorem, an ${x}_{0}$ between $a$ and $x$ with

${f}^{\prime}({x}_{0})=\frac{f(x)-f(a)}{x-a}\iff \frac{1}{{x}_{0}+1}=\frac{\mathrm{log}(x+1)}{x}$

Since

${x}_{0}>0\Rightarrow \frac{1}{{x}_{0}+1}<1.$

$\Rightarrow 1>\frac{1}{{x}_{0}+1}=\frac{\mathrm{log}(x+1)}{x}\Rightarrow x>\mathrm{log}(x+1)$

I want to show that

$\frac{x}{1+x}<\mathrm{log}(1+x)<x$

for all $x>0$ using the mean value theorem. I tried to prove the two inequalities separately.

$\frac{x}{1+x}<\mathrm{log}(1+x)\iff \frac{x}{1+x}-\mathrm{log}(1+x)<0$

Let

$f(x)=\frac{x}{1+x}-\mathrm{log}(1+x).$

Since

$f(0)=0$

and

${f}^{\prime}(x)=\frac{1}{(1+x{)}^{2}}-\frac{1}{1+x}<0$

for all $x>0$, $f(x)<0$ for all $x>0$. Is this correct so far?

I go on with the second part: Let

$f(x)=\mathrm{log}(x+1)$. Choose $a=0$ and $x>0$ so that there is, according to the mean value theorem, an ${x}_{0}$ between $a$ and $x$ with

${f}^{\prime}({x}_{0})=\frac{f(x)-f(a)}{x-a}\iff \frac{1}{{x}_{0}+1}=\frac{\mathrm{log}(x+1)}{x}$

Since

${x}_{0}>0\Rightarrow \frac{1}{{x}_{0}+1}<1.$

$\Rightarrow 1>\frac{1}{{x}_{0}+1}=\frac{\mathrm{log}(x+1)}{x}\Rightarrow x>\mathrm{log}(x+1)$