Function Repository Resource:

OddFunctionQ

Source Notebook

Determine whether an expression is an odd function of the given variable or variables

Contributed by: Wolfram|Alpha Math Team

ResourceFunction["OddFunctionQ"][expr,x]

returns True if expr is an odd function of x, and returns False otherwise.

ResourceFunction["OddFunctionQ"][expr,{x1,x2,}]

returns True if expr is an odd function under the transformation {x1,x2,}{-x1,-x2,}, and returns False otherwise.

Examples

Basic Examples (13) 

Test whether a basic power function is odd:

In[1]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][x^3, x]
Out[1]=

Test another power function:

In[2]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][x^2, x]
Out[2]=

Test whether a constant function is odd:

In[3]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][1, x]
Out[3]=

Test whether the absolute value function is odd:

In[4]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Abs[x], x]
Out[4]=

Test whether the sine function is odd:

In[5]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Sin[x], x]
Out[5]=

Test whether the cosine function is odd:

In[6]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Cos[x], x]
Out[6]=

Test whether a Gaussian function is odd:

In[7]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Exp[-x^2], x]
Out[7]=

Test a signed Gaussian function:

In[8]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Sign[x] Exp[-x^2], x]
Out[8]=

Test whether a hyperbolic sine function of two variables is odd:

In[9]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Sinh[x + y], {x, y}]
Out[9]=

Test whether the hyperbolic tangent function is odd:

In[10]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Tanh[x], x]
Out[10]=

Test whether the error function is odd:

In[11]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Erf[x], x]
Out[11]=

Test whether a Fresnel integral is odd:

In[12]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][FresnelC[x], x]
Out[12]=

Test whether a shifted Fresnel integral is odd:

In[13]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][FresnelC[x] + 1, x]
Out[13]=

Scope (2) 

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[14]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Cosh[x + y], {x, y}]
Out[14]=
In[15]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Sinh[x + y], {x, y}]
Out[15]=

Find the parity of a function of three variables:

In[16]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Sin[x y z], {x, y, z}]
Out[16]=

Wrapping one of the variables in Abs converts this to an even function:

In[17]:=
ResourceFunction[
 "OddFunctionQ", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Sin[x y Abs[z]], {x, y, z}]
Out[17]=

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

Related Resources

License Information