Wolfram Research

Function Repository Resource:

InflectionPoints

Source Notebook

Find the inflection points of a function of one variable

Contributed by: Paco Jain (Wolfram Research)

ResourceFunction["InflectionPoints"][expr, x]

computes the inflection points of the expression expr with respect to variable x.

ResourceFunction["InflectionPoints"][expr, x, "Classify"]

computes the inflection points of the expression expr, along with the properties of these inflection points, with respect to variable x.

Details and Options

Inflection points are returned as a list of rules for the independent variable x. When the "Classify" directive is invoked, inflection points are listed along with properties such as "rising", "falling", "stationary" and "non-stationary".
For functions with a repeating pattern of inflection points, ResourceFunction["InflectionPoints"] returns results in terms of one or more undetermined constants, which can take any integer value.
InflectionPoints takes the option "Domain", which restricts results to include only inflection points within the given numerical range.

Examples

Basic Examples

Find the inflection points of a cubic function:

In[1]:=
func = x^3;
ResourceFunction["InflectionPoints"][func, x]
Out[2]=
In[3]:=
Plot[{func}, {x, -3, 3}, Epilog -> Join[{Red, PointSize@Large}, Point[{#[[2]], func /. #}] & /@ %]]
Out[3]=

Repeat the calculation, classifying the points of discontinuity:

In[4]:=
func = x^3;
ResourceFunction["InflectionPoints"][func, x, "Classify"]
Out[5]=

Find and classify the inflection points of another function:

In[6]:=
func = 1 + 3 x^2 + x^3;
ResourceFunction["InflectionPoints"][func, x, "Classify"]
Out[7]=
In[8]:=
Plot[{func}, {x, -4, 2}, Epilog -> Join[{Red, PointSize@Large}, Point[{#[[2]], func /. #}] & /@ %[[All, 1]]]]
Out[8]=

Find and classify the inflection points of a polynomial function:

In[9]:=
func = (x - 1) (x - 2) (x - 3) (x - 3.2);
ResourceFunction["InflectionPoints"][func, x, "Classify"]
Out[10]=
In[11]:=
Plot[{func}, {x, 0.7, 3.9}, Epilog -> Join[{Red, PointSize@Large}, Point[{#[[2]], func /. #}] & /@ %[[All, 1]]]]
Out[11]=

Find and classify the inflection points of a trigonometric function:

In[12]:=
func = Sin[x];
ResourceFunction["InflectionPoints"][func, x, "Classify"]
Out[13]=
In[14]:=
Plot[{func}, {x, -5, 7}, Epilog -> Join[{Red, PointSize@Large}, Point[{#[[2]], func /. #}] /. C[1] -> 0 & /@ %[[All, 1]]]]
Out[14]=

Options

Find and classify the inflection points of a generic functions using the "Domain" option:

In[15]:=
func = E^Sin[x^3] - 1;
ResourceFunction["InflectionPoints"][func, x, "Classify", "Domain" -> -2 <= x <= 2]
Out[16]=
In[17]:=
Plot[{func}, {x, -2.2, 2.3}, Epilog -> Join[{Red, PointSize@Large}, Point[{#[[2]], func /. #}] & /@ %[[All, 1]]]]
Out[17]=

Properties and Relations

InflectionPoints will sometimes return results in terms of Root objects:

In[18]:=
func = (x^5 + x^9 - x - 1)^3;
infl = ResourceFunction["InflectionPoints"][func, x]
Out[19]=
In[20]:=
Plot[{func}, {x, -1.1, 1.5}, Epilog -> Join[{Red, PointSize@Large}, Point[{#[[2]], func /. #}] /. C[1] -> 1 & /@ %]]
Out[20]=

Applying N to these outputs converts to an ordinary numeric result:

In[21]:=
N[infl]
Out[21]=

For functions with a repeating pattern of inflection points, InflectionPoints returns results in terms of one or more undetermined constants, which can take any integer value:

In[22]:=
func = x + Sin[x];
ResourceFunction["InflectionPoints"][func, x, "Classify"]
Out[23]=
In[24]:=
Plot[{func}, {x, -7, 7}, Epilog -> Join[{Red, PointSize@Large}, Point[{#[[2]], func /. #}] /. C[1] -> 0 & /@ %[[All, 1]]]]
Out[24]=

In[25]:=
func = Sin[x]^3;
ResourceFunction["InflectionPoints"][func, x]
Out[26]=
In[27]:=
Plot[{func}, {x, 0, 15}, Epilog -> Join[{Red, PointSize@Large}, Point[{#[[2]], func /. #}] /. C[1] -> 1 & /@ %]]
Out[27]=

Resource History

See Also

License Information