# Complex logarithm as primitive

#### Rectifier

Gold Member
The problem
I am trying to calculate the integral $$\int_{\gamma} \frac{z}{z^2+4} \ dz$$

Where $\gamma$ is the line segment from $z=2+2i$ to $z=-2-2i$.

The attempt
I would like to solve this problem using substitution and a primitive function to $\frac{1}{u}$. I am not interested in alternative ways of solving this problem right now, thank you for your understanding.

$\int_{\gamma} \frac{z}{z^2+4} \ dz = [u=z^2+4 \, \ \ du = 2z dz] = \\ = \frac{1}{2} \int_{\gamma} \frac{1}{u} \ du = \frac{1}{2} \left[ log(u) \right]_{\gamma}$

$log(u) = ln|u| + iarg(u)$

The trouble is: I am not used to line segments that pass through the origin. I don't now which branch to choose for the argument of the complex logarithm since I was thought that when you make the cuts for the branches you cut out 0 and go to infinity on one of the axes. (Is that perhaps wrong?)

Example:
Principal branch for angles $-\pi<Arg<\pi$

How do I proceed?

#### Attachments

• 1.6 KB Views: 586
Related Calculus and Beyond Homework Help News on Phys.org

#### BvU

Homework Helper
But the path for $u$, does that go through the origin ?

#### Rectifier

Gold Member
Wait, what?

Could you please elaborate a tiny bit more? I think that I almost get it.

EDIT:
Do you mean that $u=z^2+4$ doesn't go through origo or $\frac{1}{z}$ ?

#### BvU

Homework Helper
In the original integral you would express $d{\bf z}\$ as $dx+ idy$.

You change variable from $\bf z$ to $\bf u$

You want to follow a path $\gamma$ so you have to somehow express that in terms of $u$

#### Rectifier

Gold Member
Is it possible to express that without parameterizing the line segment?
You want to follow a path $\gamma$ so you have to somehow express that in terms of $u$

#### Rectifier

Gold Member
I calculated $u=z^2+4$ when $z=2+2i$ goes to $z=-2-2i$ and got that line now goes from $u=4+8i$ to $u=4+8i$. I am not sure how to interpret this.

#### BvU

Homework Helper
Well, you can conlude it's still a straight line ... Going from $u=4+8i$ to $u=4+8i$ indeed, but halfway it is at $u=4+0 i$

#### BvU

Homework Helper
I had to look up a few things to refresh my memory. Liked 26.4 and 29.1 here

#### stevendaryl

Staff Emeritus
If you integrate a function around a closed loop (one that ends up where it started), then you will always get zero unless the loop encloses a singularity. So your loop in $u$ is closed. Does it enclose a singularity?

#### Ray Vickson

Homework Helper
Dearly Missed
The problem
I am trying to calculate the integral $$\int_{\gamma} \frac{z}{z^2+4} \ dz$$

Where $\gamma$ is the line segment from $z=2+2i$ to $z=-2-2i$.

The attempt
I would like to solve this problem using substitution and a primitive function to $\frac{1}{u}$. I am not interested in alternative ways of solving this problem right now, thank you for your understanding.

$\int_{\gamma} \frac{z}{z^2+4} \ dz = [u=z^2+4 \, \ \ du = 2z dz] = \\ = \frac{1}{2} \int_{\gamma} \frac{1}{u} \ du = \frac{1}{2} \left[ log(u) \right]_{\gamma}$

$log(u) = ln|u| + iarg(u)$

The trouble is: I am not used to line segments that pass through the origin. I don't now which branch to choose for the argument of the complex logarithm since I was thought that when you make the cuts for the branches you cut out 0 and go to infinity on one of the axes. (Is that perhaps wrong?)

Example:
Principal branch for angles $-\pi<Arg<\pi$
View attachment 223291

How do I proceed?

Why are you doing it the hard way? Is it not a lot easier to note that on the path from$z = 2 + 2i$ to $z = -2 - 2i$ we have $z = 2+2i - (1+i)t = (1+i)(2-t), 0 \leq t \leq 4?$

#### BvU

Homework Helper
Well Ray, apparently ours is not to reason why
I am not interested in alternative ways of solving this problem right now, thank you for your understanding.

#### Rectifier

Gold Member
Well, you can conlude it's still a straight line ... Going from $u=4+8i$ to $u=4+8i$ indeed, but halfway it is at $u=4+0 i$
How did you get that the value is $u=4+0$ halfway? The halfway point of the line in the beggining is at $z=0 + 0i = 0$. Then I guess you set $z=0$ here: $u=z^2+4$ and got $u=4$

If you integrate a function around a closed loop (one that ends up where it started), then you will always get zero unless the loop encloses a singularity. So your loop in $u$ is closed. Does it enclose a singularity?
Is it a loop or is it a line segment again after the variable substitution? I have figured out that it starts and ends at the same point and that the halfway point is $u=4$. $\frac{1}{u}$ has a pole at u=0 but I am not sure wether the pole is outside or inside the loop since I am not sure how the line segment/loop behaves in between.

So your loop in $u$ is closed. Does it enclose a singularity?
The only thing I could think of is to set $u=0$ here $u=z^2+4$. That way I get $z = \pm 2i$. I interpret this as: when $z = \pm 2i$ then the pole $u=0$ is included, but since the line segment doesn't include either of the values that means that $u=0$ is not inside the loop or on the line segment, right?

So now that (I assume that) the loop/line segment is in the first quadrant I could choose the principal branch without worrying about $u=0$.

#### Rectifier

Gold Member
Why are you doing it the hard way? Is it not a lot easier to note that on the path from$z = 2 + 2i$ to $z = -2 - 2i$ we have $z = 2+2i - (1+i)t = (1+i)(2-t), 0 \leq t \leq 4?$
I already know how to solve this problem that way. Thank you for your suggestion nevertheless.

Trying to solve problems differently highlights errors in my understanding of other concepts in that area. I am not interested in solving problems just to get it right but I would like to learn from my mistakes and my inability to preform certain calculations.

Last edited:

#### FactChecker

Gold Member
2018 Award
Is it a loop or is it a line segment again after the variable substitution? I have figured out that it starts and ends at the same point and that the halfway point is $u=4$. $\frac{1}{u}$ has a pole at u=0 but I am not sure wether the pole is outside or inside the loop since I am not sure how the line segment/loop behaves in between.
The original z path is on radial lines to and from the origin. When z is squared, that becomes a path that goes to the origin along a ray and then back out on the same ray to where it started. Adding 4 just shifts that path. So there is no "loop" except a degenerate one that goes on a line to 4 and turns around to go straight back to where it started. The figure below shows the actual paths with Z and U half way along the path.

#### Attachments

• 4.7 KB Views: 134