I'd like to plot expr=Sqrt[(x+I y)^2-1] in the complex plane to see its branch cut. Real part looks like:

Plot3D[Re[Sqrt[(x + I y)^2 - 1]], {x, -2, 2}, {y, -1, 1}]

enter image description here

And imaginary part looks like:

Plot3D[Im[Sqrt[(x + I y)^2 - 1]], {x, -2, 2}, {y, -1, 1}]

enter image description here

In both plots we can see that apart from the expected branch cut along the x-axis in the interval {-1,1} we also get a discontinuity along the y-axis. How to get rid of the y-axis discontinuity and plot the function correctly, with only one branch cut (on the x-axis at {-1,1})?


1 Answer 1


This is based on a mathematical misunderstanding, as explained here. You can't do what you're asking, unless you define the function with a case distinction depending on the real part of z. That is, you can't choose the branch cut of the square root function once and for all, independently of z, to get the plot you are looking for.

The case distinction that's required is this:

f[z_] := Piecewise[{{-Sqrt[z^2 - 1], Re[z] >= 0}, {Sqrt[z^2 - 1], 

Plot3D[Re[f[x + I y]], {x, -2, 2}, {y, -1, 1}, Exclusions -> None, 
 PlotPoints -> 100]


Plot3D[Im[f[x + I y]], {x, -2, 2}, {y, -1, 1}, Exclusions -> None, 
 PlotPoints -> 100]


Here, I also added Exclusions -> None and increased the number of PlotPoints to get a good display.

  • $\begingroup$ The reason I call this a misunderstanding is: there exists no definition of the function Sqrt (with a branch cut in the form of a half-line from the origin in any direction) that makes f[z] equal to Sqrt[z^2-1]. $\endgroup$
    – Jens
    Aug 15, 2016 at 18:20
  • $\begingroup$ +1, but I think you have the Re and Im plots backwards. $\endgroup$
    – user484
    Aug 15, 2016 at 19:06
  • $\begingroup$ @Jens: I think you flipped the images of the real and imaginary parts. $\endgroup$
    – Pirx
    Aug 15, 2016 at 20:05
  • $\begingroup$ @Rahul, Pirx thanks for pointing that out, I swapped the figures... $\endgroup$
    – Jens
    Aug 15, 2016 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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