此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.1)

Finding Limits

In doing many kinds of calculations, you need to evaluate expressions when variables take on particular values. In many cases, you can do this simply by applying transformation rules for the variables using the /. operator.
You can get the value of cos (x2) at 0 just by explicitly replacing x with 0, and then evaluating the result.
In[1]:=
Click for copyable input
Out[1]=
In some cases, however, you have to be more careful.
Consider, for example, finding the value of the expression when x=0. If you simply replace x by 0 in this expression, you get the indeterminate result . To find the correct value of when x=0, you need to take the limit.
Limit[expr,x->x0]find the limit of expr when x approaches x0

Finding limits.

This gives the correct value for the limit of as x→0.
In[2]:=
Click for copyable input
Out[2]=
No finite limit exists in this case.
In[3]:=
Click for copyable input
Out[3]=
Limit can find this limit, even though you cannot get an ordinary power series for xlog (x) at x=0.
In[4]:=
Click for copyable input
Out[4]=
The same is true here.
In[5]:=
Click for copyable input
Out[5]=
The value of Sign[x] at x=0 is 0.
In[6]:=
Click for copyable input
Out[6]=
Its limit, however, is 1. The limit is by default taken from above.
In[7]:=
Click for copyable input
Out[7]=
Not all functions have definite limits at particular points. For example, the function sin (1/x) oscillates infinitely often near x=0, so it has no definite limit there. Nevertheless, at least so long as x remains real, the values of the function near x=0 always lie between -1 and 1. Limit represents values with bounded variation using Interval objects. In general, Interval[{xmin, xmax}] represents an uncertain value which lies somewhere in the interval xmin to xmax.
Limit returns an Interval object, representing the range of possible values of sin (1/x) near its essential singularity at x=0.
In[8]:=
Click for copyable input
Out[8]=
Mathematica can do arithmetic with Interval objects.
In[9]:=
Click for copyable input
Out[9]=
Mathematica represents this limit symbolically in terms of an Interval object.
In[10]:=
Click for copyable input
Out[10]=
Some functions may have different limits at particular points, depending on the direction from which you approach those points. You can use the Direction option for Limit to specify the direction you want.
Limit[expr,x->x0,Direction->1]find the limit as x approaches x0 from below
Limit[expr,x->x0,Direction->-1]find the limit as x approaches x0 from above

Directional limits.

The function 1/x has a different limiting value at x=0, depending on whether you approach from above or below.
In[11]:=
Click for copyable input
Out[11]=
Approaching from below gives a limiting value of -Infinity.
In[12]:=
Click for copyable input
Out[12]=
Approaching from above gives a limiting value of Infinity.
In[13]:=
Click for copyable input
Out[13]=
Limit makes no assumptions about functions like f[x] about which it does not have definite knowledge. As a result, Limit remains unevaluated in most cases involving symbolic functions.
Limit has no definite knowledge about f, so it leaves this limit unevaluated.
In[14]:=
Click for copyable input
Out[14]=