Complex analysis vs Real Analysis of $\lim_{x\to0}{x}^{x}$ In attempting to solve $\lim_{x\to0}x^x$, I tried two different approaches. One is to convert $x^x$ into a complex function and solve the limit in $\mathbb{C}$. The other is to take the limit of the points of the dense sets in $\mathbb{R}^{-}$ and $\mathbb{R}^{+}$.
According to this article, $\lim_{x\to0}{x}^{x}$ can be converted into
$\lim_{x\to{0}}|x|^{x}(\cos((2n+1)\pi x)+i\sin((2n+1)\pi x)$ where $n\in\mathbb{N}$ are the branches of complex logarithm.
This leads to $$\lim_{x\to0}{|x|}^{x}\lim_{x\to0}\cos((2n+1)\pi x)+i\lim_{x\to0}|x|^{x}\lim_{x\to0}\sin((2n+1)\pi x)=1$$
So using complex analysis $\lim_{x\to0}{x^x}=1$
However, if we take the points on real axis, where x-values of the complex function of $|x|^{x}(\cos((2n+1)\pi x)+i\sin((2n+1)\pi x)=a+0i$ (see this graph), we have the following domain.  $$\left\{x=\left.-\frac{m}{2k+1}\right|m,k\in\mathbb{N}\right\}\bigcup{\mathbb{R}^{+}}$$ 
Which is divided into
$$x^x=\begin{cases} x^x & x>0\\ |x|^x & x=\left\{ -{2m\over 2k+1}\ |\ m, k \in \Bbb N\right\}\\ -|x|^{x} & x=\left\{ -{2m+1\over 2k+1}\ |\ m, k \in \Bbb N\right\}\ \\ \text{undefined} & x=\left\{ -{2m+1\over 2k}\ |\ m, k \in \Bbb N\right\}\bigcup \left\{\mathbb{R}^{-}\backslash \mathbb{Q}^{-}\right\} \end{cases}$$ 
Since $\left.-\frac{2m+1}{2k+1}\right|m,k \in \mathbb{N}$ and $\left.-\frac{2m}{2k+1}\right|m,k \in \mathbb{N}$ are dense sets; they can approximate arbitrarily close to any  $x\in{\mathbb{R}}^{-}$. Thus a limit can exist if the subsets converge to the same value. 
Hence $\lim_{x\to0}x^x$ exists if 
$$\lim_{\left\{x\in-\frac{2m+1}{2k+1}\right\}\to0^{-}}x^x=\lim_{\left\{x\in-\frac{2m}{2k+1}\right\}\to0^{-}}x^x=\lim_{x\to0^{+}}{x^x}$$
Which is the same as
$$\lim_{x\to0^{-}}-|x|^x=\lim_{x\to0^{-}}|x|^x=\lim_{x\to0^{+}}x^x$$
However this equality fails since $\lim_{x\to0^{-}}-|x|^x=-1$ and the other limit are equal to $1$.
So using real analysis, $\lim_{x\to0}x^x$ does not exist.
I believe that the limit should be the same by real or complex analysis but I am no expert in either feild.
Did I do both approaches correctly? Does my answer depend on which analysis I use?
 A: Before we can start computing $\lim_{x\to0}f(x)$ we have to make sure that $f$ is well defined in a suitable, maybe restricted, neighborhood of $0$. Now powers $a^b$ with arbitrary real (or complex) exponents are bona fide (i.e., without additional explanations) defined only when the base $a$ is a positive real number. In this sense $x^x$ is well defined for $x>0$, and one has $\lim_{x\to0}x^x=\lim_{x\to0}\exp(x\log x)=e^0=1$.
Now it is customary to extend the $\log$ function from the positive real axis ${\mathbb R}_{>0}$ to the slit complex plane ${\mathbb C}':={\mathbb C}\setminus{\mathbb R}_{\leq0}$ by defining the principal value
$${\rm Log}\,z:=\log|z|+i\,{\rm Arg}\,z\ ,$$
whereby $-\pi<{\rm Arg}\,z<\pi$ is the principal value of the polar angle of $z\in{\mathbb C}'$. For $a\in{\mathbb C}'$ and arbitrary $b\in{\mathbb C}$ one then defines
$$a^b:=\exp(b\,{\rm Log}\,a)\ .$$
This definition extends the definition of "general powers" $(a,b)\mapsto a^b$  from ${\mathbb R}_{>0}\times{\mathbb R}$  to ${\mathbb C}'\times{\mathbb C}$. In this way we can consider
$$z^z:=\exp\bigl(z(\log|z|+i\,{\rm Arg}\,z)\bigr)\qquad(z\in{\mathbb C}')\ .\tag{1}$$ While $0\notin{\mathbb C}'$ the origin is certainly a limit point of ${\mathbb C}'$. It is therefore allowed to consider the $\lim_{z\to0}$ in $(1)$. From the well known limit $\lim_{x\to0+}x\log x=0$ it then easily follows that
$$\lim_{z\to 0}\bigl(z(\log|z|+i\,{\rm Arg}\,z)\bigr)=0\ ,$$
so that $\lim_{z\to0}z^z=1$. But note that we have excluded the negative real axis completely from the picture. If $\gamma: \ t\mapsto z(t)$ $(0\leq t<\infty)$ is a suitable spiral then using a continuous argument along $\gamma$ the statement $\lim_{t\to\infty}z(t)^{z(t)}=1$ may fail.
A: In the complex plane $z^z$ is uniquely defined when $z=n\in {\Bbb Z}^*$ (i.e. a non-zero integer) and only for those. 
First note that any two definitions of $w'$ and $w$ of $z^z$ (for $z\neq 0$)
must be related by the existence of some $k\in {\Bbb Z}$ for which:
$$ w' = \exp \; \left(z \; (\log (z) + 2\pi i k)\;\right) =  w e^{2\pi i k z}$$
so $kz\in {\Bbb Z}$ for all $k$ which means $z\in {\Bbb Z}$ (and zero was excluded). For any non-integer value of $z$ the mere definition of $z^z$ relies on your choice of logarithmic branch.
The discussion here is whether there is a unique way of defining it also when $n=0$. The answer is  no in most generality. 
If, however, we approach zero radially then the limit is $1$. 
So the choice of $1$ is favored in some sense...
More precisely, consider a continuous curve
$z: t\in (0,1] \mapsto z(t) \in {\Bbb C}^*$ with $z(1)=1$ and
such that $\lim_{t\rightarrow 0^+} z(t)=0$. Let us also fix a logarithmic branch of $z$ so that $\log(z(1))=0$. This defines uniquely the logarithm  along the curve:
  $$ \log z(t) = \log r(t) + i\,\phi(t) $$
where $\phi(1)=0$, $r(1)=1$, $r>0$ and $r(0^+)=0$.
Then 
  $$ z(t)\log z(t) = r(t) \left(\cos \phi(t) + i \sin \phi(t) \right) \left( \log r(t) + i\,\phi(t)\right) $$
Now $r(t)\log r(t)$ goes to zero as $r(t)\rightarrow 0^+$ so the question is reduced to the study of possible accumulation points of
 $$  r(t) \phi(t) \left( i \cos \phi(t) - \sin \phi(t) \right)  $$
If you consider a ray $z(t)$ that approaches zero (asymptotically) radially then this corresponds to $\phi(t)$ having a limit as $t\rightarrow 0^+$ and then the above expression goes to zero. Thus for any radial limit, or more generally, when $r(t)\phi(t)$ goes to zero, we
have 
$$ \lim_{t \rightarrow 0^+} z(t)^{z(t)} = \exp(0) = 1 $$
You may, on the other hand, choose $\phi(t)$ so that $r(t)\phi(t)$ converges to any real value (or diverges) as $t\rightarrow 0$. You may even (but this is somewhat more lengthy to describe) choose a continuous path $z(t)$ going to zero and
such that $z(t)^{z(t)}$, $0<t\leq 1$ is dense in the complex plane!
