# Find the limit of $\lim_{x\to0}{\frac{\ln(1+e^x)-\ln2}{x}}$ without L'Hospital's rule

I have to find: $$\lim_{x\to0}{\frac{\ln(1+e^x)-\ln2}{x}}$$ and I want to calculate it without using L'Hospital's rule. With L'Hospital's I know that it gives $1/2$. Any ideas?

• maybe try Taylor series?
– E-A
Dec 21, 2017 at 16:23
• Something that is missing from all the answers pointing out this is a derivative at $0$, i.e. you are computing $$\lim_{x\to 0} \frac{f(x)-f(0)}{x}$$ for some function $f$: this shows you shouldn't (even cannot) use L'Hopital for that. Why? L'Hopital's rule amounts to saying "compute the derivatives of (i) $g(x) = f(x) - f(0)$ and (ii) $h(x) = x$ on a neighborhood of $0$, and then evaluate $\lim_{x\to 0}\frac{g'(x)}{h'(x)} = \lim_{x\to 0}\frac{f'(x)}{1}$. Dec 21, 2017 at 16:43
• But you want to compute... $f'(0)$ in the first place, so using L'Hopital is circular (on top of being overkill): it asks to compute $f'(x)$ in order to compute $f'(0)$. Dec 21, 2017 at 16:43

I thought it might be instructive to present an approach that does not rely on differential calculus, but rather uses the squeeze theorem and a set of inequalities that can be obtained with pre-calculus tools only. To that end we proceed.

First note that in THIS ANSWER, I showed using only the limit definition of the exponential function along with Bernoulli's Inequality that the logarithm and exponential functions satisfy the inequalities

$$\frac{x-1}{x}\le \log(x)\le x-1\tag 1$$

and for $$x<1$$

$$1+x\le e^x\le \frac{1}{1-x}\tag2$$

Next, note that $$\log(1+e^x)-\log(2)=\log\left(\frac{e^x+1}2\right)$$. Hence, applying $$(1)$$, we can assert that

$$\frac{e^x -1}{e^x +1}\le \log(1+e^x)-\log(2)\le \frac{e^x-1}2\tag3$$

Then, applying $$(2)$$ to $$(3)$$ reveals

$$\frac{x}{e^x +1}\le \log(1+e^x)-\log(2)\le \frac{x}{2(1-x)}\tag4$$

Dividing $$(4)$$ by $$x$$, letting $$x\to 0$$, and applying the squeeze theorem yields the coveted limit

$$\bbox[5px,border:2px solid #C0A000]{\lim_{x\to 0}\frac{\log(1+e^x)-\log(2)}{x}=\frac12}$$

Tools Used: The inequalities in $$(1)$$ and $$(2)$$ and the squeeze theorem.

• can (1) or (2) be proved without differential calculus? Dec 21, 2017 at 16:57
• @daulomb Indeed. I provided a link in the solution. Did you not see it? If not, HERE IT IS. Dec 21, 2017 at 17:00
• I could not open the link but as I know the proof of Bernoulli's inequality also requires differentiation. Am I wrong? Neverthless your solution is very nice! Dec 21, 2017 at 17:03
• @daulomb Bernoulli's inequality can also be proved by induction; I agree teh solution is nice but is not simpler than others method
– user
Dec 21, 2017 at 17:08
• @daulomb And with Bernoulli's Inequality and the limit definition of the exponential function, one can prove the inequalities in $(1)$ and $(2)$. HERE is the link one more time. Dec 21, 2017 at 17:51

Simply differentiate $f(x)=\ln(e^x +1)$ at the point of abscissa $x=0$ and you’ll get the answer. in fact this is the definition of the derivative of $f$!!

Let $y = e^x$

$$L = \lim_{x\to0}{\frac{\ln(1+e^x)-\ln2}{x}} = \lim_{y\to1}{\frac{\ln(1+y)-\ln2}{\ln y}}$$

Let $z = y -1$

$$L = \lim_{z\to0}{\frac{\ln(z + 2)-\ln2}{\ln(z+1)}} = \dfrac12\lim_{z\to0}\frac{\ln(z/2 + 1)}{z/2}\dfrac{z}{\ln(z+1)}= \dfrac12$$

• yes I've seen also that now :) +1 for similar solution
– user
Dec 21, 2017 at 18:59

This is just the derivative of $\ln\left(\frac{e^x+1}2\right)$ at $0$, which is indeed $\frac12$.

• Why the extra factor $2$? It is simpler to see it as the derivative of $\ln(1+e^x)$, without the additional division by $2$ (which, given it's inside the logarithm, is an additive term anyway). Dec 21, 2017 at 16:29
• @ClementC. Thats because in order to check that it was indeed an indeterminate form, the first thing I did was the transformation $\ln(e^x+1)-\ln2=\ln\left(\frac{e^x+1}2\right)$. But, yes, there is no need no do that. Dec 21, 2017 at 16:33

That's just the derivative of $\ln\left(e^x+1\right)$ at $0$.

If you don't see it, by Taylor's series:

$${\frac{\ln(1+e^x)-\ln2}{x}}={\frac{\ln(2+x+o(x))-\ln2}{x}}=\frac{\ln(1+\frac{x}{2}+o(x))}{x}=\frac{\frac{x}{2}+o(x)}{x}=\frac12+o(1)\to\frac12$$

Solution by standard limits:

set $$1+e^x=2+y \quad y\to 0\implies e^x=1+y \implies x= \ln (1+y)$$

thus

$${\frac{\ln(1+e^x)-\ln2}{x}}=\frac{\ln (2+y)-\ln 2}{\ln(1+y)}=\frac{\ln (1+\frac{y}{2})}{\ln(1+y)}=\frac{\ln (1+\frac{y}{2})}{\frac y2}\frac{y}{\ln (1+y)}\frac12\to 1\cdot 1\cdot \frac12=\frac12$$

• @ThomasAndrews yes of course $y\to0$ too!
– user
Dec 21, 2017 at 18:00
• Dec 21, 2017 at 18:48
• @123 I've seen it now! Anyway it's slightly different and I think you have to add an $\frac12$ term at the end!
– user
Dec 21, 2017 at 18:55

There's an amusing way to prove, if the limit exists, it must be $1/2.$ Obviously, not a complete answer, since it doesn't prove the limit exists.)

Letting $f(x)=\log(1+e^x)$ then we have $f(x)=\log(1+e^{x})=\log(e^x)+\log(1+e^{-x})=x+f(-x)$ and thus $f(x)-f(-x)=x.$

So if $L=\lim_{x\to 0}\frac{f(x)-f(0)}{x}$ then $$1=\lim_{x\to 0} \frac{f(x)-f(-x)}{x}=\lim_{x\to 0}\left[\frac{f(x)-f(0)}{x}+\frac{f(-x)-f(0)}{-x}\right]=2L$$

And thus we get $L=\frac{1}{2}$.

A more complete answer uses that we know that:

$$\lim_{y\to 0}\frac{\log(1+y)}{y}=1.$$

Then we can write:

$$\frac{\log(1+e^x)-\log2}{x}=\frac{\log\left(1+\frac{e^x-1}{2}\right)}{\frac{e^x-1}{2}}\cdot \frac{\frac{e^x-1}{2}}{x}$$

Letting $y=\frac{e^x-1}{2}$, we get that $y\to 0$ as $x\to 0$ and $x=\log(1+2y)$ so we get:

$$\lim_{x\to 0}\frac{\log(1+e^x)-\log2}{x}=\lim_{y\to 0}\frac{\log(1+y)}{y}\cdot \frac{2y}{\log(2y+1)}\cdot \frac{1}{2}=1\cdot 1\cdot\frac{1}{2}$$

This is really just a long way of proving the chain rule for the derivative of $\log(e^x+1).$

[Complete answer updated to use the neat trick of gimusi at the end, rather than using $\frac{e^x-1}{x}\to 1$ as well.]

• Nice the second is similar to mine by standard limits, +1 for the first!
– user
Dec 21, 2017 at 18:07
• I had a slightly more complicated answer for the complete answer, but I added a simplication based roughly on your answer. I was still using $y=\frac{e^x-1}{2}$ all along, I just assumed $\frac{e^x-1}{x}\to 1$ also. So I updated with a rough assist from your answer. Edited to reflect your help. Dec 21, 2017 at 18:10

As pointed out by one of the replies on the question, you can notice that $$\lim_{x\to 0} \frac {ln(1+e^x)-ln2}{x}$$ is written in the format of one of the theoretical definition of derivative at point x : $$\lim_{h\to 0} \frac {f(x+h) - f(x)}{x}$$ Therefore, x can be evaluated to 0 and $f(x) = ln(1+e^x)$ Using this function, calculate its derivative which is $$f'(x) = \frac {1}{1+e^x} (e^x)$$ Then you plug $x=0$ to get the answer $$f'(1) = \frac{e^0}{1+e^0} = \frac{1}{2}$$