13.1.1 Univariate function limits
The limit command computes limits,
both at numbers and infinities, and in the real case it can compute one-sided limits.
-
limit takes three mandatory and one optional argument.
-
expr, an expression.
- x, the name of a variable.
- a, the limit point.
- Optionally, side (either 0, −1 or 1), to specify
which side to take a one-sided limit (by default side=0).
Alternatively, one-sided limits may be specified by using symbols
left and right instead of −1 and 1.
- limit(expr,x,a ⟨,side ⟩)
returns the limit of expr as x approaches a.
-
If side=0 (the default), then the ordinary limit
is returned.
- If side=−1 or side=left,
then the limit from the left (x<a) is returned.
- If side=1 or side=right,
then the limit from the right (x>a) is returned.
- It is also possible to put x=a as argument instead of
x,a;
limit(expr,var=pt ⟨,side ⟩)
is equivalent to limit(expr,var,pt ⟨,side ⟩).
Examples
To find limx→ 0−1/x, input:
or:
To find limx→ 0+1/x, input:
or:
To find limx→ 01/x, input:
or:
or:
Note that ∞ or infinity without an explicit
+ or - represents unsigned infinity.
Find, for n>2, the limit of
ntan(x)−tan(nx)/sin(nx)−nsin(x)
as x approaches 0.
limit((n*tan(x)-tan(n*x))/(sin(n*x)-n*sin(x)),x=0) |
Note that Xcas does not complain about a possibility of
n being equal to 1.
Find the limit of
√x+√x+√x−√x
as x approaches +∞.
limit(sqrt(x+sqrt(x+sqrt(x)))-sqrt(x),x=+infinity) |
Find the limit of
√1+x+x2/2− ex/2/(1−cos(x))sin(x)
as x approaches 0.
limit((sqrt(1+x+x^2/2)-exp(x/2))/((1-cos(x))*sin(x)),x,0) |