return the quadrant of the complex plane where a given complex number is located, or return an Array of random complex numbers in each quadrant
QuadrantNumbers(around = [...], quadrants = [...], listformat, floatingpoint)
any complex number
(optional) list of complex numbers, default value is , so that the returned numbers in each quadrant have absolute value around the numbers indicated in the list
(optional) list of quadrants, default value is [1, 2, 3, 4], so that the returned numbers are in the specified quadrants
(optional) return a list of lists of numbers instead of an Array (the default).
(optional) true or false; whether to return the Array or list of numbers in floating-point notation, obtained by applying evalf to the exact numbers of the intermediate computations. The default is true
The QuadrantNumbers command has two related but different purposes to facilitate numerical experimentation and testing of numerical algorithms. First, if a complex number is passed, it returns a single number identifying the quadrant where the passed number is located. Second purpose: when QuadrantNumbers is called with no arguments, or with any of the optional arguments around = [...], quadrants = [...], it returns an organized Array, with components A1 A2, A3 and A4, of random complex numbers that are located in each of the four quadrants. This is particularly useful for testing the performance of numerical algorithms in different regions of the complex plane.
When the optional argument listformat is passed, the returned numbers will be in a list of four lists instead of an Array, each sublist corresponding to a quadrant.
Within the context of this command, the four quadrants of the complex plane are defined as usual, plus some conventions to locate the axes: the quadrants do not include the starting semi-axis and do include the ending semi-axis. So,
quadrant 1: 0≤x,0<y, so the real positive semi-axis is not included, but the imaginary positive semi-axis is
quadrant 2: x<0,0≤y, so the real negative semi-axis is included, but the imaginary positive semi-axis is not
quadrant 3: x≤0,y<0, so the real negative semi-axis is not included, but the imaginary negative semi-axis is
quadrant 4: 0<x,y≤0 or x=0,y=0, so the real positive semi-axis is included, but the imaginary negative semi-axis is not
The convention for the real positive semi-axis in the fourth quadrant is related to the situation of mathematical functions related to the hypergeometric function that have the branch cut located on the real positive semi-axis and the value of the function there is obtained arriving to the axis from below (i.e. locating the positive real axis in the fourth quadrant).
When no arguments are passed, the Array returned - say it is assigned to A - contains only four complex numbers around the origin, given by A1 A2, A3 and A4. When a list around = [...] is passed, the same organization of numbers per quadrant in A1,A2, ... is returned, and in each Aj there will be numbers with absolute value in between the origin and the absolute value of the first given number, with absolute value equal to the one of the given number, and with absolute value in between the one of the number and the one of the next number. In addition, at the end of the numbers of each quadrant there will be an additional number with absolute value in between the one of the last number and of that number multiplied by Digits/3. All in all, if the list around contains n numbers, there will be n+1 numbers in each quadrant of the returned Array.
When the optional argument quadrants = [...] is passed, the Array of numbers returned is still organized with the structure A1 A2, A3 and A4, but only the Aj where j is one of the quadrants specified will contain numbers and the other ones will be empty lists or arrays.
When the optional argument floatingpoint = false is passed, the returned Array of numbers will contain exact complex numbers of the form ρ⁢ⅇI⁢α instead of the same numbers after applying evalf to them.
Initialization: Load the package and set the display of special functions in output to typeset mathematical notation (textbook notation):
Consider a list of complex number
When doing numerical experimentation, interactively or within a program, it is frequently useful to see in which quadrants are the numbers located; for this purpose you can use QuadrantNumbers
By convention, each quadrant contains the ending semi-axis, not the starting one
To get an Array of four complex numbers around the origin, you can call QuadrantNumbers with no arguments
The four numbers in this array are located in the four quadrants respectively.
Note that each time you call this command it will return different numbers; they are chosen randomly.
To get an Array of complex numbers with absolute value around the number 1 (where various special functions happen to be singular) use
Consider the singularities of the linear differential equation behind the following AppellF4 function as a function of z
F4 ≔ AppellF41, 2, 3, 4, 5, z
Get an Array of exact (not floating-point) complex number around these singularities
Verify that the numbers in each of the Aj arrays are located in the corresponding quadrant:
Note that the absolute values of the numbers in each quadrant are equal or in between the absolute values of the singularities of F4 passed using around. For example, for the numbers in the first quadrant
These numbers are equal or in between the absolute values of the singularities of F4
The MathematicalFunctions[Evalf][QuadrantNumbers] command was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
Download Help Document