# Cauchy Riemann Equations for $g(v(x,y))=u(x,y)$.

I have that $f(z)=u(x,y)+iv(x,y)$ for $z=x+iy$ is analytic on an open, connected set $U$. Suppose there is a function $g: \mathbb{R} \longrightarrow \mathbb{R}$ such that $g(v(x,y))=u(x,y)$. Prove that $f$ is a constant function.

I am having trouble applying the Cauchy Riemann equations to the composition of functions above.

-
The Cauchy-Riemann equations imply $$\begin{eqnarray*} \frac{\partial g}{\partial v} \frac{\partial v}{\partial x} &=& \frac{\partial v}{\partial y} \\ \frac{\partial g}{\partial v} \frac{\partial v}{\partial y} &=& -\frac{\partial v}{\partial x}. \end{eqnarray*}$$ Therefore, $$\left[ \left(\frac{\partial g}{\partial v}\right)^2 + 1\right] \frac{\partial v}{\partial y} = 0.$$ But $g(v) \in\mathbb{R}$ and so $\frac{\partial v}{\partial y} = 0$. Use this fact, along with the Cauchy-Riemann equations and the identity $g(v) = u$ to argue $u$ and $v$ are constant functions.