limit
Limit of a symbolic expression.
Category: Mathematics > Calculus
Syntax
L = limit(f, x, a)
Limit of f as x approaches a.
L = limit(f, x, a, 'left')
One-sided limit from below.
L = limit(f, x, a, 'right')
One-sided limit from above.
Description
Without a direction, limit returns the two-sided limit, which exists only if both sides agree. For 1/x at 0 the sides disagree, so asking for 'left' and 'right' separately gives -Inf and Inf. Indeterminate forms such as (sin(x)-x)/x^3 at 0 are resolved by series expansion, giving -1/6.
Input arguments
f- Symbolic expression.
x- Symbolic variable.
a- Point, number or
Inf.
Output arguments
L- Symbolic limit, possibly
Inf,-InforNaN.
Example
Limits
syms x
limit((sin(x) - x)/x^3, x, 0)
limit(1/x, x, 0, 'left')
limit(1/x, x, 0, 'right')
limit((1 + 1/x)^x, x, Inf)
Output
ans = -1/6
ans = -Inf
ans = Inf
ans = 1