# All analytic functions are constant?

While reading a book around complex analysis I came across a small theorem:

If $f(z)$ is a real valued, complex variabled, analytic function then it is constant.

## My "Proof"

I started thinking that if this is true then given any complex variabled, complex valued, analytic function $f$ we can see that $$\Re(f), \Im(f)$$

are both real valued, complex variabled, analytic functions thus must be constant and thus $f$ is constant.

Now I know that in reality not all complex valued, complex variabled, analytic functions are constant. But I want to know what is wrong with the "proof".

• $z \mapsto \mathfrak{R}(f)(z)$ is not analytic. See here. – bashfuloctopus Sep 26 '17 at 0:23
• In general if $f$ is analytic $\mathfrak R(f)$ and $\mathfrak I(f)$ are not analytic. But your argument pretends they are, in general. – kimchi lover Sep 26 '17 at 0:23

As others have pointed out, the "proof" is incorrect because the real and imaginary parts of an analytic function are not analytic. In fact, by the theorem you quoted, an analytic function has analytic real and imaginary parts if and only if the original function was constant.

The statement is that if $f(z)$ is a real-valued analytic function, then it is constant.

From the Cauchy-Riemann Equations, with $f(z)=u(x,y)+iv(x,y)$ and $v(x,y)\equiv0$ we have

$$\frac{\partial u(x,y)}{\partial x}=\frac{\partial v(x,y)}{\partial y}=0$$

and

$$\frac{\partial u(x,y)}{\partial y}=-\frac{\partial v(x,y)}{\partial x}=0$$

What can one deduce about $u(x,y)$ if its first partial derivatives vanish?