Show that $(1+x)\log(1+x)-x \geq x^2/4$ on $(-1, 4]$

Let $$ f(x)=(x+1)\ln(1+x)-x-\frac{x^2}{4}. $$ We have to show $f(x)\ge0$ in $(-1,4]$. Clearly $\lim_{x\to-1^+}f(x)=\frac34$. We can assume $f(-1)=\frac34$ and hence $f(x)$ is continuous in $[-1,4]$ and diffferentiable in $(-1,4)$. Note $$ f'(x)=-\frac{x}{2}+\ln(1+x), f''(x)=\frac{1-x}{2(1+x)} $$ and $x=1$ is the only point such that $f''(x)=0$. Therefore $f'(x)=0$ has two solutions $x=0$ and $x=c$, $c\in(1,4)$. Clearly $f''(0)=\frac12>0, f''(c)<0$ and hence $f(0)=0$ is a local minimum and $f(c)$ is a local maxim. Also note $f(-1)=\frac34>f(0), f(4)=5\ln5-8>f(0)$. Thus $f(x)$ reaches the global minimum at $x=0$ in $[-1,4]$, namely $f(x)\ge0$.


I'm as baffled as you are regarding the hint, but in order to show the inequality, it's enough to define and differentiate

$$\begin{align} f(x)&=(1+x)\log(1+x)-x-{x^2\over4}\\ f'(x)&=\log(1+x)-{x\over2}\\ f''(x)&={1-x\over2(1+x)} \end{align}$$

and note that $f(0)=f'(0)=0$ and $f(4)=5\log(5)-8\approx0.47\gt0$, with $f''(x)\gt0$ for $x\lt1$ and $f''(x)\lt0$ for $x\gt1$. This is enough to show that $f(x)\ge0$ for all $x\in(-1,4]$.