# Integral of Log(z)

1. Oct 3, 2007

### Milky

1. The problem statement, all variables and given/known data
Use the principal branch of log z to evaluate the integral from -1 to 1 of log(z)dz

2. Relevant equations
log(z) = log(r) + i(theta)

3. The attempt at a solution
I approached this problem as if it were in real variables - which I'm almost sure was not the way to go.

Since the integral of log(z) = zlog(z) - z, I ended up with an answer of -2.

However, I feel as though I'm suppose to do a change of variables for z:
$$z = re^{i\theta}$$
$$dz=ie^{i\theta}d\theta$$
where r=1?? And my new limits are 0 to pi
Not sure where to go from there, and
not sure which is the correct way to go.
Would appreciate any help

Last edited: Oct 3, 2007
2. Oct 3, 2007

### Avodyne

z log(z) - z is correct; now you have to evaluate it at the endpoints, +1 and -1. +1 is easy, but for -1 you need log(-1). This is where that "principal branch" stuff comes in ...

3. Oct 3, 2007

### Hurkyl

Staff Emeritus
And there is another technicality too -- this is an improper integral, so really he should be computing

$$\lim_{r \to 0^-} \int_{-1}^r \log z \, dz + \lim_{r \to 0^+} \int_r^1 \log z \, dz$$

So he has to evaluate at the endpoints and add in the contribution due to the singularity at zero.

4. Oct 3, 2007

### Milky

Okay, so I'm still not sure what to do about log(-1), although I'm sure I can look that up on the web somewhere.
Thanks!

Also, the professor hinted at my using the second way (without having actually looked at the solution I already had which you guys said was correct). Does anyone know how I would approach it that way.

5. Oct 3, 2007

### Hurkyl

Staff Emeritus
log(z) = log(r) + i(theta)?​

6. Oct 3, 2007

### Hurkyl

Staff Emeritus
Well, you still have to do something about the origin, but let's forget that for a second. What's the problem with doing exactly what you said?

7. Oct 4, 2007

### Milky

I guess I would just like to know so I would know how to approach a similar problem using polar form.
The way he explained it to us was as if we were using an upper semi-circle with radius 1, and that would be our way of avoiding the origin. I'm confused about this method.

8. Oct 4, 2007

### futurebird

Hmm.. I got: $$-2 + i\pi$$

Here's what I did (though I'm still learning how to do these.)

Subbing in for z and zdz
$$\int_{-1}^{1}logz dz$$

$$=\int_{\pi}^{0}log(e^{i\theta})ie^{i\theta}d\theta$$

$$=-2 + i\pi$$

But I don't know if that's right.

9. Oct 4, 2007

### futurebird

Can't was use a Parametrization to avoid all of this?

10. Oct 4, 2007

### Hurkyl

Staff Emeritus
I think you mean "Can't we use the (semicircle) contour to avoid all of this?"

The answer, as far as I know, is no. The beautiful theorems of complex analysis generally require, at the very least, that your integrand to be analytic on all the contours of interest.

The idea you are trying to apply here is the fact that semicircle S (oriented counterclockwise) + the diameter (oriented left to right) is a simple closed curve. So if your integrand f(z) is analytic everywhere inside and on this curve, you have:
$$\oint_S f(z) \, dz + \int_{-1}^{1} f(z) \, dz = 0.$$

The problem is that our integrand is not analytic everywhere on our curve, so this theorem doesn't directly apply. You need both the big semicircle of radius 1, and you need a little contour near the origin that skirts around the singularity there.

You might write the integral like this:

$$\int_{-1}^{1} \log z \, dz = \lim_{(a, b) \to (0^-, 0^+)} \int_{-1}^a \log z \, dz + \int_b^1 \log z \, dz$$

and then evaluate the integral by using the big semicircle and a little curve that goes from a to b, but passes above the origin, and always stays within the little semicircle of radius $\max\{a, b\}$.

(You can apply deformation of contour to show that we can assume a = b, and then use an actual semicircle for the little contour)

If you do this, then your integrand is analytic everywhere it needs to be, because we've really and truly avoided the origin.

11. Oct 4, 2007

### futurebird

But with a branch cut, would it be analytic? Say from the origin to infinity through the -y axis?

12. Oct 4, 2007

### Hurkyl

Staff Emeritus
It's certainly not analytic at the origin.

13. Oct 4, 2007

### futurebird

That's why the branch cut starts at the origin and goes to infinity-- that was badly worded on my part.

My answer seems to check out against the formula I found at wolfram.

http://mathworld.wolfram.com/Logarithm.html

$$\int log_bz dz =\frac{z(ln z -1)}{ln b}+C$$

So, I got the right answer but I did it wrong in some way? (won't be the first time) I'm having a hard time understanding why I need to deform it around the origin if it isn't a closed circut. Where is log z not defined on the semicircle in the upper half place witha branch cut on the negative y axis?

Last edited: Oct 4, 2007
14. Oct 4, 2007

### Milky

I've been trying to integrate using integration by parts since last night, but not once have I arrived at the answer -2 + i(pi).
Could you pls explain to me how u integrated it - I think I'm missing something because I'm still getting an answer that contains e

15. Oct 4, 2007

### futurebird

I don't know if I did it right. I was hoping someone here would chime in.

But here is what I did for what it is worth...

$$\int_{-1}^{1}logz dz$$

You see how -1 to 1 became pi to 0? That should make the e^whatever terms go away.
Then you can do it by parts.

$$=\int_{\pi}^{0}log(e^{i\theta})ie^{i\theta}d\theta$$

$$=-2 + i\pi$$

PS. are you at hunter?

16. Oct 4, 2007

### Milky

Yes I'm at Hunter - I just sent you a message asking you the same thing lol.

Okay, I'm still confused... when I do this by parts, my result is (bare with me, I have not yet gotten the hang of the $$thing [e^(i(pi)) [i(pi) - 1] +1 Last edited: Oct 4, 2007 17. Oct 4, 2007 ### futurebird [tex]e^{i\pi}=$$ Come on this one is famous!

18. Oct 4, 2007

### Milky

duuuuh lol thanks

Last edited: Oct 4, 2007
19. Oct 4, 2007

### Dick

You want to take z*ln(z)-z and evaluate between -1 and 1. I.e. first put in z=1 and then subtract the value at z=-1. You're doing it backwards.

20. Oct 4, 2007

### Milky

Is the way we did it in polar form correct?