Function Repository Resource:

# FunctionParity

Determine the parity of a function, even or odd, with respect to one or more variables

Contributed by: Wolfram|Alpha Math Team
 ResourceFunction["FunctionParity"][expr,x] gives an integer indicating the parity of expr with respect to x, or Undefined. ResourceFunction["FunctionParity"][expr,{x1,x2,…}] gives the overall parity of expr with respect to multiple variables xi.

## Details and Options

ResourceFunction["FunctionParity"] returns one of the following results:
 -1 expr is an odd function of x 1 expr is an even function of x 0 expr is both an even and an odd function of x Undefined none of the above is true
A function is considered even if for all x and is considered odd if .
For a function of multiple variables, parity is determined by its behavior under the transformation {x,y,..}{-x,-y,..}. It is considered even if it maintains its value under this transformation and odd if it changes sign.

## Examples

### Basic Examples (12)

Find the parity of a basic power function:

 In:= Out= Test another power function:

 In:= Out= Show that a constant function has even parity:

 In:= Out= Find the parity of a rational function:

 In:= Out= Find the parity of the absolute value function:

 In:= Out= Find the parity of a trigonometric function:

 In:= Out= Find the parity of a gaussian function:

 In:= Out= Test a signed gaussian function:

 In:= Out= Find the parity of the hyperbolic tangent function:

 In:= Out= Find the parity of the error function:

 In:= Out= Find the parity of a Fresnel integral:

 In:= Out= Find the parity of a shifted Fresnel integral:

 In:= Out= ### Scope (3)

For a function of multiple variables, parity is determined based on the behavior of the function under the transformation {x,y,..}{-x,-y,..}. Find the parity of a function of two variables:

 In:= Out= Find the parity of a function of three variables:

 In:= Out= Wrapping z in Abs converts this to an even function:

 In:= Out= Show that an implicitly-defined circle is even in both x and y:

 In:= Out= ### Properties and Relations (2)

FunctionParity returns Undefined for functions that are neither even nor odd:

 In:= Out= The constant function f(x)=0 is both even and odd:

 In:= Out= ## Publisher

Wolfram|Alpha Math Team

## Version History

• 4.0.0 – 23 March 2023
• 3.0.0 – 01 April 2020
• 2.0.0 – 06 September 2019
• 1.0.0 – 10 July 2019