Proving a complex function is constant Let $u: \mathbb{R}^2 \to \mathbb{R}$ be a differentiable function. Prove that if the complex function 
$f(x + iy) = u(x,y) + iu(x,y)$
is analytic in $\mathbb{C}$ then it is a constant function.
Answer:
If $f$ is a analytic it satisfies the Cauchy Riemann equations.
So $u_x = u_y$ and $u_x=-u_y$
This can only happen when $u_x$ and $u_y$ are equal $0$.
As the partial derivatives of $f$ are $0$, $f$ must be a constant function.
Is that correct?

Yes.

Another way to think of it: $f(x+iy)=(1+i)u(x,y)$ has range contained in the line $\{t(1+i):t\in\mathbb R\}$, so $f$ is constant by the open mapping theorem, or by Liouville's theorem applied to $\frac{1}{f-1}$.
Or $g(x+iy)=(1+i)^3f(x+iy)=-4u(x,y)$ (or simply $\frac{1}{1+i}f = u$) is real valued, which makes applying the Cauchy-Riemann equations to $g$ a little more immediately show that $g$ is constant.
