I need to get Mathematica to evaluate the logarithm of a negative real number using the lower branch instead of the upper branch, so that while
In[1]:= Log[3.2]
Out[1]:= 1.16315
I need
In[2]:= Log[-3.2]
Out[2]:= 1.16315 - 3.14159 I
and not
Out[2]:= 1.16315 + 3.14159 I
I have already defined my own function loopLog that does this:
loopLog[x_: NumericQ] = If[Element[x,Reals], Conjugate[Log[x]]];
But I am not able to get it to perform any of the usual simplifications or manipulations using this function. For example, when I want to differentiate loopLog, I get
In[3]:= D[loopLog[x],x]
Out[3]:= If[x \[Element] Reals, Derivative[1][Conjugate][Log[x]]/x]
Instead of the much needed 1/x. What is the cleanest way to define such a logarithm function in Mathematica?

x_: NumericQthis is a pattern that matches anything, but defaults to the symbolNumericQif no argument is given. You surely meantx_?NumericQ– Rojo Dec 26 '12 at 09:46$BranchCutglobal variable that affectsArcTanand the rest as well, even nicer if it could be set to an arbitrary curve. – ssch Dec 26 '12 at 13:14x_?NumericQ– QuantumDot Dec 26 '12 at 17:14Logwith a branch cut along any curve of the form $z = re^{i\theta(r)}$:branchLog[z_, \[Theta]_] := With[{r = Abs[z]}, Log[z/Exp[I \[Theta][r]]] + I \[Theta][r]]. Then forArcTanyou can doExpToTrig[TrigToExp@ArcTan[z] /. Log[z_] -> branchLog[z, \[Theta]]]... – Dec 27 '12 at 05:30