用Octave求不定积分基本公式(10)
广告
                        {{v.name}}
不定积分基本公式(10) \(\int{ {\rm csc}x }{\rm d}x={\rm ln} \lvert{\rm csc}x-{\rm cot}x\lvert+C\)
求\(\int{ {\rm csc}x }{\rm d}x\).
                    程序代码如下
                    function [text_result, numeric_result] = func64()
    pkg load symbolic;
    x = sym('x');
    f = int(csc(x), x);
    text_result = ["\n", disp(f)];
    numeric_result = eval(f);
endfunction结果如下
                    >> [text_result, numeric_result] = func64()
text_result =
    log(cos(x) - 1)   log(cos(x) + 1)
    ─────────────── - ───────────────
            2                 2
numeric_result = (sym)
    log(cos(x) - 1)   log(cos(x) + 1)
    ─────────────── - ───────────────
            2                 2