-1
$\begingroup$

sorry if this is a very obvious question, but I'm writing a proof for the Kulback-Leibler inequality and the first step is to state $\log(x) \leq x-1$ for all $x>0$.

I get it for $x>1$, but in my notes this isn't stated and when I looked on this site for answers all I could see were proofs showing this was the case for all $x>0$.

As far as I'm aware this demonstrably isn't the case for $0<x<1$ so I'm wondering what I'm missing here.

$\endgroup$
  • 1
    $\begingroup$ Hint: Look at the proof for $x > 1$; repeat it exactly for $0 < x < 1$ (in other words, apply the mean value theorem on the interval $[a, 1]$ where $c$ is any number between $0$ and $1$; apply it to the function $(x-1) - \ln x$. $\endgroup$ – John Hughes Apr 15 at 16:48
  • 2
    $\begingroup$ Consider $f(x) = x - 1 - \log(x)$. Show that $f \ge 0$ by showing the minimum of $f$ occurs at $x = 1$. $\endgroup$ – Tom Chen Apr 15 at 16:48
1
$\begingroup$

One way is to use calculus.

Define a function $g$ on $(0,\infty)$ by $g(x)= log\ x-x+1$. Now you check that this function attains the local maximum at $x=1$. Therefore $g(x) \leq g(1)$ for every $x \in (0,\infty)$. Hence $\log x \leq x-1$ for all $x \in(0,\infty)$.

$\endgroup$
  • $\begingroup$ But if $x=0.3$ then $\log(x)=-0.523$ which is greater than $0.3-1=-0.7$? $\endgroup$ – Mark Durkan Apr 15 at 17:04
  • $\begingroup$ @Mark Durkan , By $log$, he means logarithm with natural base. $ln(0.3) = -1.204<-0.7$ $\endgroup$ – Martund Apr 15 at 17:12
  • $\begingroup$ @Martund haha there we go, I knew it was something obvious, cheers! $\endgroup$ – Mark Durkan Apr 15 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.