Matlab solve limit problem

Original link: https://www.okace.cn/655.html

Limits of a function of one variable

Definition of Limits Ordinary Limits
$$L = lim ⁡ x → x 0 f ( x ) L=\lim_{x \rightarrow x_0} {f(x)}$$
L=
x→x
0

lim

f(x)

left limit
L = lim ⁡ x → x 0 − f ( x ) L=lim_{x rightarrow x_0^-} {f(x)}
L=
x→x
0

lim

f(x)

right limit
L = lim ⁡ x → x 0 + f ( x ) L=lim_{x rightarrow x_0^+} {f(x)}
L=
x→x
0
+

lim

f(x)

Matlab implementation method
L=limit(fun, x, x0) % //Ordinary limit
L=limit(fun, x, x0, ‘left’) % //left limit
L=limit(fun, x, x0, ‘right’) % //right limit
1
2
3
Application example to solve the limit:
L = lim ⁡ x → 0 sinxx L=lim_{x rightarrow 0} {frac{sin x}{x}}
L=
x→0
lim

x
sinx

syms x; f=sin(x)/x; L=limit(f, x, 0)
1
Solving the limit:
L = lim ⁡ x → ∞ x ( 1 + ax ) xsinbx L=lim_{x rightarrow infty} {x(1+frac{a}{x})^x sin frac{b}{x}}
L=
x→∞
lim

x(1+
x
a

)
x
sin
x
b

syms xab
f = x (1+a/x)^x sin(b/x)
L = limit(f, x, inf)
1
2
3
Solve for a one-sided limit:
one-sided limit function
syms x; L = limit((exp(x^3)-1)/(1-cos(sqrt(x-sin(x)))),x,0,’right’)
1
The function curve in the interval (−0.1, 0.1) (-0.1,0.1)(−0.1,0.1) can also be drawn with the following statement.

x0=-0.1:0.001:0.1;
y0=((exp(x0.^3)-1)./(1-cos(sqrt(x0-sin(x0)))));
plot(x0, y0, ‘-‘, [0], [L], ‘o’)
1
2
3
The function curve is as follows:
The function curve can be seen, for this example, the function limit can be found to be 12 even without the one-sided limit.

L = limit((exp(x^3)-1)/(1-cos(sqrt(x-sin(x)))),x,0)
1
Find the left and right limits of the function tant tan ttant at the point π / 2 pi/2π/2.
syms t; f=tan(t);
L1=limit(f,t,pi/2,’left’)
L2=limit(f,t,pi/2,’right’)
1
2
3
Find the limiting sequence of the following sequence
syms n positive
f = n^(2/3)*sin(factorial(n))/(n+1);
F = limit(f,n,inf)
1
2
3
Find the limiting sequence function of the following sequence function
syms xn
f = n atan(1/(n (x^2+1)+x))*tan(pi/4+x/2/n)^n;
F = limit(f,n,inf)
1
2
3
Limits of Multivariable Functions
The limit of the multivariate function of the matlab implementation method can also be directly solved by the limit() function in MATLAB.

Assuming that there is a binary function f ( x , y ) f(x,y)f(x,y), if you want to find the cumulative limit of the binary function, insert the picture description here, you can use the limit() function nested. E.g:

L1 = limit(limit(f,x, x0), y, y0)
L2 = limit(limit(f,y, y0), x, x0)
1
2
if x 0 x_0x
0

or y 0 y_0y
0

is not a definite value, but a function of another variable, such as x → g ( y ) x rightarrow g(y)x → g(y), the above limit evaluation order cannot be exchanged.

Assuming that there is a binary function f ( x , y ) f(x,y)f(x,y), if you want to find the heavy limit of the binary function
L = lim ⁡ ( x , y ) → ( x 0 , y 0 ) f ( x , y ) L=lim_{(x,y) rightarrow (x_0,y_0) } {f(x,y)}
L=
(x,y)→(x
0

,y
0

)
lim

f(x,y)

It is not easy to solve in theory, only the same limit can be obtained in all directions, and it is impossible to solve by the cumulative limit method.

Application example to find out the limit value of binary function
syms xa; syms y positive;
f = exp(-1/(y^2+x^2)) sin(x)^2/x^2 (1+1/y^2)^(x+a^2*y^2);
L = limit(limit(f, x, 1/sqrt(y)), y, inf)
1
2
3
Heavy Limit Attempt, Solving Heavy Limit Heavy Limit

syms xy;
f=(x*y/(x^2+y^2))^(x^2);
L1=limit(limit(f,x,inf),y,inf)
L2=limit(limit(f,y,inf),x,inf)
L3=limit(limit(f,x,y^2),y,inf)
L4=limit(limit(f,y,x^2),x,inf)
1
2
3
4
5
6
Determining whether the weight limit exists Insert a picture description here to prove that the limit does not exist is much easier than finding the weight limit, which can be approached along y = kxy=kxy=kx.

syms rxy
f=x*y/(x^2+y^2);
L=limit(subs(f,y,r*x),x,0)

This article is reprinted from: https://www.okace.cn/655.html
This site is for inclusion only, and the copyright belongs to the original author.