This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

limit

Limit of symbolic expression

Syntax

limit(f,var,a)
limit(f,a)
limit(f)
limit(f,var,a,'left')
limit(f,var,a,'right')

Description

example

limit(f,var,a) returns the Bidirectional Limit of the symbolic expression f when var approaches a.

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

limit(f) returns the limit at 0.

example

limit(f,var,a,'left') returns the Left Side Limit of f as var approaches a.

example

limit(f,var,a,'right') returns the Right Side Limit of f as var approaches a.

Examples

collapse all

Calculate the bidirectional limit of this symbolic expression as x approaches 0.

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

Calculate the limit of this expression as h approaches 0.

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. limit acts 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 specify var, then symvar determines the independent variable.

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

More About

collapse all

Bidirectional Limit

L=limxaf(x),xa\{0}.

Left Side Limit

L=limxaf(x),xa<0.

Right Side Limit

L=limxa+f(x),xa>0.

See Also

| |

Introduced before R2006a