Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Determine the injectivity and surjectivity of a function
ResourceFunction["FunctionJectivity"][expr,x,"prop"] determines whether expr, viewed as a function of x, has the "jectivity" property "prop". | |
ResourceFunction["FunctionJectivity"][{expr,cond},x,"prop"] determines whether expr has the given property when x is restricted to satisfy the condition cond. |
Test a trigonometric function for injectivity:
In[1]:= | ![]() |
Out[2]= | ![]() |
Test a rational function for injectivity:
In[3]:= | ![]() |
Out[4]= | ![]() |
Test a polynomial function for surjectivity:
In[5]:= | ![]() |
Out[5]= | ![]() |
Power functions are both injective and surjective for odd powers:
In[6]:= | ![]() |
Out[7]= | ![]() |
Power functions are neither injective nor surjective for even powers:
In[8]:= | ![]() |
Out[9]= | ![]() |
In[10]:= | ![]() |
Out[10]= | ![]() |
A function that is surjective (whose image is the set of reals) may not be so when the domain is restricted:
In[11]:= | ![]() |
Out[12]= | ![]() |
Restricting to the domain of positive x, the function is no longer surjective:
In[13]:= | ![]() |
Out[13]= | ![]() |
A function that is not injective (one-to-one) across the full set of reals may become so when the domain is restricted:
In[14]:= | ![]() |
Out[15]= | ![]() |
Test a power function for injectivity when restricted to the domain of positive x:
In[16]:= | ![]() |
Out[16]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License