Wolfram Research

Function Repository Resource:

Asymptotes

Source Notebook

Compute the asymptotes to a given curve in two dimensions

Contributed by: Wolfram|Alpha Math Team

ResourceFunction["Asymptotes"][expr,x,y]

finds the asymptotes of the expression expr in terms of independent variable x and dependent variable y.

ResourceFunction["Asymptotes"][expr,x,y,type]

finds the asymptotes of expr whose type matches the string argument type.

Details and Options

When called with three arguments, ResourceFunction["Asymptotes"] returns an association whose keys are among the following asymptote types: "Horizontal", "Vertical", "Oblique", "Parabolic" or "Other", and whose values are lists of asymptotes of the given type.
If a type is given as a fourth argument to ResourceFunction["Asymptotes"], the result is a list of asymptotes of the specified type. Acceptable values for type are "Horizontal", "Vertical", "Oblique", "Parabolic", "Other" or All.
The first argument to ResourceFunction["Asymptotes"] can be either an expression involving x alone, specifying the curve y(x) ==expr, or an equation involving both x and y.
ResourceFunction["Asymptotes"] takes the option SingleStepTimeConstraint, which specifies the maximum time (in seconds) to spend on an individual internal step of the calculation. The default value of SingleStepTimeConstraint is 5.

Examples

Basic Examples

Compute the asymptotes of a decaying exponential:

In[1]:=
ResourceFunction["Asymptotes"][Exp[-x] + 8, x, y]
Out[1]=
In[2]:=
Plot[{Exp[-x] + 8, 8}, {x, 0, 3}, PlotRange -> {7.5, 9}, PlotStyle -> {Lighter[Blue, 0.5], {{Red, Dashed, Thick}}}]
Out[2]=

Compute the asymptotes of a hyperbola:

In[3]:=
ResourceFunction["Asymptotes"][1/x, x, y]
Out[3]=
In[4]:=
Plot[{1/x, 0}, {x, -3.5, 3.5}, PlotRange -> {-3.5, 3.5}, PlotStyle -> {Lighter[Blue, 0.5], {{Red, Dashed, Thick}}}, ExclusionsStyle -> {{Red, Dashed, Thick}, {PointSize -> 0.0}}]
Out[4]=

Compute the asymptotes of a rational function:

In[5]:=
ResourceFunction["Asymptotes"][(x^2 + x + 1)/(x + 1), x, y]
Out[5]=
In[6]:=
Plot[{(x^2 + x + 1)/(x + 1), x}, {x, -4, 3}, PlotStyle -> {Lighter[Blue, 0.5], {{Red, Dashed, Thick}}}, ExclusionsStyle -> {{Red, Dashed, Thick}, {PointSize -> 0.0}}]
Out[6]=

Compute only the oblique asymptotes of the previous function:

In[7]:=
ResourceFunction["Asymptotes"][(x^2 + x + 1)/(x + 1), x, y, "Oblique"]
Out[7]=

Compute the asymptotes of a periodic function:

In[8]:=
ResourceFunction["Asymptotes"][y == Tan[x], x, y]
Out[8]=
In[9]:=
Plot[Tan[x], {x, -5, 5}, ExclusionsStyle -> {{Red, Dashed, Thick}, {PointSize -> 0.0}}]
Out[9]=

Compute the asymptotes of an algebraic function:

In[10]:=
ResourceFunction["Asymptotes"][(x^2 + x + 5)^(1/2), x, y]
Out[10]=
In[11]:=
Plot[{(x^2 + x + 5)^(1/2), -1/2 - x, 1/2 + x}, {x, -6, 5}, PlotRange -> {-1, 6}, PlotStyle -> {Lighter[Blue, 0.5], {{Red, Dashed, Thick}}, {{Red, Dashed, Thick}}}]
Out[11]=

Compute a list of all asymptotes of the previous function:

In[12]:=
ResourceFunction["Asymptotes"][(x^2 + x + 5)^(1/2), x, y, All]
Out[12]=

Compute the asymptotes of another algebraic function:

In[13]:=
ResourceFunction["Asymptotes"][(x^3 - 2 x + 1)^(1/3), x, y]
Out[13]=
In[14]:=
Plot[{(x^3 + 1)^(1/3), x}, {x, -1.5, 2}, PlotStyle -> {Lighter[Blue, 0.5], {{Red, Dashed, Thick}}, {{Red, Dashed, Thick}}}]
Out[14]=

Compute the asymptotes of a transcendental function:

In[15]:=
ResourceFunction["Asymptotes"][ArcTan[x] + 2 x, x, y]
Out[15]=
In[16]:=
Plot[{ArcTan[x] + 2 x, 2 x - Pi/2, 2 x + Pi/2}, {x, -1.5, 2}, PlotStyle -> {Lighter[Blue, 0.5], {{Red, Dashed, Thick}}, {{Red, Dashed, Thick}}}]
Out[16]=

Scope

Implicitly defined curves can be specified using an expression with head Equal in the first argument:

In[17]:=
ResourceFunction["Asymptotes"][y == 1/x, x, y]
Out[17]=
In[18]:=
ResourceFunction["Asymptotes"][x^2 - y^2/2 == 1, x, y]
Out[18]=

In certain cases, parabolic asymptotes may be returned:

In[19]:=
ResourceFunction["Asymptotes"][(x^3 + Sin[x])/x, x, y]
Out[19]=
In[20]:=
Plot[{(x^3 + Sin[x])/x, x^2}, {x, -3, 3}, PlotStyle -> {Lighter[Blue, 0.5], {{Red, Dashed, Thick}}}]
Out[20]=
In[21]:=
ResourceFunction["Asymptotes"][(x^3 + 2 x^2 + 3 x + 4)/x, x, y]
Out[21]=
In[22]:=
Plot[{(x^3 + 2 x^2 + 3 x + 4)/x, 3 + 2 x + x^2}, {x, -3, 3}, PlotStyle -> {Lighter[Blue, 0.5], {{Red, Dashed, Thick}}}, ExclusionsStyle -> {{Red, Dashed, Thick}, {PointSize -> 0.0}}]
Out[22]=
In[23]:=
ResourceFunction["Asymptotes"][(x^4 - 2 x^3 + 1)/x^2, x, y]
Out[23]=
In[24]:=
Plot[{(x^4 - 2 x^3 + 1)/x^2, -2 x + x^2}, {x, -3, 3}, PlotStyle -> {Lighter[Blue, 0.5], {{Red, Dashed, Thick}}}, ExclusionsStyle -> {{Red, Dashed, Thick}, {PointSize -> 0.02}}]
Out[24]=
In[25]:=
ResourceFunction["Asymptotes"][Sqrt[10 + x^4], x, y]
Out[25]=
In[26]:=
Plot[{Sqrt[10 + x^4], x^2}, {x, -3, 3}, PlotStyle -> {Lighter[Blue, 0.5], {{Red, Dashed, Thick}}}]
Out[26]=

Asymptotes found that are neither linear or parabolic are classified as "Other":

In[27]:=
ResourceFunction[
 "Asymptotes"][(37 x^5 + 2 x^2 + 3 x + 4)/(x^2 - x - 1), x, y]
Out[27]=
In[28]:=
Plot[{(37 x^5 + 2 x^2 + 3 x + 4)/(x^2 - x - 1), 113 + 74 x + 37 x^2 + 37 x^3}, {x, -3, 3}, PlotStyle -> {Lighter[Blue, 0.5], {{Red, Dashed, Thick}}}, ExclusionsStyle -> {{Red, Dashed, Thick}, {PointSize -> 0.02}}]
Out[28]=
In[29]:=
ResourceFunction["Asymptotes"][7 Power[x^4 + 8, (4)^-1], x, y]
Out[29]=
In[30]:=
Plot[{7 Power[x^4 + 8, (4)^-1], 7 Abs[x]}, {x, -4, 4}, PlotStyle -> {Lighter[Blue, 0.5], {{Red, Dashed, Thick}}}]
Out[30]=

Resource History

See Also

License Information