# Moving the location of the branch cut in Mathematica

According to the documentation, Mathematica chooses the branch cut for $\log(z)$ to lie along the negative real axis. It it possible to change this so that it lies along the positive axis or elsewhere in the complex plane?

-
By the way, welcome to Mathematica.SE! Please consider registering your account so that any upvotes you get on this question are added to those you might get on future questions and answers. That way, over time you will be able to do more on the site (post graphics, edit things, etc). –  Sjoerd C. de Vries Nov 18 '12 at 19:16

Let me join the fun and see if I can write my answer without any omissions... both of the previous ones had little errors you can easily check by inverting the newly defined log function myLog, i.e., doing Exp[myLog[...]].

So here is my definition that I just verified:

myLog[z_, θ_: 0] := Log[Abs[z]] + I (Arg[z Exp[I θ]] - θ)


Note that the sign in front of the branch angle θ has to be different in the two places where it appears, so that when you do the inverse the two instances of θ cancel.

-
    myLog[z_, θ_: 0] := Log[Abs[z]] + I (Arg[z Exp[I θ]] + θ)