MATLAB极限计算

1.1 MATLAB can use the limit command to calculate the limit, the most basic way to use it is to enter the calculated expression. MATLAB will find the limit when the independent variable tends to zero

example 1: f(x)= \frac{2x+1}{x-2} and g(x)=x.^3+2, calculate that these two equations tend to approach the limit of 3

syms x
f=(2.*x+1)/(x-2)
g=x.^3+2
F1=limit(f,3)
F2=limit(g,3)
输出结果:

next: limit (f+g,3)

output: ans=36

next we verify:

then we calculate:

k=3
limit(k.*f,3)

output: ans=21

let's then verify that the product of the two functions is equal to the product of the respective limits of the two functions:

CALCULATION: F1.*F2

the output is: ans=203

we continue to verify:

 计算:h=f.^g
limit(h,3)

output:

1.2 calculate limf(x), x tends to ∞

we use the syntax to calculate its limit: limit(f, inf)

我们计算式子 

 计算代码:limit(sqrt(x.^2+x)-x,inf)

输出结果:ans=1/2

1.3左极限和右极限

如果存在间断点,那函数在该点的极限不存在。为了处理函数x=a处不连续的情况他,我们定义函数左极限和右极限。左极限定义趋于x从左边趋近于a的极限。

单变量的函数极限:

 

计算式子是否存在

 syms x
f=(x-3)/abs(x-3)
ezplot(f,[-5,5])

输出结果:

a=limit(f,x,3,'left')

a=-1

b=limit(f,x,3,'right')

b=1

两边结果不相等,该式子不成立

 1.4计算:

 代码:syms x
f=sin(x)/x
L=limit(f,x,0)

得到结果:

 1.5计算

 代码:syms x a b
f=x.*(1+a/x).^x.*sin(b/x)
L=limit(f,x,inf)

 输出结果:

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值