# If analytic $f$ maps into the level set of some $\rho \in C^2(\mathbb{R}^2)$, then $f$ must be constant

Let $\rho$ be a real-valued $C^2$ function on $\mathbb{R}^2$. Define $\Gamma \subset \mathbb{C}$ by $\Gamma = \{x + iy \in \mathbb{C} : \rho(x,y) = 0\}$, and assume that $\nabla \rho$ is nonvanishing on $\Gamma$.

To continue, let $\Omega \subset \mathbb{C}$ be open and connected, and say we are given analytic $f(x + iy) = u(x,y) + iv(x,y)$ on $\Omega$. Prove that if $f(\Omega) \subset \Gamma$, then $f$ must be constant.

Here's what I have so far. In my complex analysis course, we proved the following: if an analytic $f$ in a connected domain $\Omega$ has zero derivative throughout $\Omega$, then $f$ is constant. So I just need to show that, for any $x + iy \in \Omega$, we have $f'(x + iy) = u_x (x, y) + iv_x (x, y) = 0$.

If we view $\Omega$ as subset of $\mathbb{R}^2$ rather than $\mathbb{C}$, we can define the function $g(x, y) = \rho(u(x,y), v(x,y))$ on $\Omega$. This $g$ is identically zero since $f(\Omega) \subset \Gamma$. Using the chain rule, we can then get

$$0 = g_x(x,y) = \rho_x(u(x,y), v(x,y)) u_x(x,y) + \rho_y(u(x,y), v(x,y))v_x(x,y) = \nabla \rho(x,y) \cdot \langle u_x(x,y), v_x(x,y) \rangle.$$

I would like to now conclude that we must have $\langle u_x(x,y), v_x(x,y) \rangle =0$ since $\nabla \rho$ is nonvanishing. But, I do know that the dot product of two nonzero vectors can be zero. So what have I missed? I've noticed that I have not yet used the assumption that $\rho$ has continuous second partial derivatives.

I would like to ask for hints only to this problem, as I would like to write up the final solution and post my answer here.

-

If $f : \Omega \to \mathbb C$ is holomophic and not constant, then it is open and $f(\Omega) \subset \Gamma$ is an open set in $\mathbb C$. This is not possible because $\Gamma$ has empty interior.

-