type/evenfunc
check for an even function
type/oddfunc
check for an odd function
Calling Sequence
Parameters
Description
Examples
type(f, evenfunc(x))
type(f, oddfunc(x))
f
-
expression, regarded as a function of x
x
name
These procedures test the parity of the expression f, that is, whether it is even or odd, with respect to x.
More precisely, type⁡f⁡x,evenfunc⁡x returns true if Maple can determine that f⁡x−f⁡−x is zero and false otherwise. Maple performs this test by calling Testzero on this difference. If false is returned, that is not a guarantee that f is not even: it may be zero, but if so, Testzero is not strong enough to recognize that the result is zero. Type oddfunc⁡x is determined in a similar way but using the expression f⁡x+f⁡−x.
type⁡x2,evenfunc⁡x
true
type⁡x2⁢y3+2,evenfunc⁡x
type⁡sin⁡x,oddfunc⁡x
type⁡x2x−1,oddfunc⁡x
false
In the following case, f is even, but the default zero testing algorithm does not recognize this.
f≔piecewise⁡x=0,1,1x2
f≔1x=01x2otherwise
type⁡f,evenfunc⁡x
By changing the zero testing algorithm, we can make this return true. By default, Testzero calls Normalizer. In this case, we strengthen Normalizer.
Normalizer≔simplify
See Also
type
Download Help Document