Assume that $f$ is analytic in a region and that at every point, either $f\,'= 0$ or $f = 0$. Show that $f$ is constant.
My attempt:
$[f^{2}(z)]\,'=2f(z)f\,'(z)≡0$, so it would only be necessary to clear depending on the condition given
Is my reasoning correct?