# Integral of 1/z=log(z), which branch?

1. Jan 2, 2014

### geoduck

Suppose you have the integral:
$$\int^b_{-a}\frac{dx}{x+i\epsilon}$$
where epsilon is a tiny positive number. The integral should be a log shouldn't it?
$$=log[b+i\epsilon]-log[-a+i\epsilon]=log-(log[a]+...)$$

where the ... is 'i' times the angle of the point -a+iε. Doesn't this depend on where you put your branch cut? If your cut goes in the direction of the positive imaginary axis, then the angle is -pi (the angle goes from 0 in the direction of the positive real axis, to pi/2, then it drops discontinuously to -3pi/2 as it crosses the cut). However, if you put your cut on the negative real axis, then the angle is +pi. If you put your cut on the positive real axis, the angle is also +pi.

How do you know which cut to use?

2. Jan 3, 2014

### jackmell

How about we try something? Look at post #10 in this thread:

Then try to apply what Alice does in that post to your problem. If you're successful, you should reach the conclusion there are no branch-cuts when applying the Fundamental Theorem of Calculus to line integrals over multi-valued functions and their antiderivatives.

3. Jan 3, 2014

### vanhees71

To the contrary! How to put the branch cut is essential here, and this is a nice example to show that the integral expression given doesn't make any sense for complex functions. You have to specify the path, because the integral depends on the path and is not determined uniquely by its endpoints.

The reason is that the function is only defined on a multiply connected part of the complex plane, namely $\mathbb{C} \setminus \{\mathrm{i} \epsilon \}$. It's easy to prove that any closed path running counter-clockwise around the pole gives the same result, namlely $2 \pi \mathrm{i}$.

You can make the integral unique, by introducing an arbitrary line starting at the pole and reaching to infinity and then define the integral only for paths not crossing this line. Then the integral obviously only depends on the boundary points of the line, because two different paths in this restricted region never enclose the pole and thus two paths connecting the same line give always the same result for the integral.

In this case each choice of a cut defines a "logarithm function" at a specific branch. Another trick is the idea of the Riemann manifold, where you don't stick to just one branch but tinker all possible branches together, i.e., copying the complex plane infinitely many times and connect these "sheets" together at the cut, such that, whenever you cross the branch cut you enter another sheet.

The usual principal branch of the logarithm function, realized in most implementations on computers (in programming languages like good old FORTRAN or CAs like Mathematica) you define the logarithm by cutting the complex plane along the negative real axis and define
$$\ln z=\int_1^z \mathrm{d} z' \frac{1}{z'},$$
where $z \neq \mathbb{R}_{\leq 0}$ and the path never cutting the negative real axis. With this constraint the integral is uniquely defined only by specifying the initial and end point of the path.

You can calculate the corresponding value of the logarithm explicitly by defining the polar representation of $z \neq \mathbb{R}_{\leq 0}$ as
$$z=|z| \exp(\mathrm{i} \varphi), \quad \varphi \in ]-\pi,\pi.$$
Then the principal branch of the logarithm, defined by the above integral with the specific cut, gives
$$\ln z=\ln(|z|) + \mathrm{i} \varphi,$$
where $\ln(|z|)$ is defined as the usual real logarithm with real values.

4. Jan 3, 2014

### geoduck

Sorry for the confusion. I should have stated the contour. The contour was along the real axis. I understand that if your contour encircles the pole, then you'll get 2pi*i, either by finding the antiderivative and noting that whatever branch cut you choose for log, going in a circle around the branch point will get you 2pi*i, or just doing the integral directly without logs and you'll get 2pi*i.

"You can make the integral unique, by introducing an arbitrary line starting at the pole and reaching to infinity and then define the integral only for paths not crossing this line. Then the integral obviously only depends on the boundary points of the line, because two different paths in this restricted region never enclose the pole and thus two paths connecting the same line give always the same result for the integral."

I don't quite understand this. How can the result of the integral depend on the branch cut of the antiderivative? There is no ambiguity in the the integrand! Choose a path, say the real axis, and you can make unambiguous calculations of what the integrand is at each step. It must be that when taking the antiderivative, something has to tell you which branch you're allowed to choose in order to get the unambiguous result of the integral.

5. Jan 3, 2014

### geoduck

I've plugged in numbers to Mathematica, and the integral along the real axis is the difference of logs between the endpoints, provided you use the principal cut of log.

If you choose your cut for log along the positive imaginary axis though, you don't get the same value for difference between endpoints.

I can just accept that though.

6. Jan 4, 2014

### vanhees71

For sure I didn't explain this issue well enough. It's much easier if you draw these things on a blackboard and use a lot of hand-waving :-).

We consider the function
$$f(z)=\frac{1}{z}$$
which is analytic everywhere in the complex plane except at the origin, where it has a pole of first order.

Now, if you want to define an "antiderivative" you can write
$$F(z)=C_{z_0 \rightarrow z} \mathrm{d} z' \frac{1}{z'},$$
where $C_{z_0 \rightarrow z}$ are paths connecting an arbitrary fixed point $z_0 \neq 0$ with any other $z \neq 0$. Of course the paths must never cross 0 to get a well-defined integral. Each integral is then uniquely defined.

Now you realize that the outcome of $F(z)$ will depend on the choice of the paths (and the fixed point $z_0$). The reason is that the punctuated plane is not simply connected, because any closed curve that encircles the origin cannot be shrunk in a continuous way to a single point without crossing the origin. Thus two choices of curves $C_{z_0 \rightarrow z}$ and $C_{z_0 \rightarrow z}'$ will only lead to the same result if the closed path $C_{z_0 \rightarrow z}-C_{z_0 \rightarrow z}$ do not encircle the origin. Otherwise they differ by an amount of $2 \pi \mathrm{i}$.

You can then avoid this ambiguity by introducing an arbitrary cut, starting at the origin and going to infinity. Usually you choose the negative real axis to define the principal value of the logarithm.

Last but not least be warned concerning mathematica in precisely such cases when it comes to functions with branch cuts. One must carefully check, whether you get really what you want.

If in your problem $a$ and $b$ are (positive) real numbers, and you integrate $1/(z+\mathrm{i} \epsilon)$ along the real axis from $-a$ to $b$, there is no problem. You then have
$$I=\int_{-a}^b \mathrm{d} z \frac{1}{z+\mathrm{i} \epsilon} = \ln(b+\mathrm{i} \epsilon)-\ln(-a+\mathrm{i} \epsilon)$$
uniquely for any logarithm that has no branchcut hitting any of the straight line parallel ot the real axis that is given by $r+\mathrm{i} \epsilon$ with $r \in [-a,b]$, because you can rewrite the integral by subsituting $z'=z+\mathrm{i} \epsilon$ as
$$I=\int_{C} \mathrm{d} z' \frac{1}{z'}$$
with $C$ being given by $z'(t)=t(b+a)-a + \mathrm{i} \epsilon$, $t \in [0,1]$. So in this case Mathematica is correct :-).

Note that you must not combine the two logarithms in the result for the integral into 1 as you could do for purely real integrals!