# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Compute the regions on which an expression is monotonic

Contributed by:
Wolfram|Alpha Math Team

ResourceFunction["FunctionMonotonicity"][ returns an association of information about where | |

ResourceFunction["FunctionMonotonicity"][ returns a specific property related to whether |

ResourceFunction["FunctionMonotonicity"] expects *f* to be a univariate expression in terms of *x*, similar to what might be entered into Plot.

ResourceFunction["FunctionMonotonicity"] returns regions on which *f* is strictly monotonic—that is, *f* is strictly increasing on an interval *A* if for all {*x*,*y*}∈*A* such that *x*<*y*, it is the case that *f*[*x*]<*f*[*y*].

The input *property* can be any of All, "Increasing", "Decreasing", "Constant", "Regions", "Plot" or "NumberLine", and defaults to "Regions".

Compute the regions on which a curve is increasing, decreasing and constant:

In[1]:= |

Out[1]= |

Show plots as well as the regions:

In[2]:= |

Out[2]= |

FunctionMonotonicity returns strict regions of increasing and decreasing, as can be seen in this piecewise expression:

In[3]:= |

In[4]:= |

Out[4]= |

In[5]:= |

Out[5]= |

Return the "NumberLine" property to visualize the regions directly:

In[6]:= |

Out[6]= |

Or return the "Plot" property to visualize the regions on the plot of the curve:

In[7]:= |

Out[7]= |

Note that a curve can be both increasing and decreasing at a given point:

In[8]:= |

Out[8]= |

In this case, 0 is a member of both the increasing and decreasing regions. To test that this is true against the definition of a curve being strictly increasing for *x*≥0, use Resolve:

In[9]:= |

Out[9]= |

Likewise to test if the curve is decreasing for *x*≤0:

In[10]:= |

Out[10]= |

This work is licensed under a Creative Commons Attribution 4.0 International License