# Analytic Function In The Complex Plane Which Always Gives Real Values

Let $f$ be a non-constant, complex-valued function which is defined and analytic for all $z$ in the complex plane. Also, $f$ has the additional property that it is always real. To me, such a function seems bizarre and unlikely. Does such a function exist?

• You might want to add the word nonconstant somewhere... – user64687 Aug 6 '14 at 10:45
• Thank you Asal Beag Dubh. I forgot to dismiss the trivial solution. – Asier Calbet Aug 6 '14 at 10:46
• You can use the Cauchy-Riemann equations to prove fairly easily that, if $f$ is defined and analytic for all $z$ in the complex plane, then $f'=0$ on the complex plane. It follows that $f$ must be constant. – Mark McClure Aug 6 '14 at 10:52
• Yes, I see now that I could have easily solved this. Thank you! – Asier Calbet Aug 6 '14 at 10:55

If you can use Liouville's theorem, then $g(z)=\exp(i\,f(z))$ is an entire bounded function and hence constant. This means that $f$ takes values in a discrete set. Since $f$ is continuous, it must be constant.
If you can use the open mapping theorem, then the image of $f$ is not open and so $f$ must be constant.