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

numeric_result = (sym)

      log(sin(x) - 1)   log(sin(x) + 1)
    - ─────────────── + ───────────────
            2                 2
友链