生成差商表
计算几个函数的差商及相关的导数.
In[1]:=
fList = {1, x, x^2, x^3, x^4, 1/x, Sin[x], Cos[x], Sinh[x], Cosh[x],
a^(x)};
dqList = DifferenceQuotient[fList, {x, h}];
derList = Limit[dqList, h -> 0];
将结果显示在表格中.
显示完整的 Wolfram 语言输入
Out[2]//TraditionalForm=
计算几个函数的差商及相关的导数.
fList = {1, x, x^2, x^3, x^4, 1/x, Sin[x], Cos[x], Sinh[x], Cosh[x],
a^(x)};
dqList = DifferenceQuotient[fList, {x, h}];
derList = Limit[dqList, h -> 0];
将结果显示在表格中.
Grid[Map[Style[#, ScriptLevel -> 0] &,
Prepend[Transpose[{fList, dqList, derList}],
Style[#, FontWeight -> Bold, FontSize -> Larger] & /@ {f[x], (
f[x + h] - f[x])/h, f'[x]}], {2}], Dividers -> All,
Spacings -> {4, 2},
Background -> {None, {{None,
LightBlue}}, {1, #} -> Hue[.6, .4, 1] & /@ Range[3]},
BaseStyle -> {FontFamily -> Times,
FontSize -> 13}] // TraditionalForm