# Showing if complex function and its conjugate are analytic, then function is constant [duplicate]

Show that if $$f(z)$$ and $$\overline{f(z)}$$ are analytic on domain $$D$$ then $$f(z)=$$ constant.

If I'm understanding this correctly, a complex function and its conjugate should just be reflecting functions on the complex space on the y axis. Then $$f(z)$$ is constant on that one whole function. Is this the right approach? Or is there rather more elegant way to prove it?

Since $$f(z)=u(x, y)+iv(x, y)$$ is analytic, $$\frac{\partial u(x, y)}{\partial x}=\frac{\partial v(x, y)}{\partial y}\tag{1}$$ Since $$\overline{f(z)}=u(x, y)-iv(x, y)$$ is analytic, $$\frac{\partial u(x, y)}{\partial x}=\frac{\partial (-v(x, y))}{\partial y}=-\frac{\partial v(x, y)}{\partial y}\tag{2}$$ By $$(1)$$ and $$(2)$$ $$\frac{\partial u(x, y)}{\partial x}=\frac{\partial v(x, y)}{\partial y}=0$$ $$u$$ is constant with respect to $$x$$ and $$v$$ is constant with respect to $$y$$.
Similarly, since $$f(z)=u(x, y)+iv(x, y)$$ is analytic, $$\frac{\partial u(x, y)}{\partial y}=-\frac{\partial v(x, y)}{\partial x}\tag{3}$$ Since $$\overline{f(z)}=u(x, y)-iv(x, y)$$ is analytic, $$\frac{\partial u(x, y)}{\partial y}=-\frac{\partial (-v(x, y))}{\partial x}=\frac{\partial v(x, y)}{\partial x}\tag{4}$$ By $$(3)$$ and $$(4)$$ $$\frac{\partial u(x, y)}{\partial y}=\frac{\partial v(x, y)}{\partial x}=0$$ $$u$$ is constant with respect to $$y$$ and $$v$$ is constant with respect to $$x$$.
Conclusion, $$f(z)$$ must be constant.