prove $\log(1+x)<x$ for $x>0$

Let $$f(x) = \ln(1+x)-x\;,$$ Where $x>0$

Now $$\displaystyle f'(x) = \frac{1}{1+x}-1 = -\frac{x}{1+x}<0$$ for all $x>0$

So function $f(x)$ is Strictly Decreasing function

So Here $$x>0\Rightarrow f(x)<f(0)\;,$$ bcz function $f(x)$ is Strictly Decreasing function.

So $$\ln(1+x)-x<0\Rightarrow \ln(1+x)<x\;,$$ for $x>0$


Your derivation is fine. In particular note that when $x > 0$ then we have $$ \forall x > 0 : e^x > 1, \ 1 + x > 1$$ Now when we take the logarithm of both sides the inequality sign does not turn around.