Main Content

limit

Limit of symbolic expression

Description

example

limit(f,var,a)returns theBidirectional Limitof the symbolic expressionfwhenvarapproachesa.

limit(f,a)uses the default variable found bysymvar.

limit(f)returns the limit at0.

example

limit(f,var,a,'left')returns theLeft Side Limitoffasvarapproachesa.

example

limit(f,var,a,'right')returns theRight Side Limitoffasvarapproachesa.

Examples

collapse all

Calculate the bidirectional limit of this symbolic expression asxapproaches0.

syms x h f = sin(x)/x; limit(f,x,0)
ans = 1

Calculate the limit of this expression ashapproaches0.

f = (sin(x+h)-sin(x))/h; limit(f,h,0)
ans = cos(x)

Calculate the right and left limits of symbolic expressions.

syms x f = 1/x; limit(f,x,0,'right')
ans = Inf
limit(f,x,0,'left')
ans = -Inf

Calculate the limit of expressions in a symbolic vector.limitacts element-wise on the vector.

syms x a V = [(1+a/x)^x exp(-x)]; limit(V,x,Inf)
ans = [ exp(a), 0]

Input Arguments

collapse all

Input, specified as a symbolic expression, function, vector, or matrix.

Independent variable, specified as a symbolic variable. If you do not specifyvar, thensymvardetermines the independent variable.

Limit point, specified as a number or a symbolic number, variable, or expression.

More About

collapse all

Bidirectional Limit

L = lim x a f ( x ) , x a \ { 0 } .

Left Side Limit

L = lim x a f ( x ) , x a < 0.

Right Side Limit

L = lim x a + f ( x ) , x a > 0.

See Also

||

Introduced before R2006a