Show that if $f(z)$ is a continuous function on a domain $D$ such that $f(z)^N$ is analytic for some integer $N$, then $f(z)$ is analytic on $D$.

Show that if $f(z)$ is a continuous function on a domain $D$ such that $f(z)^N$ is analytic for some integer $N$, then $f(z)$ is analytic on $D$.

I had no clue, I was trying to use the facts that zeros of $f(z)^N$ are isolated. So, zeros of $f(z)$ are isolated too. Now do I have to use uniqueness theorem?


If $f(z_0 )\neq 0 $ then $$f'(z_0 ) =\lim_{z\to z_0 } \frac{f(z) -f(z_0 ) } {z- z_0 }=\lim_{z\to z_0 }\frac{1}{N f(z_0 )^{N-1}} \cdot \frac{f(z)^N -f(z_0 )^N}{z-z_0}$$ hence the derivative $f'(z)$ exists on the set $\{z: f(z)\neq 0\}.$ Since $f$ is continuous then $f$ is bounded on any ball but this implies that $f$ can have only removable singularities in points where $f(z)=0.$ Those two facts implies that $f$ is holomorphic.