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