This is a problem from a previous complex analysis qualifying exam that I'm working through to study for my own upcoming exam.
Problem:
Let $\Omega \subset \mathbb{C}$ be open and simply connected and let $u: \Omega \to \mathbb{R}$ be harmonic on $\Omega$. Let $$ A:= \left\{ z\in\Omega: \frac{\partial u}{\partial x}(z) = \frac{\partial u}{\partial y}(z) = 0\right\} $$
be the set of points where the gradient of $u$ vanishes. If $A$ has an accumulation point in $\Omega$, is it true that $u$ is constant? Fully justify your answer.
Attempt / Current Thoughts:
Let $f(z) = \frac{\partial u}{\partial x}(z)$ and $g(z) = \frac{\partial u}{\partial y}$. If $A$ has an accumulation point on $\Omega$, then since $f=g=0$ on $A\in\Omega$, by the Identity Theorem, $f=g$ on all of $\Omega$. Then $\frac{\partial u}{\partial x} = \frac{\partial u}{\partial y} = 0 \implies u$ is constant on $\Omega$.
That said, to use the Identity Theorem, we need $f$ and $g$ to be analytic. I know that analytic implies harmonic, but not necessarily the other way around. I know that harmonic gives $$ \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} =0, $$
and that $u$ harmonic means there exists a function $h(z) = u(x,y) + iv(x,y)$ that is holomorphic on $\Omega$, but I'm missing how to use this to show that my $f$ and $g$ are analytic.
I'm looking for how to complete this proof, or a different way of doing it.
I think that the following argument should work. We know that there exists a holomorphic function $f: \Omega \to \mathbb{C}$ such that $u = \Re(f)$. Let $f = u+iv$. Since $f$ is holomorphic, it follows that: $$u_1(z) = v_2(z)$$ $$u_2(z) = -v_1(z)$$ It follows that: $$\forall z \in A: f'(z) = 0$$ But now, observe that $f'$ is holomorphic and so, applying the Identity Theorem to $f$', we find that $f' = 0$ on the entirety of $\Omega$. But that implies that $f$ is constant. That is, $u$ is constant.