I have just encountered this exercise which has me stumped:
We are asked to prove that if $ f $ is holomorphic on the unit disk $ D $ and if $ f(z) \neq 0 $ on $ D $, that there is a holomorphic function $ g(z) $ on $ D $ such that $ f(z) = e^{g(z)} $. We are also asked to show that if $ D $ is replaced by an arbitrary connected open set, the result may not hold.
In fact, I have no idea where to start. Should I take a complex logarithm and show that it works, is there a straightforward solution here? I see that $ f(z) \neq 0 $ makes a lot of sense as an exponent can never be zero, but other than that I cannot show such a function exists and I also don't see why the unit disk is special as a domain. Any help would be appreciated.
Let $h$ be a primitive of $\frac{f'}f$. Then $e^h/f$ is constant, since$$\left(\frac{e^h}f\right)'=\frac{fh'e^h-f'e^h}{f^2}=0.$$Take $w\in\Bbb C$ such that $e^w=f(0)$ and take $g=h-h(0)+w$. Then $\frac{e^g}f$ is constant and, since both $e^g$ and $f$ map $0$ into $f(0)$, they are identical.
In general, there is no such function. Take $f\colon\Bbb C^*\longrightarrow\Bbb C$ defined by $f(z)=z$. If there was some analytic function $g$ such that $e^g=f$, we would have $g'e^g=f'=1$. In other words, $g'(z)=z^{-1}$. But $z^{-1}$ has no primitive, since$$\oint_{|z|=1}\frac{\mathrm dz}z=2\pi i\ne0.$$