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. | 
 to
 to  .
.Test a trigonometric function for injectivity:
| In[1]:= | ![ResourceFunction["FunctionJectivity"][Sin[x], x, "Injective"]](https://www.wolframcloud.com/obj/resourcesystem/images/f50/f50aef74-e797-4ada-9535-b4734b731d1d/07d86a757a4a2dbb.png) | 
| Out[2]= |  | 
Test a rational function for injectivity:
| In[3]:= | ![ResourceFunction["FunctionJectivity"][1/x, x, "Injective"]](https://www.wolframcloud.com/obj/resourcesystem/images/f50/f50aef74-e797-4ada-9535-b4734b731d1d/190c6458e81800ae.png) | 
| Out[4]= |  | 
Test a polynomial function for surjectivity:
| In[5]:= | ![ResourceFunction["FunctionJectivity"][x^2 - x, x, "Surjective"]](https://www.wolframcloud.com/obj/resourcesystem/images/f50/f50aef74-e797-4ada-9535-b4734b731d1d/62bbb66728f80257.png) | 
| Out[5]= |  | 
Power functions are both injective and surjective for odd powers:
| In[6]:= | ![func = x^3;
ResourceFunction["FunctionJectivity"][func, x, "Bijective"]](https://www.wolframcloud.com/obj/resourcesystem/images/f50/f50aef74-e797-4ada-9535-b4734b731d1d/5c3ca14c30703661.png) | 
| Out[7]= |  | 
Power functions are neither injective nor surjective for even powers:
| In[8]:= | ![func = x^4;
ResourceFunction["FunctionJectivity"][func, x, "Injective"]](https://www.wolframcloud.com/obj/resourcesystem/images/f50/f50aef74-e797-4ada-9535-b4734b731d1d/08377129f1825363.png) | 
| Out[9]= |  | 
| In[10]:= | ![ResourceFunction["FunctionJectivity"][func, x, "Surjective"]](https://www.wolframcloud.com/obj/resourcesystem/images/f50/f50aef74-e797-4ada-9535-b4734b731d1d/46bddc9b3f2885e0.png) | 
| 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]:= | ![func = x^3 - x;
ResourceFunction["FunctionJectivity"][func, x, "Surjective"]](https://www.wolframcloud.com/obj/resourcesystem/images/f50/f50aef74-e797-4ada-9535-b4734b731d1d/1c5c1dc92578387c.png) | 
| Out[12]= |  | 
Restricting to the domain of positive x, the function is no longer surjective:
| In[13]:= | ![ResourceFunction["FunctionJectivity"][{func, x > 0}, x, "Surjective"]](https://www.wolframcloud.com/obj/resourcesystem/images/f50/f50aef74-e797-4ada-9535-b4734b731d1d/6df3ebdc8ea889d5.png) | 
| 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]:= | ![func = x^2;
ResourceFunction["FunctionJectivity"][func, x, "Injective"]](https://www.wolframcloud.com/obj/resourcesystem/images/f50/f50aef74-e797-4ada-9535-b4734b731d1d/03b32cee5c2d3ca0.png) | 
| Out[15]= |  | 
Test a power function for injectivity when restricted to the domain of positive x:
| In[16]:= | ![ResourceFunction["FunctionJectivity"][{func, x > 0}, x, "Injective"]](https://www.wolframcloud.com/obj/resourcesystem/images/f50/f50aef74-e797-4ada-9535-b4734b731d1d/797e615f9fa39c25.png) | 
| Out[16]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License