Validating the inequality. $x-\frac{x^2}{2}+\frac{x^3}{3(1+x)}<\log(1+x)<x-\frac{x^2}{2}+\frac{x^3}{3}$, $x>0$
Here I can only see that the right side of second inequality i.e. $x-\frac{x^2}{2}+\frac{x^3}{3}$ comes in the expansion of $\log(1+x)$.
We have done the Lagrange's mean value theorem and intermediate value theorem, do these have anything to do with the inequality.
Kindly provide some hint.

I expand my comment into an answer.

We have for $t > 0$ $$\frac{1}{1 + t} = 1 - t + \frac{t^{2}}{1 + t}$$ and hence if $0 < t < x$ then $$1 - t + \frac{t^{2}}{1 + x} < \frac{1}{1 + t} < 1 - t + t^{2}$$ and integrating the above with respect to $t$ on interval $[0, x]$ we get $$x - \frac{x^{2}}{2} + \frac{x^{3}}{3(1 + x)} < \log(1 + x) < x - \frac{x^{2}}{2} + \frac{x^{3}}{3}$$
