&Intersect - Maple Help

MathematicalFunctions

 &Intersect
 compute the 'intersection' of regions of the complex plane defined algebraically
 &Minus
 compute the 'set difference' between regions of the complex plane defined algebraically
 &Union
 compute the 'union' between regions of the complex plane defined algebraically

 Calling Sequence &Intersect(A, B, ..., removereim) &Minus(A, B, ..., removereim) &Union(A, B, ..., removereim)

Parameters

 A, B, ... - regions of the complex plane defined algebraically, using equations, inequations, and possibly boolean functions removereim - (optional) passed as the last argument, to replace, when possible, occurrences of $\mathrm{\Re }\left(z\right)$ and $\mathrm{\Im }\left(z\right)$ by algebraic expressions not involving Re or Im.

Description

 • The &Intersect, &Minus, and &Union commands respectively return the intersection, set difference, and union of the regions of the complex plane passed as arguments. As with all infix operators, you can invoke them using the functional form, e.g. &Intersect(A, B), or using the infix form A &Intersect B.
 • In the context of the &Intersect, &Minus and &Union commands, a region of the complex plane is algebraically represented by a single expression, involving relations, RealRanges and ComplexRanges, and possibly nested algebraic expressions representing regions constructed using And, Or, and and or. To determine whether a region is properly represented from the syntactic point of view you can use the type MathematicalFunctions:-Region as explained in the examples. You can also display the type entering TypeTools:-GetType(MathematicalFunctions:-Region).
 • Note that inequations always assume that both sides are real, in that there is no meaning for an inequation between complex objects, in view of their two-dimensional character. So for instance $z\le 0$ is equivalent to $'\mathrm{\Im }\left(z\right)=0\wedge \mathrm{\Re }\left(z\right)\le 0'$, and you may prefer to see the output expressed using the former syntax, without $\mathrm{\Re }$ and $\mathrm{\Im }$. For this purpose, pass the optional argument removereim as the last argument. When using the infix notation, due to the precedence of infix &... operators, you need to enclose the keyword removereim together with the last argument. See the example.

Examples

 > $\mathrm{with}\left(\mathrm{MathematicalFunctions}\right):$

Consider first an easy case, say the two regions consisting of the following two segments of the real axis

 > $\mathrm{R__1},\mathrm{R__2}≔\frac{\mathrm{sqrt}\left(2\right)}{2}
 $\mathrm{R__1}{,}\mathrm{R__2}{≔}\frac{\sqrt{{2}}}{{2}}{<}{x}{,}{1}{<}{x}$ (1)

Verify that ${R}_{1}$, and ${R}_{2}$ are correctly entered regions

 > $\mathrm{map}\left(\mathrm{type},\left[\mathrm{R__1},\mathrm{R__2}\right],\mathrm{MathematicalFunctions}:-\mathrm{Region}\right)$
 $\left[{\mathrm{true}}{,}{\mathrm{true}}\right]$ (2)

For ${R}_{1}$, and ${R}_{2}$ given above, the following results can be verified with ease:

 > $\mathrm{R__1}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&Union\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{R__2}$
 $\frac{\sqrt{{2}}}{{2}}{<}{x}$ (3)
 > $\mathrm{R__1}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&Minus\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{R__2}$
 ${x}{\le }{1}{\wedge }\frac{\sqrt{{2}}}{{2}}{<}{x}$ (4)
 > $\mathrm{R__1}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&Intersect\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{R__2}$
 ${1}{<}{x}$ (5)

The two segments of the real line to the left of -1 and to the right of +1 expressed using Re and Im

 > $\mathrm{R__1},\mathrm{R__2}≔\mathrm{And}\left(\mathrm{\Im }\left(z\right)=0,\mathrm{\Re }\left(z\right)<-1\right),\mathrm{And}\left(\mathrm{\Im }\left(z\right)=0,1<\mathrm{\Re }\left(z\right)\right)$
 $\mathrm{R__1}{,}\mathrm{R__2}{≔}{\mathrm{\Im }}{}\left({z}\right){=}{0}{\wedge }{\mathrm{\Re }}{}\left({z}\right){<}{-1}{,}{\mathrm{\Im }}{}\left({z}\right){=}{0}{\wedge }{1}{<}{\mathrm{\Re }}{}\left({z}\right)$ (6)

The union of ${R}_{1}$ and ${R}_{2}$ is naturally given by

 > $\mathrm{R__1}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}&Union\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{R__2}$
 $\left({\mathrm{\Im }}{}\left({z}\right){=}{0}{\wedge }{1}{<}{\mathrm{\Re }}{}\left({z}\right)\right){\vee }\left({\mathrm{\Im }}{}\left({z}\right){=}{0}{\wedge }{\mathrm{\Re }}{}\left({z}\right){<}{-1}\right)$ (7)

Sometimes the presence of Re or Im clutters the output; in such cases use the option removereim. (Note the parenthesis enclosing removereim after the last argument - this is important in connection with the precedence of infix & operators.)

 > $\mathrm{&Union}\left(\mathrm{R__1},\mathrm{R__2},\mathrm{removereim}\right)$
 ${1}{<}{z}{\vee }{z}{<}{-1}$ (8)
 > 

Compatibility

 • The MathematicalFunctions[&Intersect], MathematicalFunctions[&Minus] and MathematicalFunctions[&Union] commands were introduced in Maple 2015.
 • The removereim option was introduced in Maple 2016.