用Octave判断间断点的分类(2)
广告
{{v.name}}
(2)跳跃间断点
讨论\( f(x)=\frac{x}{1-e^{\frac{x}{1-x} } } \)在\( x=1 \)处的连续性。
程序代码如下
function [text_result, numeric_result] = func16(x_value)
    pkg load symbolic;
    x = sym('x');
    question = x / (1 - exp(x / (1 - x)));
    if ((x_value == 0) || (x_value == 1))
        error('Invalid input value.')
    endif
    lim = limit(question, x, x_value);
    text_result = ["\n", disp(lim)];
    numeric_result = eval(lim);
endfunction
令\(x \gt 1 ( x = 1.01)\),计算结果如下
>> [text_result, numeric_result] = func16(1.01)
warning: passing floating-point values to sym is dangerous, see "help sym"
warning: called from
    double_to_sym_heuristic at line 50 column 7
    sym at line 384 column 13
    limit at line 92 column 5
    func16 at line 8 column 9

text_result =
        101
    ───────────────
        ⎛     -101⎞
    100⋅⎝1 - ℯ    ⎠

numeric_result = 1.0100
令\(x \lt 1 ( x = 0.99)\),计算结果如下
>> [text_result, numeric_result] = func16(0.99)
warning: passing floating-point values to sym is dangerous, see "help sym"
warning: called from
    double_to_sym_heuristic at line 50 column 7
    sym at line 384 column 13
    limit at line 92 column 5
    func16 at line 8 column 9

text_result =
        99
    ─────────────
        ⎛     99⎞
    100⋅⎝1 - ℯ  ⎠

numeric_result = -1.0011e-43
因为\( f(1+0) \ne f(1-0) \),所以\( x=1 \)为\( f(x) \)的跳跃间断点
友链