# Complex Analysis Problem: Existence of Single Valued Analytic Function

So I am trying to analyze the following:

Suppose $$z=x+iy$$. Let $$u(x,y)=\ln(x^2+y^2)-\ln[(x+\frac{1}{2})^2+y^2]$$. Does there exist single-valued analytic function whose real part is $$u$$ on the domain $$D=\left\{ z \in \mathbb{C}: 1< |z|<2 \right\}$$.

I am thinking the answer is none since in the first place, $$x^2+y^2=|z|^2$$ which is a case whose derivative may exist only at $$z=0$$ so as a consequence, $$\ln(x^2+y^2)$$ is not analytic and so is $$u$$. Is this incorrect? Do I have to utilize Cauchy-Riemann Eq. or harmonic conjugate/function?(Actually I tried but the math was a mess...)

$$u(x, y) = \ln |z|^2 - \ln \left|z + \frac 12 \right|^2 = \frac 12 \cdot \ln \left| \frac{z}{z+\frac 12}\right|$$ is the real part of a holomorphic function in $$D$$ if and only if there is a holomorphic branch of $$\ln \left( \frac{z}{z+\frac 12}\right)$$ in $$D$$, and that is the case if and only if $$\frac 1z - \frac{1}{z + \frac 12}$$ has an antiderivative in $$D$$, which in turn is equivalent to $$\int_\gamma \left(\frac 1z - \frac{1}{z + \frac 12}\right) \, dz = 0$$ for all closed paths in $$D$$. But $$\frac{1}{2 \pi i}\int_\gamma \left(\frac 1z - \frac{1}{z + \frac 12}\right)\, dz = I(\gamma, 0) - I(\gamma, \frac 12)$$ where $$I$$ is the winding number, and that difference is zero because $$0$$ and $$1/2$$ lie in the same component of $$\Bbb C\setminus D$$.
So $$u$$ is the real part of a holomorphic function in $$D$$.
Alternatively you can show that $$z \mapsto \frac{z}{z+\frac 12}$$ maps $$D$$ to a subset of the right halfplane, where the principal branch $$\operatorname{Log}$$ of the logarithm is defined and holomorphic, so that $$u$$ is the real part of $$\frac 12 \operatorname{Log}\left( \frac{z}{z+\frac 12}\right) \, .$$