用Octave计算证明单调性(3)
广告
                        {{v.name}}
重要不等式(3) 当\(x \ne 0\)时,\({\rm e}^x \gt 1+x\)
计算\(\displaystyle\lim_{x \to 1}{\rm e}^x -1-x\)
                    程序代码如下
                    function [text_result, numeric_result] = func4(x_value)
    pkg load symbolic;
    x = sym('x');
    question = exp(x) - 1 - x;
    lim = limit(question, x, x_value);
    text_result = ["\n", disp(lim)];
    numeric_result = eval(lim);
endfunction令\(x \to 1\),计算结果如下
                    >> [text_result, numeric_result] = func4(1)
text_result =
    -2 + ℯ
numeric_result = 0.7183令\(x \to -1\),计算结果如下
                    >> [text_result, numeric_result] = func4(-1)
text_result =
     -1
    ℯ
numeric_result = 0.3679