用Octave计算导数基本公式(3)
广告
{{v.name}}
\( (a^x)'=a^x { {\rm ln}a } \),特别地,有\( (e^x)'=e^x \)
程序代码如下
function [text_result, numeric_result] = func20()
pkg load symbolic;
x = sym('x');
a = sym('a');
question = a^x;
lim = diff(question, x);
text_result = ["\n", disp(lim)];
numeric_result = eval(lim);
endfunction
计算结果如下
>> [text_result, numeric_result] = func20()
text_result =
x
a ⋅log(a)
numeric_result = (sym)
x
a ⋅log(a)