Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Say I have the function $f(x) = x \tanh(\pi x) \log (x^2 +a^2)$ where $a$ is some positive real number. Then it seems to be me that Mathematica when given such a Log[] function implicitly puts a branch-cut along the positive imaginary axis starting at $x = ia$.

  • Now if I ask Mathematica to integrate $f(x)$ along some semicircle in the upper half plane parametized as say, $x = A e^{i\phi}$ ($A>a$) for $0 \leq \phi \leq \pi$, then is Mathematica's answer trustworthy?

Like did a large $A$ expansion (Series about $A=\infty$) and found that $xf(x)$ (that would practically be the integrand when converted into a $\phi$ integral), this function asymptotes as, $e^{2i\phi} \log(e^{2i\phi})A^2 + 2A^2 \log(A) + a^2$ (+ terms which go to zero as $A$ goes to infinity). Now on this asymptotic form the $\phi$ is integrable from $0$ to $\pi$ giving a finite answer.

So relying on this Mathematica result can I say that this integral therefore diverges in the large $A$ limit as $ \text{(number)} A^2 + \text{(number)} A^2 \log(A)$ ?


Like for example I chose $a=2$ and it seems to me that on using "NIntegrate" Mathematica says that the integral of this function on a circle centered at $2i$ goes to zero as the radius goes to 0.

Is this correct?

Thinking analytically this seems to be right...

share|improve this question
add comment

1 Answer

The standard built-in logarithm function is defined for complex variables as follows:

Log[z] = Log[Abs[z]] + I Arg[z]

The location of the branch cut is simply caused by the convention that polar angles of z are assumed to be in the range $-\pi$ to $\pi$. This same branch cut is also part of the definition of the built-in Arg function.

Here is a different logarithm function called simply (lower-case) log to which you can supply a polar angle $\sigma$ at which the branch cut is going to be:

Clear[arg, log];
arg[z_, σ_: - Pi] := Arg[z Exp[-I (σ + Pi)]] + σ + Pi;
log[z_, σ_: - Pi] := Log[Abs[z]] + I arg[z, σ]

The first argument is the same as in the usual Log function. The second argument is optional, and if it's omitted then the new function agrees with its built-in counterpart. The default branch cut of the phase angle arg is $\sigma = -\pi$.

To illustrate these branch cut locations, I defined a "convenience function" that plots a function of the complex variable z in a square of side length 6 around the origin:

plot[f_] := Module[
  {fn = f /. z -> x + I y},
  Show[
   ContourPlot[
    Im[fn],
    {x, -3, 3}, {y, -3, 3},
    ContourShading -> Automatic,
    ExclusionsStyle -> Red
    ],
   ContourPlot[
    Re[fn],
    {x, -3, 3}, {y, -3, 3},
    ContourShading -> False,
    ContourStyle -> Blue,
    ExclusionsStyle -> Red
    ],
   FrameLabel -> {"Re(z)", "Im(z)"},
   Background -> Lighter[Orange],
   PlotRangePadding -> 0,
   PlotLabel -> 
    Framed[Grid[{{Style["-", Bold, Blue], 
        "Real part"}, {Style["-", Bold, Gray], "Imaginary part"}}, 
      Alignment -> Left], FrameStyle -> None, Background -> White, 
     RoundingRadius -> 5],
   ImageSize -> 300
   ]
  ]

For example, see the location of the branch cuts (red) rotate from the default to a non-standard direction:

GraphicsRow[{plot[Log[z]],plot[log[z,π/4]]}]

log

But now look at your function, with a = 1 because that constant is irrelevant:

plot[z  Tanh[π z] Log[z^2 + 1]]

branch cuts vertical

Here, the default choice of branch cut of the Log function leads to vertical branch cuts in the complex plane. This means the upper half plane is not a safe place to be integrating in...

Depending on your needs, you could try to change the branch cut location to something else by using the log function with an appropriate choice for $\sigma$.

Here is where the freedom of choice in the function log comes in. Try this:

plot[z  Tanh[Pi z] log[z^2 + 1, 0]]

cuts moved

And as you can see, the branch cuts are now in a different position, no longer cutting through the middle of your integration domain.

share|improve this answer
    
Thanks or this amazing answer - I simply don't know so much Mathematica! Can you say if my conclusions were right that I got using Mathematica about the $A$ dependence and the vanishing of the integral about the branchpoint? –  user6818 9 hours ago
    
In your last plot all the red lines are branch cuts -right? Then you have moved the branchcut along the x-axis? That will complicate matters - because I want to understand via complex analysis what is the behaviour of the integral of the function along the real line - thats the main objective... –  user6818 9 hours ago
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.