I am having trouble proving the following two questions about constant functions.
1) If $w=f(z)$ is an analytic function that maps all $z$ in region $D$ to a portion of a line, then $f(z)$ is constant.
2) If $f(z)=u(z)+iv(z)$ is an entire function such that $u(z)v(z)=3$ for all points in the complex plane, then $f$ is constant.
I understand that it is enough to prove that $f(z)$ is locally constant since the domain is a region. I tried using the fact that if the partial derivatives are both $0$, then $f(z)$ is locally constant and hence constant.