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
You can get the value of
at 0 just by explicitly replacing
with 0, and then evaluating the result.
In some cases, however, you have to be more careful.
Consider, for example, finding the value of the expression
. If you simply replace
in this expression, you get the indeterminate result
. To find the correct value of
, you need to take the limit
|Limit[expr,x->x0]||find the limit of expr when x approaches |
This gives the correct value for the limit of
No finite limit exists in this case.
can find this limit, even though you cannot get an ordinary power series for
The value of Sign[x]
, however, is
. The limit is by default taken from above.
Not all functions have definite limits at particular points. For example, the function
oscillates infinitely often near
, so it has no definite limit there. Nevertheless, at least so long as
remains real, the values of the function near
always lie between
represents values with bounded variation using Interval
objects. In general, Interval
represents an uncertain value which lies somewhere in the interval
returns an Interval
object, representing the range of possible values of
near its essential singularity at
can do arithmetic with Interval
represents this limit symbolically in terms of an Interval
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 from below|
|Limit[expr,x->x0,Direction->-1]||find the limit as x approaches from above|
has a different limiting value at
, depending on whether you approach from above or below.
Approaching from below gives a limiting value of
Approaching from above gives a limiting value of
makes no assumptions about functions like
about which it does not have definite knowledge. As a result, Limit
remains unevaluated in most cases involving symbolic functions.
has no definite knowledge about
, so it leaves this limit unevaluated.