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.