Suppose is holomorphic on . Suppose we know that . Use the Cauchy-Riemann equations to find all the possible forms of .
(The Cauchy Riemann equations have the following remarkable implication: suppose is holomorphic and we know a formula for . Then we can recover up to a constant; similarly, if we know then we can recover up to a constant. Hence for holomorphic functions, the real part of a function determines the imaginary part up to constants, and vice versa.)