For a positively oriented simple closed contour , with no pole on and with holomorphic inside except at finitely many poles, the residue theorem states
For a more general closed contour, each residue is multiplied by its winding number about the pole.
The powers must be defined using the same branch of the complex logarithm as the numerator. A branch suitable for both requested calculations is
The branch cut is a ray just below the positive real axis, and . Since , the displayed choice of is possible. It includes the required upper half-plane and the sector used below. The origin remains an excluded branch point.
In , all zeros of are
Each is a simple pole, since . Its residue is
The strict inequality matters if a root lies on the negative real axis, which is outside the specified region.
To evaluate the two improper integrals, write them as for the logarithmic numerator and for numerator one, and set , . Use a counterclockwise annular sector with and . It encloses precisely . The outward positive-axis segment contributes in the limit. On the inward segment , the logarithm is and , so that segment contributes .
The small arc is , and the large arc is ; both vanish. These estimates follow from the arc lengths and . The real integrals also converge absolutely at both endpoints for . The residue theorem now gives
After division by , the real and imaginary parts are
Since , . Hence the logarithmic beta integral from a sector contour yields
For the sector angle exceeds . This is why choosing the principal complex logarithm on the whole sector would be invalid; the displaced cut above handles that range as well as .
Use the principal branch of the complex logarithm for . Its branch cut is the ray , , lying below the real axis. Thus it is analytic in the upper half-plane, where the only pole of the integrand is .
Close the real interval by a large upper semicircle. The estimation lemma bounds the arc integral by , so it vanishes. The simple-pole residue is
The residue theorem then gives
For real , . Taking real parts and then using evenness of the real integrand yields
Both endpoints converge: the integrand is near zero and at infinity. This also agrees with the logarithmic parameter integral with Cauchy weight at parameter one.
The derivative of an analytic function must be independent of the direction of approach. Taking a real increment gives ; taking an imaginary increment gives
Equality of real and imaginary parts proves the Cauchy-Riemann equations:
A real harmonic function is a twice continuously differentiable function whose Laplacian vanishes. For the given logarithmic function and ,
It is therefore harmonic everywhere on the punctured complex plane.
On any domain admitting a branch of the complex logarithm, choose
Its derivatives are and , as required. For example, the principal complex logarithm gives such a harmonic conjugate on the plane cut along the negative real axis.
There is no single-valued harmonic conjugate on the whole punctured plane. Indeed its putative differential would satisfy
whereas a globally defined function has zero integral of its differential around a closed curve. This is the log modulus has no global harmonic conjugate on the punctured plane obstruction. Thus the conjugate requested in the question must be interpreted locally or on a cut plane.
For , the number avoids the nonpositive real axis. Define the branch of the complex logarithm by
Here the principal argument is selected as a continuous map on that slit domain, so this is a holomorphic function, with derivative and . For example, locally writing gives , verifying the complex derivative. The normalization also makes this branch of the complex logarithm unique: any two continuous choices differ by a constant integer multiple of on the connected slit domain, and their values at agree.
To evaluate the corresponding analytic branch of a square root on the unit circle, factor
For , we have and . Thus this factorization already uses the selected principal argument, with no hidden change by . It follows that
Halving this expression and applying the exponential function gives
Since , the desired branch value is
For instance, gives , a quick check that the sign agrees with the normalization.