charfcn
characteristic function for expressions and sets
Calling Sequence
Parameters
Description
Examples
charfcn[A](x)
x
-
any algebraic expression
A
specification for a set
The charfcn function is the characteristic function of the "set" A. It is defined to be
charfcnAx={1x⁢∈A0x∉A'charfcnAx' otherwise
The set specification A can be a set, a real numeric, a complex numeric, a real numeric range, a complex numeric range, an arbitrary range, or an expression sequence of any of the previous. The meaning of each one of these is as follows
A can be:
"in" (∈) means:
-----------
--------------------
a set
set membership
a real or complex numeric
equality
a real numeric range, a..b
a≤x≤b
a complex numeric range, a..b
ℜ⁡a≤ℜ⁡x≤ℜ⁡b and ℑ⁡a≤ℑ⁡x≤ℑ⁡b (so a is the bottom left corner, b is the top right corner)
an arbitrary range, a..b
a≤x≤b, as determined by signum⁡0-- note that ℑ⁡a,ℑ⁡b,ℑ⁡x must all evaluate to 0
an expression sequence of any of the above (except set)
"or" of the above conditions
an expression sequence of sets
set membership in the union of the sets
When the specification is a set, the maple function member is used to test set membership, and thus charfcn will always return one of 0 or 1 in this case. In the other cases, charfcn is symbolic, in that it will return unevaluated if the "in" conditions cannot be verified or the specification is not exactly as described above.
Ranges a..b where b<a are treated as empty, and so charfcn will return 0 for all input.
charfcn3,5,9⁡0
0
charfcn3,5,9⁡3
1
charfcn3,5,9⁡x
charfcn3.13..3.16⁡π
charfcn0..3,5..7⁡6
charfcnone,three,two⁡four
charfcnone,three,two⁡two
charfcn1+I..3+2⁢I⁡2+I
charfcn3+I..3+2⁢I,7,π..π2⁡exp⁡y3
charfcn3+I..3+2⁢I,7,π..π2⁡ⅇy3
assume⁡1.1<y,y<1.3
charfcn3+I..−1+2⁢I⁡x
See Also
evalc
member
piecewise
signum
Download Help Document