Limit of symbolic expression
limit( returns the limit at
Limit of Symbolic Expression
Calculate the bidirectional limit of this symbolic expression as
syms x h f = sin(x)/x; limit(f,x,0)
Calculate the limit of this expression as
f = (sin(x+h)-sin(x))/h; limit(f,h,0)
Right and Left Limits of Symbolic Expression
Calculate the right- and left-side limits of symbolic expressions.
syms x f = 1/x; limit(f,x,0,"right")
Because the limit from the left is not equal to the limit from the right, the two-sided limit does not exist. In this case,
NaN (Not a Number).
Limit of Expressions in Symbolic Vector
Calculate the limit of expressions in a symbolic vector.
limit acts element-wise on the vector.
syms x a V = [(1+a/x)^x exp(-x)]; limit(V,x,Inf)
Set Assumption When Calculating Limit
Calculate the right-side limit of as for real and then for positive .
Create the symbolic variables
n. When you create symbolic variables, they are assumed to be complex by default. Set the assumption that
n is real.
syms x n assume(n,"real")
Find the limit using this assumption.
Next, assume that
n is positive. Find the limit using this assumption.
f — Input
symbolic expression | symbolic function | symbolic vector | symbolic matrix
Input, specified as a symbolic expression, function, vector, or matrix.
var — Independent variable
x | symbolic variable
Independent variable, specified as a symbolic variable. If you do not
determines the independent variable.
a — Limit point
number | symbolic number | symbolic variable | symbolic expression
Limit point, specified as a number or a symbolic number, variable, or expression.
Introduced before R2006a