用Octave计算导数基本公式(8)
广告
{{v.name}}
三角函数求导公式(4)
\( ({\rm cot} x )'=-{\rm csc}^2 x \)
程序代码如下
function [text_result, numeric_result] = func25()
    pkg load symbolic;
    x = sym('x');
    question = cot(x);
    lim = diff(question, x);
    text_result = ["\n", disp(lim)];
    numeric_result = eval(lim);
endfunction
计算结果如下
>> [text_result, numeric_result] = func25()
text_result =
         2
    - cot (x) - 1

numeric_result = (sym)

         2
    - cot (x) - 1
友链