Artificial intelligent assistant

How do I calculate the limit $\lim_{n\to\infty} [n - \frac{n}{e}(1+\frac{1}{n})^n]$? $L$ = $\lim_{n\to\infty} [n - \frac{n}{e}(1+\frac{1}{n})^n]$ I solved it as follows: $L$ = $\lim_{n\to\infty} [n - \frac{n}{e}(1+\frac{1}{n})^n$] $L$ = $\lim_{n\to\infty} [loge^n - loge^{\frac{n}{e}(1+\frac{1}{n})^n}$] $L$ = $\lim_{n\to\infty} [loge^n - {\frac{1}{e}}{(1+\frac{1}{n})^{n}}loge^n$] $L$ = $\lim_{n\to\infty} loge^n$ \- ${\frac{1}{e}}$$\lim_{n\to\infty}{(1+\frac{1}{n})^{n}}loge^{n}$ $L$ = $\lim_{n\to\infty} loge^n$ \- $\lim_{n\to\infty}loge^{n}$ $L$ = $0$ But, the answer given is $L = 0.5$. Can anyone please tell me where did I go wrong and help me calculate the right answer?

$\infty-\infty$ is indetermonate expression, one has to find this limit carefully, here is one way:

Let $n=1/t$, then $$L=\lim_{t\rightarrow 0} \left(1/t-\frac{1}{et}(1+t)^{1/t}\right),$$

Using the Mclaurin Expansion: $(1+t)^{1/t}=e-et/2+11et^2/24+...$, we get $$L=1/t-\frac{1}{et}(e-et/2+11et^2/24)= \lim_{t\rightarrow 0}( 1/2-11t/24+...)=1/2.$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 4785987e9e4dce88e3dc33c0c9ee9fc9