Show $f-g$ is constant Let $D=\{ z \in \mathbb{C}: |z|<1 \}$ be the open unit disk on the complex plane. Suppose that $f$ and $g$ are complex valued analytic functions on $D$ such that $Re(f(z))=Re(g(z))$ for all $z$ in $D$. Show that $f-g$ is constant on $D$. 
My approach: Let $f(z)=\frac{z-a}{1-\bar az}$ and $g(z)=\frac{z-b}{1-\bar bz}$ 
Then do I show that $f(z)-g(z)$ is constant? Do I have the right approach? Thanks.
 A: Let $h(z) = u(x,y) + iv(x,y)$ be a complex valued analytic function such that $\Re(h(z)) = 0$ for all $z$ in the domain (i.e. $u(x,y) = 0$).
It must be that $\dfrac{\partial u}{\partial x} = \dfrac{\partial v}{\partial y}$ so we can determine that $\dfrac{\partial v}{\partial y} = 0$. Similarly, it must be that $\dfrac{\partial u}{\partial y} = -\dfrac{\partial v}{\partial x}$ so we can determine that $\dfrac{\partial v}{\partial x} = 0$. This implies that $h(z)$ is constant.
So far we know that $\Re(h(z)) = 0$, $\dfrac{\partial v}{\partial x} = 0$ and $\dfrac{\partial v}{\partial y} = 0$.
Suppose that $v(x,y)$ is real valued and defined on a domain $D$. Because $\dfrac{\partial v}{\partial x} = 0$, $v$ remains constant on any horizontal line segment in $D$. Similarly, $v$ is constant along any vertical line that lies in $D$. Because a domain must be open connected by definition, every two points is connected by a polygonal path which can be decomposed into a path of horizontal and vertical line segments. Because of this, the value of $v$ at any two points in $D$ is the same and $v(x,y)$ is constant.
