RealRange - Maple Programming Help

RealRange

represent a real interval

ComplexRange

represent a complex interval

 Calling Sequence RealRange(a,b) ComplexRange($\mathrm{\alpha }$,$\mathrm{\beta }$)

Parameters

 a, b - real numbers, can be $\mathrm{\infty }$, can be Open(a) and/or Open(b) $\mathrm{\alpha }$, $\mathrm{\beta }$ - complex numbers, can be Open($\mathrm{\alpha }$) and/or Open($\mathrm{\beta }$); for ComplexRange, $\mathrm{\alpha }$ and $\mathrm{\beta }$ can also be algebraic expressions

Description

 • RealRange(a, b) represents a real interval, that is, a segment of the real line specified by the values of its two extremes a, b, which can be any two real numbers (possibly $\mathrm{\infty }$) satisfying $a\le b$. The interval is closed, i.e., includes its extremes, unless they are represented by Open(a) (and/or Open(b)), in which case the interval is open with respect to a (and/or b).
 • Similarly ComplexRange($\mathrm{\alpha }$, $\mathrm{\beta }$) represents a complex interval, that is, a rectangle in the complex plane specified by two points $\mathrm{\alpha }$ = a + b I and $\mathrm{\beta }$ = c + d I, where {a, b, c, d} represent real numbers. This complex interval is closed and so includes the four line segments $\left(a,c\right)$, $\left(b,d\right)$ and the other two parallel segments delimiting the rectangle, unless any of its four real extremes $\left\{a,b,c,d\right\}$ is entered like, for instance, Open(a), in which case the interval is "open" with respect to that point. In the presence of more Open extremes the interval may be open with respect to one or more delimiting segments.
 • A rapid picture of what is and what is not included in a given complex range is obtained by converting it to a real range or converting it to a relation - see the examples.
 Note: in Maple, by convention, when you say, for instance, $z\le 1$, it is implicitly assumed that $\mathrm{\Im }\left(z\right)=0$.

Examples

RealRange is a Maple program -- it analyzes the input parameters; ComplexRange is not a program.

In this example, the two endpoints are equal and it simplifies to zero.

 > $\mathrm{RealRange}\left(0,0\right)$
 ${0}$ (1)

Here there is no automatic simplification:

 > $\mathrm{ComplexRange}\left(0,0\right)$
 ${\mathrm{ComplexRange}}{}\left({0}{,}{0}\right)$ (2)

The automatic simplification is triggered after the conversion happens:

 > $\mathrm{convert}\left(,\mathrm{RealRange}\right)$
 ${0}$ (3)

A ComplexRange is an object more general than a RealRange in that it contains it as a particular case. When working with a ComplexRange or its RealRange representation, three typical constructions are used. Note the corresponding notation in the following examples. The conversion (when possible) always returns a sequence of two elements.

Case 1: a ComplexRange is itself an object

 > $\mathrm{CR}≔\mathrm{ComplexRange}\left(-1-I,\mathrm{Open}\left(0\right)+I\right)$
 ${\mathrm{CR}}{≔}{\mathrm{ComplexRange}}{}\left({-}{1}{-}{I}{,}{\mathrm{Open}}{}\left({0}\right){+}{I}\right)$ (4)
 > $\mathrm{convert}\left(\mathrm{CR},\mathrm{RealRange}\right)$
 ${\mathrm{RealRange}}{}\left({-}{1}{,}{\mathrm{Open}}{}\left({0}\right)\right){,}{I}{}{\mathrm{RealRange}}{}\left({-}{1}{,}{1}\right)$ (5)

Case 2: a construction indicating that z has values in some ComplexRange, expressed using the :: operator

 > $z::\mathrm{CR}$
 ${z}{::}\left({\mathrm{ComplexRange}}{}\left({-}{1}{-}{I}{,}{\mathrm{Open}}{}\left({0}\right){+}{I}\right)\right)$ (6)
 > $\mathrm{convert}\left(,\mathrm{RealRange}\right)$
 $\left({\mathrm{ℜ}}{}\left({z}\right)\right){::}\left({\mathrm{RealRange}}{}\left({-}{1}{,}{\mathrm{Open}}{}\left({0}\right)\right)\right){,}\left({\mathrm{ℑ}}{}\left({z}\right)\right){::}\left({\mathrm{RealRange}}{}\left({-}{1}{,}{1}\right)\right)$ (7)

Case 3: a construction indicating that z has values in some ComplexRange, expressed using the in operator

 > $z\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}∈\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{CR}$
 ${z}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{∈}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{ComplexRange}}{}\left({-}{1}{-}{I}{,}{\mathrm{Open}}{}\left({0}\right){+}{I}\right)$ (8)
 > $\mathrm{convert}\left(,\mathrm{RealRange}\right)$
 ${\mathrm{ℜ}}{}\left({z}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{∈}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{RealRange}}{}\left({-}{1}{,}{\mathrm{Open}}{}\left({0}\right)\right){,}{\mathrm{ℑ}}{}\left({z}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{∈}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{RealRange}}{}\left({-}{1}{,}{1}\right)$ (9)

Note that, unlike ComplexRange, RealRange requires numerical arguments, so when the former has not this kind of argument the conversion is not possible.

 > $\mathrm{ComplexRange}\left(\mathrm{α},\mathrm{β}\right)$
 ${\mathrm{ComplexRange}}{}\left({\mathrm{α}}{,}{\mathrm{β}}\right)$ (10)

Without numerical arguments, this cannot be converted:

 > $\mathrm{convert}\left(,\mathrm{RealRange}\right)$
 ${\mathrm{ComplexRange}}{}\left({\mathrm{α}}{,}{\mathrm{β}}\right)$ (11)

Expressing complex and real ranges as relations

 > $\mathrm{CR}≔z\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}∈\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{ComplexRange}\left(-1-I,\mathrm{Open}\left(1\right)+I\right)$
 ${\mathrm{CR}}{≔}{z}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{∈}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{ComplexRange}}{}\left({-}{1}{-}{I}{,}{\mathrm{Open}}{}\left({1}\right){+}{I}\right)$ (12)
 > $\mathrm{convert}\left(\mathrm{CR},\mathrm{relation}\right)$
 ${\mathrm{And}}{}\left({-}{1}{\le }{\mathrm{ℜ}}{}\left({z}\right){,}{\mathrm{ℜ}}{}\left({z}\right){<}{1}{,}{-}{1}{\le }{\mathrm{ℑ}}{}\left({z}\right){,}{\mathrm{ℑ}}{}\left({z}\right){\le }{1}\right)$ (13)
 > $\mathrm{convert}\left(\mathrm{CR},\mathrm{RealRange}\right)$
 ${\mathrm{ℜ}}{}\left({z}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{∈}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{RealRange}}{}\left({-}{1}{,}{\mathrm{Open}}{}\left({1}\right)\right){,}{\mathrm{ℑ}}{}\left({z}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{∈}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{RealRange}}{}\left({-}{1}{,}{1}\right)$ (14)
 > $\mathrm{map}\left(\mathrm{convert},\left[\right],\mathrm{relation}\right)$
 $\left[{\mathrm{And}}{}\left({-}{1}{\le }{\mathrm{ℜ}}{}\left({z}\right){,}{\mathrm{ℜ}}{}\left({z}\right){<}{1}\right){,}{\mathrm{And}}{}\left({-}{1}{\le }{\mathrm{ℑ}}{}\left({z}\right){,}{\mathrm{ℑ}}{}\left({z}\right){\le }{1}\right)\right]$ (15)

ComplexRanges are used for example to express the branch cuts of mathematical functions

 > $\mathrm{FunctionAdvisor}\left(\mathrm{branch_cuts},\mathrm{arccot}\right)$
 $\left[{\mathrm{arccot}}{}\left({z}\right){,}{z}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{∈}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{ComplexRange}}{}\left({-}{\mathrm{∞}}{}{I}{,}{-}{I}\right){,}{z}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{∈}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{ComplexRange}}{}\left({I}{,}{\mathrm{∞}}{}{I}\right)\right]$ (16)

When you input $z<1$ or $z\le 1$, it is implicitly assumed that $\mathrm{\Im }\left(z\right)=0$. This is used to simplify the notation in the output of some conversions. For example,

 > $\mathrm{z_CR}≔z\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}∈\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{ComplexRange}\left(0,1\right)$
 ${\mathrm{z_CR}}{≔}{z}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{∈}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{ComplexRange}}{}\left({0}{,}{1}\right)$ (17)
 > $\mathrm{convert}\left(\mathrm{z_CR},\mathrm{RealRange}\right)$
 ${z}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{∈}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{RealRange}}{}\left({0}{,}{1}\right)$ (18)
 > $\mathrm{convert}\left(\mathrm{z_CR},\mathrm{relation}\right)$
 ${\mathrm{And}}{}\left({0}{\le }{z}{,}{z}{\le }{1}\right)$ (19)
 > $\mathrm{FunctionAdvisor}\left(\mathrm{branch_cuts},\mathrm{arcsin}\right)$
 $\left[{\mathrm{arcsin}}{}\left({z}\right){,}{z}{\le }{-}{1}{,}{1}{\le }{z}\right]$ (20)