First thing to note is that there is a sign error here in the former equality, the relevance of which will become obvious in a moment. This second is that, by virtue of using the complex logarithm, you've made a choice of branch and consequently cannot expect both terms to evaluate to
log3 as the two
θs differ by a multiple of
2π.
You're right in saying that you need something like the above, and the barrier appears to be arising from a misunderstanding of the principle value of the logarithm. Recall that the p.v. of the logarithm (with your convention of [0,2π) defining "principle" ) is:
Log z=log∣z∣+iArg z, where
0≤Arg z<2π.
This is defined by a branch cut along the
positive real axis, and from this definition it should be obvious that:
Log[2eiθ+1]02π=(log3+2πi)−(log3+0πi)=2πi=0After you correct the sign error above, this is then consistent with the result you obtained using the other circular contour.
One slightly subtle point about the arguments - as a consequence of the branch we've chosen to work with, if
z+ is 'just above' the positive real axis and
z− 'just below' the positive real axis, we have
Arg (z+)=0,Arg (z−)=2π. If you're confused by the fact that
Arg (z−) is
not in the interval of principle arguments, think about what happens to the argument as
θ approaches
2π in the limit - in order to return to an argument of zero, we would have to cross over a discontinuity of the log and this can't happen.
Notice that, when
θ=θ+ is 'just above'
0,
z+=2eiθ++1 is 'close' to
z=3 and 'just above' the real axis i.e.
argz+=0. On the other hand, when
θ=θ− is 'just below'
2π,
z−=2eiθ−+1 is still close to
z=3 but 'just below' it i.e.
argz−=2π.