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

numeric_result = 403.43
友链