# About how Mathematica understands the branchcuts of the complex logarithm [Part 3] [closed]

One understands that for the function $\log(z^2+a^2)$ Mathematica implicitly puts the branch cuts to be starting at $\pm ia$ and going up/down respectively on the imaginary axis. The phase of this function approaches $i\pi$ on the right and above $ia$ and it approaches $-i\pi$ on the right and below $-ia$.

Now I put in the following sequence of commands,

a = 2; y = 0.0000000001; d = y ;
z = I a + I y + d - I t;

Plot[ Im [ Log[z^2 + a^2] ], {t, 0, 5}]


I am trying to track the imaginary part of the function, Log[z^2 +a^2] as $z$ moves along a straight line parallel to and very close to the branch cuts of this function starting at $z=ia +iy + d$ (at $t=0$) to $z=-ia -iy +d$ (at $t= 2(y+a)$)

One can see that the graph goes to $\pm 2.35619$ at $t=0$ and at $t= 2(y+a)$ - Why?

Shouldn't it be going toward $\pm \pi$ at these two values of $t$? (given that the imaginary part of the function $\log(z^2+a^2)$ approaches $\pm i\pi$ on the right and above/below $\pm ia$)

If I don't set a value for $d$ (the distance from the branchcut) and take the limit of $d \rightarrow 0$ at $t=0$ and $t=2(y+a)$ then Mathematica returns the expected values of $\pm \pi$ - but no matter how small a value of $d$ I fix (now independent of the value of $y$) the graphs still can't show the value of $\pi$ at $t=0$ though it gets the other end right.

-

## closed as off-topic by Jens, Michael E2, MarcoB, ilian, ÖskåAug 9 '15 at 14:06

• The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

It looks like $\pm\pi$ to me. V9.0.1. – Michael E2 Apr 21 '14 at 10:12
@MichaelE2 Thanks. Can you kindly attach the code and the graph that you are seeing? – user6818 Apr 21 '14 at 16:48
I'm voting to close this question as off-topic because the described plot cannot be reproduced with the given code. – Jens Aug 8 '15 at 19:41

a = 2; y = 0.0000000001; d = y;
z = I a + I y + d - I t;

Plot[Im[Log[z^2 + a^2]], {t, -1, 5}, PlotRange -> All,
GridLines -> {None, {-Pi, Pi}}]


Everything looks ok to me, considering that the imaginary part is practically negligible.

Plot[Re[z^2 + a^2], {t, -1, 5}, PlotRange -> All]
Plot[Im[z^2 + a^2], {t, -1, 5}, PlotRange -> All]


-