Difficult limit question involving Euler's number and L'Hospital The limit I'm trying to evaluate is
$$
\lim_{x\to+\infty} e^x \left[e - \left(1 + \frac{1}{x}\right)^x\right]
$$
After some hours trying, I've made almost no progress. I always end up in some indeterminate form and L'Hospital isn't getting me anywhere (though I think that, if used properly, it might solve the problem). Maybe it's not even that difficult and I'm just stuck for some stupid reason. Any ideas?
 A: We want to know how quickly the term in the square bracket goes to $0$. The usual proof used to show that it converges towards $0$ needs order $1$ Taylor expansion of the logarithm but here we need a slighly more sophisticated approximation thus we will need to do a second order expansion of the logarithm.
\begin{align}
\left(1+\frac{1}{x}\right)^{x} &= e^{x \ln(1+\frac{1}{x})}\\
&= e^{x (\frac{1}{x} - \frac{1}{2 x^2} + o(\frac{1}{x^2}))} \text{ using } \log(1+u) = u-\frac{u^{2}}{2} + o(u^2)(u \rightarrow 0)\\
&=  e^{1 - \frac{1}{2x} + o(\frac{1}{x}))}\\
&= e e^{\frac{-1}{2x} + o(\frac{1}{x})} \\ 
&= e (1 - \frac{1}{2x} + o(\frac{1}{x})) \text{ using } e^u=1+u+o(u)(u \rightarrow 0)\\
&= e-\frac{e}{2x}+o(\frac{1}{x})(x \rightarrow +\infty) 
\end{align}
thus
$$ e-\left(1+\frac{1}{x}\right)^{x}\sim_{+\infty} \frac{e}{2x}$$
This connects to many posts that pointed out it seems to behave like $\frac{C}{x}$ with a certain constant $C$, which is in fact $C=\frac{e}{2}$.
We can then do the product of the two equivalents :
$$
e^{x}\left[e-\left(1+\frac{1}{x}\right)^{x}\right] \sim_{+\infty} e^x\frac{e}{2x}
$$
By elementary calculus, we know that $\frac{e^x}{x}$ goes towards infinity when $x$ goes to infinity, therefore the total expression goes towards $+\infty$ since $C >0$.
I suppose just using l'Hopital's rule (which I do not like because it justs make things "magic" while it should be elementary and understandable) fails here because you need information about the second order expansion somewhere, while l'Hopitals rule is just a fancy name for a first order expansion.
A: You can at least guess what the answer should be by computing $f(x) = e - \left( 1 + \frac{1}{x} \right)^x$ for some large values of $x$ and seeing how it behaves. For example, WolframAlpha will tell you that
$$f(10) = 0.125 \dots $$
$$f(100) = 0.0135 \dots $$
$$f(1000) = 0.00137 \dots $$
which suggests that we have $f(x) \sim \frac{C}{x}$ for some constant $C$, in which case the desired limit is $\infty$; $e^x$ grows much faster than $f(x)$ decays. It's actually quite overkill; the limit would still be $\infty$ if we replaced $e^x$ with $x^{1 + \varepsilon}$ for any $\varepsilon > 0$.
There are a couple of different ways to finish the argument from here. The lowest-tech version is probably to restrict to the case that $x$ is a positive integer $n$, then use the binomial theorem to expand
$$\left( 1 + \frac{1}{n} \right)^n = \sum_{k=0}^n {n \choose k} \frac{1}{n^k} = \sum_{k=0}^n \frac{1}{k!} \prod_{i=0}^{k-1} \left( 1 - \frac{i}{n} \right).$$
Since $e = \sum_{k=0}^{\infty} \frac{1}{k!}$ and each term of this series is greater than or equal to the corresponding term of the above series, this gives
$$e - \left( 1 + \frac{1}{n} \right)^n \ge \frac{1}{2n}$$
(considering the difference between the $k = 2$ terms only). Since, as Don says in the comments, $\left( 1 + \frac{1}{x} \right)^x$ is monotonically increasing, this implies a similar bound for all positive real $x$ (alternatively, we can apply the generalized binomial theorem for non-integer exponents), and we're done.
Alternatively, we can argue by writing
$$\ln \left( 1 + \frac{1}{x} \right)^x = x \ln \left( 1 + \frac{1}{x} \right) \le x \left( \frac{1}{x} - \frac{1}{2x^2} + \frac{1}{3x^3} \right)$$
which gives
$$\left( 1 + \frac{1}{x} \right)^x \le \exp \left( 1 - \frac{1}{2x} + \frac{1}{3x^2} \right)$$
and hence
$$e - \left( 1 + \frac{1}{x} \right)^x \ge e \left( 1 - \exp \left( - \frac{1}{2x} + \frac{1}{3x^2} \right) \right)$$
which again is enough to conclude, using for example the inequality $\exp x \le 1 + (e-1)x$ for $x \in [0, 1]$.

Follow-up exercise: Evaluate $\lim_{x \to \infty} x \left( e - \left( 1 + \frac{1}{x} \right)^x \right)$. (This one isn't $\infty$!)

A: In every analysis book there should be a proof of the limit
$$
  \lim_{n\to\infty} \left(1 + \frac{1}{n}\right)^n = e\;,
$$
which will usually take these steps:

*

*show that the sequence $e_n = (1 + 1/n)^n$ is increasing;

*show that the sequence $e_n^* = (1 + 1/n)^{n+1}$ is decreasing;

*$e_n$ converges, since $e_n < e_n^* < e_1^* = 4$.

The number $e$ is normally defined to be $\lim_{n\to\infty} e_n$, but
we also have $e_n^* \to e$, since
$$
  0 < e_n^* - e_n = \frac{e_n^*}{n + 1} < \frac{e_1^*}{n + 1} \to 0
$$
This difference, in fact, gives an error bound for the convergence of
$e_n \to e$:
$$
  E_n = e - e_n < \frac{4}{n+1}
$$
Now, this result is for a sequence but it should be possible to extend
it to a function of real variable. So, for your limit we can say:
$$
 e^x \left[e - \left(1 + \frac{1}{x}\right)^x\right] 
 \asymp \frac{e^x}{x} \to \infty.
$$

Note: by $f(x) \asymp g(x)$ I mean there are constants $x_0,a,b>0$ such
that $a < |f(x)/g(x)| < b\;\; \forall x>x_0$.
A: $$\lim_{x\to\infty}\frac{e-(1+\frac1x)^x}{e^{-x}}\\=\lim_{x\to\infty}\frac{e-e^{x\ln(1+\frac1x)}}{e^{-x}}$$
Applying L'Hopital,
$$\lim_{x\to\infty}\frac{-e^{x\ln(1+\frac1x)}\left(\frac{x}{1+\frac1x}(-\frac1{x^2})+\ln(1+\frac1x)\right)}{-e^{-x}}\\=\lim_{x\to\infty}\frac{(1+\frac1x)^x\left(-\frac1{x+1}+\ln(1+\frac1x)\right)}{e^{-x}}$$
Now, $\lim_{x\to\infty}(1+\frac1x)^x=e$, and on the rest, re-applying L'Hopital,
$$\lim_{x\to\infty}\frac{e\left(\frac1{(x+1)^2}+\frac1{1+\frac1x}(-\frac1{x^2})\right)}{-e^{-x}}\\=\lim_{x\to\infty}-e^{x+1}\left(\frac1{(x+1)^2}-\frac1{x+1}\right)\\=\lim_{x\to\infty}-e^{x+1}\left(\frac{1-x-1}{(x+1)^2}\right)\\=\lim_{x\to\infty}\frac{xe^{x+1}}{(x+1)^2}$$
Applying L'Hopital,
$$\lim_{x\to\infty}\frac{xe^{x+1}+e^{x+1}}{2(x+1)}\\=\lim_{x\to\infty}\frac{e^{x+1}}2=\infty$$
