FunctionAdvisor/branch_cuts - Maple Programming Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : FunctionAdvisor : FunctionAdvisor/branch_cuts


returns the branch cuts of a given mathematical expression


Calling Sequence





Calling Sequence

FunctionAdvisor(branch_cuts, expression, plot = ..., options=value)




literal name; 'branch_cuts'



The name of mathematical function, or a mathematical expression, involving +, *, ^, possibly fractional powers and mathematical functions calls

plot = ...


optional, the right-hand-side can be 2D, 3D or 32D, also 2d', 3d, 32d, to respectively plot the branch cuts in 2D, 3D or 3D projected on the 2D (x, y) plane with black and white contrast

parameters = ...


optional, the right-hand-side can be a set or list of names parametrizing the expression

method = ...


optional, the right hand side can be any of Standard, RealVariables, ComplexVariable to performing intermediate steps solving for the complex variable of for its real and imaginary parts

options = value


optional, any of the options supported by 2D and 3D plots



The FunctionAdvisor(branch_cuts, expression) command returns the branch cuts or segments of discontinuity of a given mathematical expression, if any, or the string "No branch cuts" when there are none. If the information necessary to perform the calculation is not available, FunctionAdvisor returns NULL, depending on the case including informative related messages.


The expression indicated can be just the name of a mathematical function, e.g. arcsin, or a mathematical function call like arcsinx, or a whole mathematical expression, involving compositions between +, *, ^, possibly fractional powers, with every mathematical function call for which FunctionAdvisor knows the branch cuts, with no restrictions to the level of nesting in the expression.


CAVEAT 1: Depending on the mathematical expression, there is a situation where the program cannot guarantee an exhaustive list of branch cuts. This happens, typically, when a non-rational expression needs to be algebraically inverted, and the system can only invert it using RootOf, which means, basically, that the system does not know how many roots are around or exactly where they are located). Example: arctanJ2z1+zz3+1, where J2z1+z is the BesselJ function.


CAVEAT 2: Depending on the mathematical expression, the algebraic cuts returned may contain some spurious cuts in the sense that the expression is actually continuous over the those cuts. You can determine this by visualizing the expression cuts directly, by using the options plot = 3D or  plot = 32D (the spurious cuts are not visualized as discontinuities) and comparing with the 2D plot where these spurious cuts are shown together with the real discontinuities of the expression.


Note: In Maple, by convention, when you say, for instance, z <= 1, it is implicitly assumed that (z) = 0.


Regarding the 3D plots, they are generated with plotcompare, they are centered at the origin, and the options used by default are scale_range = Pi, orientation = [-115, 81, 7], and grid = [200, 200] in order to display the cuts sharply. Depending on the case, centering at the origin may not be appropriate - to override that use the option shift_range explained in plotcompare. Likely, the default value for orientation may not visualize the discontinuities optimally - you can then rotate the plot with the mouse or use the option orientation = [a, b, c] explained in plot3D options. The high value used for grid may slowdown the visualization - to override speeding up use the option grid = [a, b] with smaller values of a and b; typically 50 would suffice. In all cases the array of plots is assigned to the variable _P so that it can be accessed for subsequent manipulation.


The option 32D is as the option 3D but for orientation = [-90, 0, 0], style = surface and shading = zgrayscale, so that the 3D plot is viewed from above, projected over the 2D (x, y) plane, as a smooth surface and with black and white contrast. The resulting visualization is similar to the one obtained using plot = 2D, but it has the advantage that it is free of the spurious cuts mentioned above in CAVEAT 2, and helps visualizing the branch points by contrast (see the last example).


The algebraic calculation is by default performed using the method so-called Standard; other optional choices for method are RealVariables and ComplexVariable. These methods and their limitations are discussed in the reference (at the end). Briefly summarized, given a mathematical expression involving functions fipz where pz is rational or involve fractional powers of z,


Obtain the branch cuts Cjz of fiz


Set z=iy+x and compute two expressions, Rx&comma;y=px&comma;y and Ix&comma;y=px&comma;y


For each Cipz, set px&comma;y=R+Ii and solve for x&comma;y


Reintroduce z, resulting in algebraic expressions Gkz=... for each cut Cj of fipz


Take for branch cuts of the given expression the union of the Gkz


This approach can produce spurious branch cuts due to the denesting of powers at the time of solving for x and y or because of the intersection of cuts of different parts of an expression. Some of these spurious cuts can be detected automatically and are removed before returning the sequence of cuts for the given expression.


The FunctionAdvisor knows about the branch cuts of the mathematical functions in general

FunctionAdvisor(branch_cuts, arcsin);  # so the branch cuts are on the real axis



FunctionAdvisor(branch_points, arcsin);



FunctionAdvisor(branch_cuts, BesselJ);



FunctionAdvisor(branch_cuts, exp);

&ExponentialE;z&comma;No branch cuts


The branch cuts are sometimes compactly expressed in terms of RealRange or ComplexRange; in these cases converting the result to relation may be of help to figure out where the cuts are

FunctionAdvisor(branch_cuts, arccot);



convert((5), relation);



Note that the output of FunctionAdvisor involves local variables, to avoid conflict with the related global variables you may be using. So,

has((5), z);



To have the output using global variables, pass the function call, not just the function's name; you could use any variable, not just z

FunctionAdvisor(branch_cuts, arccot(z));



has((8), z);



You can also plot general mathematical expressions; to have also a plot of the branch_cuts pass use plot = ... where the right-hand-side can be either 2D or 3D




FunctionAdvisor(branch_cuts, (10), plot = 3D);



These 3D plots are constructed with plotcompare using its option expression_plot. You can rotate the two 3D plots above with the mouse; there you see in which of the real or imaginary parts of the expression (10) are the branch cuts located, in this example only in the imaginary part.

A 2D plot of the same cuts

FunctionAdvisor(branch_cuts, (10), plot = 2D);



A similar visualization is obtained viewing the related 3D plot from above, projected over the (x, y) plane, with black and white contrast, using the plot = 32D option

FunctionAdvisor(branch_cuts, (10), plot = 32D);



Each of the plots above can also be rotated with the mouse. The option plot = 32D is particularly useful when there are spurious branch cuts, indistinguishable from the real branch cuts when using plot = 2D.

All the optional arguments of plot (for 2D), plotcompare and plot3D (for 3D) can be used




FunctionAdvisor(branch_cuts, (14), plot = 3D, orientation = [-118, 50, -10]);



FunctionAdvisor(branch_cuts, (14), plot = 2D);



To see how this 2D plot is related to the 3D plot use the option plot = 32D and rotate the plot in the right window using the mouse:

FunctionAdvisor(branch_cuts, (14), plot = 32D);



arctan(z) + arctan(z^2) - arctan(z*(1+z)/(1-z^3));



FunctionAdvisor(branch_cuts, (18), plot = 3D, orientation = [-110, 67, 24]);



2*arccosh((3+2*z)/3) - 2*arccosh((12+5*z)/(3*(z+4)));



FunctionAdvisor(branch_cuts, (20), plot = 3D);



A classic example in the theory of branch cut calculation is that of Kahan's teardrop:

(20) - 2*arccosh(2*(z+3)*sqrt((z+3)/(27*(z+4))));



This expression is equal to zero for all values of z in the complex plane except for a small teardrop shaped region over the negative real axis, as shown in the 3D plot on the right (you can rotate it with the mouse). To see just the plot, without the display of the algebraic description of the cuts, end the input with colon ':'

FunctionAdvisor(branch_cuts, (22), plot = 3D, shift_range = -3, scale_range = 2, orientation = [-124, 20, 14]):

A 2D visualization with black and white contrast obtained viewing the 3D plot from above: change 3D by 32D in the input line above; try rotating this image using the mouse:

FunctionAdvisor(branch_cuts, (22), plot = 32D, shift_range = -3, scale_range = 2):

As an example where a spurious cut is present due to intersection of cuts of different parts of the expression, consider ln1+z, which has a cut from  to -1, and lnz1 has this cut  to 1, and take their difference:

ln(z + 1) - ln(z - 1);



Computing the cuts of the sub-expressions as mentioned in the Description we arrive at this result and 2D plot of the cuts

FunctionAdvisor(branch_cuts, (23), plot = 2D);



So according to this result and plot, there is a cut or discontinuity for this expression from  to 1. Looking at the 3D visualization of the discontinuity, however, we see that it is only from -1 to 1

FunctionAdvisor(branch_cuts, (23), plot = 3D, orientation = [112, 80, 15]):

Another way of removing the spurious cuts from the visualization, also contrasting the branch points at the extremes of the cut, is using the option plot = 32D,

FunctionAdvisor(branch_cuts, (23), plot = 32D):


You can experiment furthermore by rotating the plots above with the mouse.



England M., Bradford R., Davenport J.H., Wilson, D. "Understanding branch cuts of expressions".


Cheb-Terrab, E.S. "The function wizard project: A Computer Algebra Handbook of Special Functions". Proceedings of the Maple Summer Workshop, University of Waterloo, Ontario, Canada, 2002.

See Also

branch points