Solution (source code)

= Solution

For $x$ sufficiently close to zero, $1+x>0$. Apply the <mean value theorem> to the <logarithm> between $1$ and $1+x$: there is a point $\xi_x$ between these endpoints with
$$
\frac{\log(1+x)}{x}=\frac1{\xi_x}.
$$
As $x\to0$ from either side, $\xi_x\to1$, so this quotient tends to $1$. The <exponential function> is continuous, and therefore
$$
\boxed{\lim_{x\to0}(1+x)^{1/x}=\lim_{x\to0}\exp\!\left(\frac{\log(1+x)}x\right)=e.}
$$
The hypotheses of the <mean value theorem> hold because $\log t$ is continuous and differentiable for $t>0$, with derivative $1/t$.