I'm writing this mostly for my own benefit, since I'm currently working on the same things.
First, we show that if $h(z)$ is harmonic in a simply connected domain $D$ (a domain being a connected open set, simply connected meaning 'no holes'), then there is $F(z)$ analytic (synonymous with holomorphic; use 'real analytic' for a real-valued funcion) with $\Re F(z) = h(z)$.
As the previous poster pointed out, the first observation is that for harmonic $h(z)$, the function $\psi = \frac{\partial h}{\partial x} - i\frac{\partial h}{\partial y}$ is also harmonic. Again, as mentioned, this follows from the C.R. equations, but one must also note that we have continuity of the partials (there are many examples where the C.R. equations hold, yet the function is not analytic).
Now, since $D$ is simply connected and the function $\psi$ is analytic, it has a primitive in $D$ (simple connectivity is crucial here, as this is where Cauchy's theorem holds). Call this primitive $G(z)$, so
$$G'(z) = \frac{\partial h}{\partial x} - i\frac{\partial h}{\partial y}.\tag{1}$$
But we know that $G$ is analytic, so $G = u+iv$. Thus,
\begin{gather*}
G' = u_x + iv_x = v_y-iu_y
\end{gather*}
Comparing this last equation to (1) (using $u_x+iv_x$ for the first comparison and $v_y-iu_y$ for the second), we find
\begin{gather*}
\Re \frac{\partial G}{\partial x} = \frac{\partial h}{\partial x} = \frac{\partial \Re G}{\partial x} \cr
\Re \frac{\partial G}{\partial y} = \frac{\partial h}{\partial y} = \frac{\partial \Re G}{\partial y}
\end{gather*}
Thus,
\begin{gather*}
\frac{\partial}{\partial x}(\Re G(z) - h(z)) = 0 \cr
\frac{\partial}{\partial y}(\Re G(z) - h(z)) = 0
\end{gather*}
Since $D$ is a connected domain, we must have $h(z) = \Re G(z) + c$, so setting $F(z) = G(z) + c$ gives us $h(z) = \Re F(z)$, as desired.
We now have, given a harmonic function $h$, an analytic function whose real part is $h$. This required some work and wasn't totally trivial; in particular, we needed simple connectivity of the domain. What's important for us is the total converse: given $h(z) = \Re F(z)$ for $F$ analytic, $h$ is harmonic. You can prove this using the Cauchy-Riemann equations
Now, we want to show that the composition of a harmonic function with an analytic one is harmonic. Suppose then $\phi(z)$ is harmonic in $V$, and let $f(z)$ be analytic in $U$ with $f(U) \subset V$. Then $u(f(z))$ is harmonic for $z \in U$.
To prove this, keep in mind that harmonicity is a local property. By the previous result, we have (locally) some function $\varphi(z)$, analytic, such that $\phi(z) = \Re \varphi(z)$. Let then $z_0 \in U$ with $f(z_0) = w_0 \in V$. Then $\varphi(f(z)) = \varphi(w)$ will be analytic for $w$ near $w_0$, so
$$u(f(z)) = \Re \varphi(f(z)). $$
By the total converse, $u(f(z))$ is harmonic for $z$ close enough to $z_0$.
It is common to misunderstand "$u$ is a function of $x$ and $y$" as "$u$ depends on $x$ and $y$". Which leads to errors such as thinking that $u(x,y)=x^2$ is not a function of $x $ and $y$.
Saying that "$u$ is a function of $x$ and $y$" means that the domain of $u$ is the set of ordered pairs $(x,y)$. Informally, $u$ takes two real numbers as inputs, and produces a number as output. To qualify as a function, $u$ must be consistent: if given the same pair $(x,y)$ today and tomorrow, it must give the same output. Other than that, it's free to use the inputs in any way it wants; and that includes not using them at all. For example, $f(x,y)=\sqrt{2}$ is a function which always returns $\sqrt{2}$ as output. It's still a function of $x$ and $y$ -- meaning it takes $x$ and $y$ as inputs -- it just does not use those inputs.
Best Answer
Ok, we define $z = a+ib $, $z = re^{i\theta}$, with $r$ ,$\theta$ its the modulus and argument respectively.
\begin{align*} z^z &= e^{z\log{z}} \\ \end{align*}
We have : \begin{align*} \log{z} &= \log{(re^{i\theta})} \\ &= \log{r} + i\theta \\ \end{align*} Then \begin{align*} z^z &= e^{z\log{z}} \\ &= e^{(a+ib)(\log{r} + i\theta)} \\ &= e^{(a\log{r} -b\theta) + i (a\theta+b\log{r})} \\ &= e^{a\log{r} -b\theta} \big(\cos(a\theta+b\log{r}) + i \sin(a\theta+b\log{r}) \big) \\ \end{align*}