Function Repository Resource:

FunctionSigns

Source Notebook

Determine the intervals on which a function is positive, negative or zero

Contributed by: Wolfram|Alpha Math Team

ResourceFunction["FunctionSigns"][expr, x]

returns an association of the values of x for which expr is positive, negative or zero.

ResourceFunction["FunctionSigns"][expr, x, prop]

returns a property of expr related to regions where expr is positive, negative or zero.

ResourceFunction["FunctionSigns"][expr, x, {prop1, prop2, }]

returns an Association of the properties propi related to regions where expr is positive, negative or zero.

ResourceFunction["FunctionSigns"][expr, x, All]

includes all available properties.

Details

Available properties are "Positive", "Negative", "Zeros", "Discontinuities", "Regions", "Plot", "NumberLine" and "SignChart"

Examples

Basic Examples (2) 

Find the regions where x2-4 is positive, negative or zero:

In[1]:=
ResourceFunction["FunctionSigns"][x^2 - 4, x]
Out[1]=

Get several representations of information about the sign of x2-4:

In[2]:=
ResourceFunction["FunctionSigns"][x^2 - 4, x, All]
Out[2]=

Scope (4) 

Get a plot of a function colored to correspond to the sign of the output of the function:

In[3]:=
ResourceFunction["FunctionSigns"][(x + 8)^2 (x - 2) + 104, x, "Plot"]
Out[3]=

Get a sign chart that shows the intervals on which a function is positive, negative or zero:

In[4]:=
ResourceFunction["FunctionSigns"][2 x - 8, x, "SignChart"]
Out[4]=

Discontinuities are indicated on the sign chart with vertical dots:

In[5]:=
ResourceFunction["FunctionSigns"][Log[x], x, "SignChart"]
Out[5]=

If there are infinitely many places where a function changes signs, the visual outputs of FunctionSigns display information for an interval surrounding x = 0:

In[6]:=
ResourceFunction["FunctionSigns"][
 Sin[x], x, {"Plot", "NumberLine", "SignChart"}]
Out[6]=

Properties and Relations (1) 

The function SignChart is available as a stand-alone resource function:

In[7]:=
ResourceFunction["SignChart"][x^3, x]
Out[7]=

Publisher

Wolfram|Alpha Math Team

Version History

  • 2.0.0 – 23 March 2023
  • 1.0.0 – 14 October 2022

Related Resources

Author Notes

To view the full source code for FunctionSigns, evaluate the following:

License Information