How do I expand $(1+x)^{1/x}$ for small $x$? The binomial expansion
$$(1+x)^{n} = 1 + nx + \frac{n(n-1)}{2}x^{2}+...$$
didn't work because of the $n$ term being undefined at $x=0$.
Taylor expansion doesn't work either since it too would depends on an undefined $1/x$ term.
How does one do it?
 A: Let's consider the function
$$
f(x)=\begin{cases}
\dfrac{\log(1+x)}{x} & x>-1, x\ne0 \\[6px]
1 & x=0
\end{cases}
$$
Then $f$ is everywhere differentiable and its Taylor expansion at 0 is
$$
f(x)=1-\frac{x}{2}+\frac{x^2}{3}-\frac{x^3}{4}+\dotsb
$$
Now we have $(1+x)^{1/x}=e^{f(x)}$ (with continuous extension at $x=0$), so we can apply the series for $e^x$.
Say we want to find the Taylor expansion up to degree $3$, for simplicity, so we need
$$
\exp\Bigl(1-\frac{x}{2}+\frac{x^2}{3}-\frac{x^3}{4}+o(x^3)\Bigr)
$$
and we get
$$
e\Bigl(1-\frac{x}{2}+\frac{x^2}{3}-\frac{x^3}{4}+\frac{1}{2}\Bigl(-\frac{x}{2}+\frac{x^2}{3}-\frac{x^3}{4}\Bigr)^2+\frac{1}{6}\Bigl(-\frac{x}{2}+\frac{x^2}{3}-\frac{x^3}{4}\Bigr)^3+o(x^3)\Bigr)
$$
and so
$$
e\Bigl(1-\frac{x}{2}+\frac{x^2}{3}-\frac{x^3}{4}+\frac{x^2}{8}-\frac{x^3}{6}-\frac{x^3}{48}+o(x^3)\Bigr)
$$
and, eventually,
$$
(1+x)^{1/x}=e-\frac{ex}{2}+\frac{11ex^2}{24}-\frac{7ex^3}{16}+o(x^3)
$$
A: Binomial expansion whilst taking $n=1/x$ looks fine to me (though not a power series representation). True, your series is technically not defined at $x=0$ but then neither is the function $(1+x)^{1/x}$, but they have a well defined limit.
By Newton's generalized binomial theorem, for nonzero $x\in (-1,1)$, we have
$$(1+x)^{1/x}=1+nx+\frac{n(n-1)}{2!}x^2+\frac{n(n-1)(n-2)}{3!}x^3+...|_{n=1/x}\\
=1+1+\frac{(1-x)}{2!}+\frac{(1-x)(1-2x)}{3!}+...$$
Note that the limit of the LHS as $x\rightarrow 0$ is $e$, while the RHS (second line) evaluated at $x=0$ is a series expansion of $e$.
