Proving a function is constant Let $f$ be an analytic function such that $f(z)$ is an element of $\mathbb R$ for all $z$ element of $\mathbb C$. Prove $f$ is constant.
Here's what I have done -
$f(z) = c + i0$, where $c$ is an element of $\mathbb R$
So i have component functions
$u(x,y) = c$, 
$v(x,y) = 0$
The partial derivative $u_x = 0$ and the partial derivative $v_x = 0$
The derivative, $f'(z)$ = $u_x +i v_x$, so I have $f'(z) = 0$
As $f'(z) = 0$ the function must be constant.
Does that seem right? One thing that I noticed when looking at question is that if $f(z)$ is an element of $\mathbb R$ then it is automatically constant...isn't that correct? But I would expect they are looking for more than that in an exam situation...
 A: Solution 1: Let $g(z)=\dfrac{1}{f(z)-i}$. Then $g(z)$ is bounded and entire.
Solution 2: Let $h(z) =e^{i f(z)}$. Then $h(z)$ is entire and $\left| h(z) \right| =1$.
Both solutions rely on Liouville's theorem though....
A: Here is a pedestrian answer: Using the CR differential equations we have
$$f'(z)=v_y(x,y)+i v_x(x,y)\equiv0\qquad(z=x+iy\in\Omega)\ .$$
Given any two points $z_0$, $z_1\in\Omega$ there is a differentiable curve
$$\gamma:\ t\mapsto z(t)\in\Omega\qquad(0\leq t\leq1)$$
with $z(0)=z_0$, $z(1)=z_1$. Consider the auxiliary function $\phi(t):=f\bigl(z(t)\bigr)$. Then $\phi'(t)=f'\bigl(z(t)\bigr)\,\dot z(t)\equiv0$ and therefore
$$f(z_1)-f(z_0)=\phi(1)-\phi(0)=\int_0^1\phi'(t)\ dt=0\ .$$
A: When I was taught the theory of a complex variable, we started with the Cauchy-Riemann equations. Given that the complex part of $f$ vanishes, the partial derivatives of the real part of $f$ vanish. That seems to me to be the elementary approach indicated by the way the question is put.
A: As the image of any non constant analytic map must be open and by open mapping theorem f is constant, I hope $f:\mathbb{C}\rightarrow \mathbb{C}$, a line i.e  homeomorphic to $\mathbb{R}$ in $\mathbb{C}$ is closed set. Or you can argue by picards theorem that image of non constant entire function can omits atmost one complex number. and the most elementarily you start from cauchy riemann equation I am sure i will get both $u$ and $v$ constant and hence f is so by taking $f=u+iv$
