# Prove inequality $n - s + \ln(s) - \ln(n) \geq 0$

Let $s,n \in \{1,2,\ldots\}$ with $s \in [1,n]$. I got to show that the following holds \begin{align} f(s) := n - s + \ln(s) - \ln(n) \geq 0. \end{align} My idea: there is a unique root at $f(n) = 0$. And since $f'(s)=-1 + 1/s \geq 0$ is decreasing for all $s$ we must have $f(s) \geq 0$ for all $s \in [1,n]$.

• How do you show that there is a unique root? The answer to that question might just answer your question. – robjohn Jan 23 '18 at 14:32
• "there is a unique root" how do you know it's unique? – 5xum Jan 23 '18 at 14:32

Let $$f(x)=x-\ln(x)$$

Note that $$f'(x)=1-\frac {1}{x} \ge 0$$

Thus $f(x)$ is an increasing function on $[1,\infty ].$

Since $s\le n$ we get $$f(s)\le f(n)$$

Hence $$s-\ln(s) \le n-\ln(n).$$

$$g(x)=x-\ln x$$

Prove $g(x)$ is increasing for $x\ge1$.

Better put for each $x\in (1,n)$: $$g(x) = x-\ln(x)$$ Now $g'(x) = 1-1/x>0$ so $g$ is increasing and thus conclusion.

Note that

$$n - s + \ln s - \ln n \geq 0 \iff \ln e^n- \ln n \ge \ln e^s - \ln s \iff \frac{e^n}{n}\ge \frac{e^s}s$$

whic is true since $\frac{e^x}{x}$ for $x\ge 1$ is an increasing function.