Wolfram Research

Function Repository Resource:

FunctionDiscontinuities

Source Notebook

Compute the discontinuities of a function of a single variable

Contributed by: Wolfram|Alpha Math Team

ResourceFunction["FunctionDiscontinuities"][f,x]

computes the values of x at which f(x) is discontinuous with respect to x.

ResourceFunction["FunctionDiscontinuities"][{f,cond},x]

computes the x for which cond is True and f(x) is discontinuous with respect to x.

ResourceFunction["FunctionDiscontinuities"][,x,"Properties"]

computes points of discontinuity along with related information about each.

Details and Options

FunctionDiscontinuities has the attribute HoldFirst.
FunctionDiscontinuities takes the option “ExcludeRemovableSingularities”, having default value False, that determines whether to exclude removable discontinuities from the result. A function f(x) is said to have a removable discontinuity at a point x=a if the limits of f(x) as xa exists and is independent of the direction in which the limit is taken, but whose value is different from f(a) (which may or may not be defined).

Examples

Basic Examples

Compute the points of discontinuity of a rational function:

In[1]:=
ResourceFunction["FunctionDiscontinuities"][(x - 3)/(x + 4), x]
Out[1]=

Repeat the calculation, classifying the points of discontinuity:

In[2]:=
ResourceFunction[
 "FunctionDiscontinuities"][(x - 3)/(x + 4), x, "Properties"]
Out[2]=

Compute the points of discontinuity of a trigonometric function:

In[3]:=
ResourceFunction["FunctionDiscontinuities"][Tan[x], x]
Out[3]=

Repeat the calculation, classifying the points of discontinuity:

In[4]:=
ResourceFunction["FunctionDiscontinuities"][Tan[x], x, "Properties"]
Out[4]=

Compute the points of discontinuity of a smooth function:

In[5]:=
ResourceFunction["FunctionDiscontinuities"][E^x *Sin[x], x]
Out[5]=

Compute and plot the points of discontinuity of a rational function:

In[6]:=
f[x_] := (-12 - x + x^2)/(8 + 2 x - 5 x^2 + x^3);
ResourceFunction["FunctionDiscontinuities"][f[x], x, "Properties"]
Out[7]=
In[8]:=
Plot[f[x], {x, -5 , 5}, ExclusionsStyle -> {{Red, Dashed}, {PointSize -> 0.02}}]
Out[8]=

Compute and plot the points of discontinuity of a step function:

In[9]:=
f[x_] := HeavisideTheta[x];
ResourceFunction["FunctionDiscontinuities"][f[x], x, "Properties"]
Out[10]=
In[11]:=
Plot[f[x], {x, -5 , 5}, ExclusionsStyle -> {{Red, Dashed}, {PointSize -> 0.02}}]
Out[11]=

Compute and plot the points of discontinuity of a step function:

In[12]:=
f[x_] := Piecewise[{{Sin[x], x < 1}, {Cos[x], x > 1 && x < 3}}, x - 3];
ResourceFunction["FunctionDiscontinuities"][f[x], x, "Properties"]
Out[13]=
In[14]:=
Plot[f[x], {x, -5 , 5}, ExclusionsStyle -> {{Red, Dashed}, {PointSize -> 0.02}}]
Out[14]=

Options

Choose whether to exclude removable singularities:

In[15]:=
f[x_] := (x^3 + 8)/(x^3 + 3 x^2 - 4 x - 12);
Plot[f[x], {x, -5, 5}, ExclusionsStyle -> {{Red, Dashed}, {PointSize -> 0.02}}]
Out[16]=
In[17]:=
ResourceFunction["FunctionDiscontinuities"][f[x], x, "ExcludeRemovableSingularities" -> True]
Out[17]=
In[18]:=
ResourceFunction["FunctionDiscontinuities"][f[x], x, "ExcludeRemovableSingularities" -> False]
Out[18]=

Properties and Relations

FunctionDiscontinuities has the attribute HoldFirst, enabling calculations such as the following:

In[19]:=
ResourceFunction["FunctionDiscontinuities"][x/x, x]
Out[19]=

Possible Issues

Points where a function approaches ±∞ are considered to be points of discontinuity, even if they are technically outside the range of function definition:

In[20]:=
ResourceFunction["FunctionDiscontinuities"][Log[x], x]
Out[20]=

Resource History

See Also

License Information