Compute the complex derivative along horizontal and vertical increments. Along the real direction, ; along the imaginary direction, . Equality gives the Cauchy-Riemann equations
The real and imaginary parts of a holomorphic function are smooth. Equality of their mixed partial derivatives then gives and , proving that both are harmonic functions.
For the first real part, and . The Cauchy-Riemann equations require and , so its harmonic conjugate is . Therefore
For the second real part, is the real part of . Its harmonic conjugate is , giving
These are the most general answers on a connected open domain: the difference of two candidates has zero real part, so the Cauchy-Riemann equations make its imaginary part constant. The second function cannot extend holomorphically through zero.
At a point of complex differentiability, the complex derivative is independent of the direction of approach. Taking increments along the real axis gives ; taking imaginary increments gives . Equality of their real parts and imaginary parts proves the Cauchy-Riemann equations and .
For the specified real part, observe that has exactly that real part. Equivalently, integrating and checking gives
Thus
The freedom is only a constant imaginary part: the difference of two such holomorphic functions has zero real part, so its Cauchy-Riemann equations make it constant on each connected domain.