TITLE: Holomorphic function whose domain is open and connected, and whose image is contained in finite union of lines, is constant
QUESTION [2 upvotes]: Let $l_1, \dots, l_m$ lines of $\mathbb{C}$, $\Omega$ an open connected subset of $\mathbb{C}$ and $f\in\mathcal{H}(\Omega)$ ($f$ is holomorphic in $\Omega$) such that $f[\Omega]\subseteq l_1\cup\dots\cup l_m$. Show that $f$ is constant.
Here is my attempt:
For all $i$ let $a_ix+b_iy+c_i=0$ be the equation of the line $l_i$.
Let $f(x+iy)=u(x,y)+iv(x,y)$, where $u, v$ are real functions.
For $x,y\in\mathbb{R}$ there is an $i$ such that $a_iu+b_iv+c_i=0$, so $\prod_{i=1}^m(a_iu+b_iv+c_i)=0$.
So, we have $\prod_{i=1}^m(a_iu+b_iv+c_i)=0$, and by taking partial derivatives over $x$ and $y$ we obtain $\sum_{i=1}^m(a_iu_x+b_iv_x)\prod_{j\neq i}(a_ju+b_jv+c_j)=0$ and $\sum_{i=1}^m(a_iu_y+b_iv_y)\prod_{j\neq i}(a_ju+b_jv+c_j)=0$ respectively, so by Cauchy-Riemann equations we have $u_x=v_y$ and $u_y=-v_x$, so $\sum_{i=1}^m(b_iu_x-a_iv_x)\prod_{j\neq i}(a_ju+b_jv+c_j)=0$.
For $x,y\in\mathbb{R}$ there is an $i$ such that $a_iu+b_iv+c_i=0$, so $(a_iu_x+b_iv_x)\prod_{j\neq i}(a_ju+b_jv+c_j)=0$ and $\sum_{i=1}^m(b_iu_x-a_iv_x)\prod_{j\neq i}(a_ju+b_jv+c_j)=0$. (1) If $\prod_{j\neq i}(a_ju+b_jv+c_j)\neq 0$, then $a_iu_x+b_iv_x=0$ and $b_iu_x-a_iv_x=0$, but $a_i\neq 0$ or $b_i\neq 0$, so that $\left|\begin{array}{cc}a_i&b_i\\b_i&-a_i\end{array}\right|=-(a_i^2+b_i^2)<0$, so $u_x=0$ and $v_x=0$, so $f'(x+iy)=u_x(x,y)+iv_x(x,y)=0$. (2) If $\prod_{j\neq i}(a_ju+b_jv+c_j)=0$, then $f(z)$ lies in $l_i\cap l_j$ for some $j\neq i$, and now I am stuck.
Many people suggest that I use the Open Mapping Theorem, but I do not want to use it because in this exercise I am supposed to only use Cauchy-Riemann equations and at most Maximum Modulus Theorem or Minimum Modulus Theorem.

REPLY [1 votes]: There are only finitely many intersection points among the given lines. If $f(\Omega)$ is contained in the union of these points, then it is easy to see $f$ is constant.
So we may assume there exists a point $a$ in some $l_j\cap f(\Omega)$ whose distance from the other lines is positive. Then we can choose $r>0$ such that $D(a,r)$ intersects only the line $l_j.$ We then have $\omega =f^{-1}(D(a,r))$ nonempty and open in $\Omega.$ So we may choose $b\in \omega$ and $s>0$ such that $D(b,s)\subset \omega.$ We then have $f:D(b,s)\to l_j.$
Now if this $l_j$ was the real axis, you would know what to do: $f$ would be holomorphic and real valued in $D(b,s).$ By the CR equations, $f$ would be constant in $D(b,s).$ So choose $c,d\in \mathbb C$ such that the map $z\to c +dz$ takes $l_j$ to the real axis. It follows then that $c + df(z)$ is constant in $D(b,s),$ which implies $f$ is constant there. By the identity principle, we conclude $f$ is constant in all of $\Omega.$
{"set_name": "stack_exchange", "score": 2, "question_id": 2922888}