用Octave计算不定式极限(2)
广告
{{v.name}}
基本不定式(2) \(\frac{ \infty}{\infty}\)型
计算\( \displaystyle\lim_{x \to \infty} \frac{ {\rm ln}^2 x }{ \sqrt{x} } \)
程序代码如下
function [text_result, numeric_result] = func8(x_value)
pkg load symbolic;
x = sym('x');
unit_1 = power(log(x), 2);
unit_2 = sqrt(x);
question = unit_1 / unit_2;
lim = limit(question, x, x_value);
text_result = ["\n", disp(lim)];
numeric_result = eval(lim);
endfunction
令\(x \to \infty\),计算结果如下
>> [text_result, numeric_result] = func8(inf)
text_result =
0
numeric_result = 0