Proving a function is constant under certain conditions 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.
Thanks.   
 A: For 1), as already suggested, use the Open Mapping Theorem: If $f$ is not constant, then it is open. In particular, $f(D)$ is open, and no part of a line is open in $\mathbb C$.
If you wish to avoid the use of the Open Mapping Theorem, the fact that the image of $f=u+iv$ is part of a line is equivalent to: There exist $a,b,c\in\mathbb R$, $(a,b)\ne (0,0)$, such that $au(z)+bv(z)=c$, for all $z\in D$. Thus 
$$
\mathrm{Im}\big(f(z)(b+ia)\big)=\mathrm{Im}\big( (u(z)+iv(z))(b+ia)\big)=au(z)+bv(z)=c,
$$
and thus $f(z)(b+ia)$ is constant, whihc in turn implies that $f$ is constant.
For 2), then $\mathrm{Im}(f^2)=2uv=6$, which implies that $f^2$ is constant, and consequently, $f$ is also constant. 
A: I think this may be in the right direction:
Assume $u(z)v(z)=3$ . Substituting back , we get $f(z)=u(z)+ i(3/v(z))$ (Notice we cannot have $v(z)=0$ , since $u.v=3$).
Now we apply Cauchy-Riemann: 
i)$u_x= v_y= \frac {-3u_y}{u^2} $
ii)$u_y= -v_x = \frac {3u_x}{u^2}$
Now substitute $u_y$ in ii) into i) , to get: $u_x= \frac {-3(3u_x/u^2)}{u^2}=\frac{9u_x}{u^4}$ , and we get, $u_x(1-\frac {9}{u^4})=0$.
Similar argument for $v_x$.
For the second part, we multiply $f(z)$ by $e^{i\theta}$ , so that the line is rotated to the Real axis, and we set $g(z)=e^{i \theta}f(z)$, and let $g(z)=u+i.0$. Since $g(z)$ is analytic, we have:
$u_x= 0=v_y; u_y=0=v_x$, so that $u$ is constant . Then we translate back  to the original  function by the constant $e^{i (-\theta)}$, to get a constant function. 
