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.