I want to show the following:
If $f(z) $ is a continuous function on a connected open subset of the complex plane and $f(z)^2$ is an analytic function, then $f(z)$ is analytic.
Clearly if $f(z) \neq 0$ then $$\frac{f(z+h)-f(z)}{h}=\frac{f(z+h)^2-f(z)^2}{h}.\frac{1}{f(z+h)+f(z)}$$
which shows $f^\prime(z) $ exists if $f(z)\neq0$.
What do I do when $f(z) =0$?