check for an even function
check for an odd function
expression, regarded as a function of x
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.
In the following case, f is even, but the default zero testing algorithm does not recognize this.
f ≔ piecewise⁡x=0,1,1x2
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
Download Help Document