evenfunc - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


type/evenfunc

check for an even function

type/oddfunc

check for an odd function

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

type(f, evenfunc(x))

type(f, oddfunc(x))

Parameters

f

-

expression, regarded as a function of x

x

-

name

Description

• 

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.

Examples

> 

type⁡x2,evenfunc⁡x

true

(1)
> 

type⁡x2⁢y3+2,evenfunc⁡x

true

(2)
> 

type⁡sin⁡x,oddfunc⁡x

true

(3)
> 

type⁡x2x−1,oddfunc⁡x

false

(4)

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

(5)
> 

type⁡f,evenfunc⁡x

false

(6)

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

Normalizer≔simplify

(7)
> 

type⁡f,evenfunc⁡x

true

(8)

See Also

type