# How to show that $f-g$ is imaginary constant in $\mathbb{D}$?

How to show that $f-g$ is imaginary constant in $\mathbb{D}$? Let $f$ and $g$ be continuous functions in $\bar{\mathbb{D}}$ and analytic in $\mathbb{D}$. Show that if $\mathfrak{R}f=\mathfrak{R}g$ at $\partial \mathbb{D}$, then $f-g$ is imaginary constant at $\bar{\mathbb{D}}$.

I have found that if $f(z)=z^2$ and $g(z)=z^2-i$, then $\mathfrak{R}f=x^2-y^2=\mathfrak{R}g$ and $f-g=i$, which is imaginary constant $\forall z \in \bar{\mathbb{D}} \subset C$.

-
Hint: $\Re f$, $\Re g$ are harmonic. Use Cauchy-Riemann. – Ayman Hourieh Mar 11 '13 at 12:32
Aynab Hourieh: do you mean that use C-R equations on $u$ and $v$ of function $f=u+iv$? – alvoutila Mar 11 '13 at 12:41

The real part of a holomorphic function is harmonic. So $u = \Re(f-g)$ is harmonic, and equal to zero on the boundary $\partial \mathbb{D}$ of the unit disk. But by the maximum principle for harmonic functions, $u$ must attain its minimum and its maximum on $\partial \mathbb{D}$, meaning $\max u = \min u = 0 \implies u = 0$.
By the Cauchy–Riemann equations, for $v = \Im(f-g)$, you get $\partial v / \partial x = \partial v / \partial y = 0$, hence $v$ is constant and $f-g = iv$ is constant imaginary.
More hint: look at the function $e^{f -g}$