How to prove that limit of lim (1+x)^(1/x)=e as x approaches 0 ?

We are going to show the following equality:

\[\lim _{x \rightarrow 0}(1+x)^{\frac{1}{x}}=e\]

Firt of all, we definie $u(x)=(1+x)^{\frac{1}{x}}$.

We have:

\[\begin{aligned} \ln u(x)&=\ln (1+x)^{\frac{1}{x}}\\ &=\frac{1}{x} \ln (1+x)=\frac{\ln (1+x)}{x}\\ \end{aligned}\]

Two possibilities to find this limit.

First: L’Hôpital’s rule. L’Hôpital’s rule states that for functions $f$ and $g$ which are differentiable on an open interval $I$ except possibly at a point $c$ contained in $I$, if $\displaystyle\lim_{x \rightarrow c} f(x)=\lim _{x \rightarrow c} g(x)=0$ or $\pm \infty, g^{\prime}(x) \neq 0$ for all $x$ in $I$ with $x \neq c,$ and $\displaystyle\lim _{x \rightarrow c} \frac{f^{\prime}(x)}{g^{\prime}(x)}$ exists, then

\[\lim _{x \rightarrow c} \frac{f(x)}{g(x)}=\lim _{x \rightarrow c} \frac{f^{\prime}(x)}{g^{\prime}(x)}\]

Here $c=0$,$f(x)=\ln (1+x)$, $g(x)=x$. Which gives:

\[\lim _{x \rightarrow 0} \frac{ln(1+x)}{x}=\lim _{x \rightarrow 0} \frac{\displaystyle\frac{1}{1+x}}{1}=1\]

Second: using the definition of the derivative.

\[\begin{aligned} \lim _{x \rightarrow 0} \frac{ln(1+x)}{x}&=\lim _{x \rightarrow 0} \frac{ln(1+x)-ln(1+0)}{x-0} \\ &=\lim _{x \rightarrow 0} \frac{f(x)-f(0)}{x-0}=f^{\prime}(0)=1 \end{aligned}\]

with $f(x)=\ln (1+x)$ and $\displaystyle f^{\prime}(x)=\frac{1}{1+x}$

We have:

\[\begin{aligned} \lim _{x \rightarrow 0}(\ln u(x))&=\lim _{x \rightarrow 0} \frac{\ln (1+x)}{x}=1\\ \exp(\lim _{x \rightarrow 0}(\ln u(x))&=\exp (1)\\ \lim _{x \rightarrow 0}(\exp(\ln u(x))&=e \\ \lim _{x \rightarrow 0}(u(x))&=e \\ \end{aligned}\]

We conclude:

\[\lim _{x \rightarrow 0}(1+x)^{\frac{1}{x}}=e\]