QuadrantNumbers - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


MathematicalFunctions[Evalf]

  

QuadrantNumbers

  

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

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

QuadrantNumbers(complex_number)

QuadrantNumbers()

QuadrantNumbers(around = [...], quadrants = [...], listformat, floatingpoint)

Parameters

complex_number

-

any complex number

around

-

(optional) list of complex numbers, default value is [0], so that the returned numbers in each quadrant have absolute value around the numbers indicated in the list

quadrants

-

(optional) list of quadrants, default value is [1, 2, 3, 4], so that the returned numbers are in the specified quadrants

listformat

-

(optional) return a list of lists of numbers instead of an Array (the default).

floatingpoint

-

(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

Description

• 

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: 0x,0<y, so the real positive semi-axis is not included, but the imaginary positive semi-axis is

– 

quadrant 2: x<0,0y, so the real negative semi-axis is included, but the imaginary positive semi-axis is not

– 

quadrant 3: x0,y<0, so the real negative semi-axis is not included, but the imaginary negative semi-axis is

– 

quadrant 4: 0<x,y0 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 ρ&ExponentialE;Iα instead of the same numbers after applying evalf to them.

Examples

  

Initialization: Load the package and set the display of special functions in output to typeset mathematical notation (textbook notation):

withMathematicalFunctions:-Evalf&semi;Typesetting:-EnableTypesetRuleTypesetting:-SpecialFunctionRules&colon;

Add&comma;Evalb&comma;Zoom&comma;QuadrantNumbers&comma;Singularities&comma;GenerateRecurrence&comma;PairwiseSummation

(1)

Consider a list of complex number

L1.104686701+0.9380134212I&comma;1.1646443250.9889247393I&comma;0.8023493481+3.596784532I&comma;1.4514844636.506737839I

L1.104686701+0.9380134212I&comma;1.1646443250.9889247393I&comma;−0.8023493481+3.596784532I&comma;−1.4514844636.506737839I

(2)

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

mapQuadrantNumbers&comma;L

1&comma;4&comma;2&comma;3

(3)

By convention, each quadrant contains the ending semi-axis, not the starting one

mapQuadrantNumbers&comma;0&comma;1&comma;I&comma;1&comma;I

4&comma;4&comma;1&comma;2&comma;3

(4)

To get an Array of four complex numbers around the origin, you can call QuadrantNumbers with no arguments

QuadrantNumbers

0.05953530934+0.7891952948I−0.4512890613+0.6501629407I−0.78947463370.05570878890I0.56038939870.5588715310I

(5)

The four numbers in this array are located in the four quadrants respectively.

mapQuadrantNumbers&comma;

1234

(6)

Note that each time you call this command it will return different numbers;  they are chosen randomly.

QuadrantNumbers

0.5179927666+0.6803576553I−0.8228434075+0.2326623568I−0.14261859090.8431269079I0.80123149340.2987158170I

(7)

To get an Array of complex numbers with absolute value around the number 1 (where various special functions happen to be singular) use

QuadrantNumbersaround=1

0.2283867284+0.1782335157I0.8084325983+0.5885887648I0.7210705780+5.037504451I−0.1604555877+0.2412088062I−0.8604933959+0.5094615938I−1.047232448+4.979929525I−0.17229199810.2329015913I−0.090736635780.9958749233I−1.6853052974.801680949I0.22702810450.1799608946I0.99673205090.08077882542I3.2938072123.879075653I

(8)

Consider the singularities of the linear differential equation behind the following AppellF4 function as a function of z

F4  AppellF41&comma; 2&comma; 3&comma; 4&comma; 5&comma; z

F4F41&comma;2&comma;3&comma;4&comma;5&comma;z

(9)

SSingularitiesF4

S0&comma;625&comma;203&comma;6+25&comma;+I

(10)

Get an Array of exact (not floating-point) complex number around these singularities

AQuadrantNumbersaround=S&comma;floatingpoint=false

A235818355005249999999997786061183355249999999997&ExponentialE;85464007853I499999999994π625&ExponentialE;9949508401I999999999988π45064020311237499999999914935979688175249999999997&ExponentialE;363627416873I999999999988π20&ExponentialE;109656846529I249999999997π34549855081811749999999991+4501449181295249999999997&ExponentialE;170269515793I999999999988π6+25&ExponentialE;74577847373I249999999997π3854209493301249999999997+12847364977675249999999997&ExponentialE;31538302949I90909090908π235818355005249999999997786061183355249999999997&ExponentialE;709905483453I999999999988π625&ExponentialE;84557924477I90909090908π45064020311237499999999914935979688175249999999997&ExponentialE;685586434823I999999999988π20&ExponentialE;144382346049I249999999997π34549855081811749999999991+4501449181295249999999997&ExponentialE;644198178291I999999999988π6+25&ExponentialE;864542897283I999999999988π3854209493301249999999997+12847364977675249999999997&ExponentialE;475073843039I499999999994π235818355005249999999997786061183355249999999997&ExponentialE;341098947853I499999999994π625&ExponentialE;682937339737I999999999988π45064020311237499999999914935979688175249999999997&ExponentialE;234928485965I249999999997π20&ExponentialE;481942387325I499999999994π34549855081811749999999991+4501449181295249999999997&ExponentialE;647736343415I999999999988π6+25&ExponentialE;182546200740I249999999997π3854209493301249999999997+12847364977675249999999997&ExponentialE;15911858460I22727272727π235818355005249999999997786061183355249999999997&ExponentialE;41425258201I499999999994π625&ExponentialE;2798479627I999999999988π45064020311237499999999914935979688175249999999997&ExponentialE;450788311293I999999999988π20&ExponentialE;21319687011I499999999994π34549855081811749999999991+4501449181295249999999997&ExponentialE;86409639356I249999999997π6+25&ExponentialE;82680971566I249999999997π3854209493301249999999997+12847364977675249999999997&ExponentialE;64407666101I499999999994π

(11)

Verify that the numbers in each of the Aj arrays are located in the corresponding quadrant:

mapQuadrantNumbers&comma; A1

1111111

(12)

mapQuadrantNumbers&comma; A2

2222222

(13)

mapQuadrantNumbers&comma; A3

3333333

(14)

mapQuadrantNumbers&comma; A4

4444444

(15)

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

evalfmapabs&comma; A1

0.24019892411.5278640461.5936615966.66666666710.0926919910.4721359526.90787054

(16)

These numbers are equal or in between the absolute values of the singularities of F4

evalfmapabs&comma;S

0.&comma;1.527864046&comma;6.666666667&comma;10.47213595&comma;Float

(17)

Compatibility

• 

The MathematicalFunctions[Evalf][QuadrantNumbers] command was introduced in Maple 2017.

• 

For more information on Maple 2017 changes, see Updates in Maple 2017.

See Also

Appell

DEtools[singularities]

evalb

evalf

Evalf command

Evalf package

FunctionAdvisor

hypergeom

MathematicalFunctions