returns the branch cuts of a given mathematical expression
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 arcsin⁡x, 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: arctan⁡J2⁡z⁢1+z−z3+1, where J2⁡z⁢1+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 fi⁡p⁡z where p⁡z is rational or involve fractional powers of z,
Obtain the branch cuts Cj⁡z of fi⁡z
Set z=i⁢y+x and compute two expressions, R⁡x,y=ℜ⁡p⁡x,y and I⁡x,y=ℑ⁡p⁡x,y
For each Ci⁡p⁡z, set p⁡x,y=R+I⁢i and solve for x,y
Reintroduce z, resulting in algebraic expressions Gk⁡z=... for each cut Cj of fi⁡p⁡z
Take for branch cuts of the given expression the union of the Gk⁡z
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
ⅇz,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
Note that the output of FunctionAdvisor involves local variables, to avoid conflict with the related global variables you may be using. So,
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
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
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
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
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
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:
A classic example in the theory of branch cut calculation is that of Kahan's teardrop:
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 ':'
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:
As an example where a spurious cut is present due to intersection of cuts of different parts of the expression, consider ln⁡1+z, which has a cut from −∞ to -1, and ln⁡z−1 has this cut −∞ to 1, and take their difference:
Computing the cuts of the sub-expressions as mentioned in the Description we arrive at this result and 2D plot of the cuts
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
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,
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". http://opus.bath.ac.uk/32511/
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.
Download Help Document
What kind of issue would you like to report? (Optional)