Taylor expansion of $x^x$ at $x = 0$ 
How can I expand $x^x$ in Taylor series if it isn't defined in $x=0$?

$x^x=e^{x \ln x}$, so when I apply Taylor's formula at $x_0=0$ the first term $f(x_0)$ is not defined, but this is a known formula where the first term is $1$.
How is that possible?
Thank you.
 A: Since $x\ln x\xrightarrow[x\to 0]{} 0$, you can use the expansion of $e^u$ (when $u\to0$) to write
$$
e^{x\ln x} = 1+x\ln x+\frac{x^2\ln^2 x}{2} + o(x^2\ln^2 x)
$$
(and have extra terms if you want; I stopped at order $2$). But that does not follow immediately from Taylor's theorem. (And indeed, Taylor's theorem would only give you a polynomial approximation: here, you get terms involving logarithms.)
A: The right-hand limit of $x^x$ is $\lim_{x \searrow 0} x^x = 1$, so one could either ask about the function $f$ defined to have value $1$ at $0$ and $x^x$ elsewhere where defined, or just use the convention that $0^0 = 1$. In this way, there's no problem with computing the zeroth-order term of the expansion.
On the other hand, for $x > 0$ we have $\frac{d}{dx} (x^x) = (1 + \log x) x^x$, so $\lim_{x \searrow 0} \frac{d}{dx} (x^x) = -\infty$, and hence there is no first-order Taylor approximation to the function.
Now, we can write $x^x = \exp (x \log x)$ and so expand $x^x$ in a series of a slightly different form that converges to $x^x$ for $x \geq 0$, namely,
$$x^x \sim \sum_{k = 0}^{\infty} \frac{1}{k!} (x \log x)^k = 1 + x \log x + \frac{1}{2} x^2 \log^2 x + O(x^3 \log^3 x) .$$
