计算差商
Wolfram 语言不仅可以计算熟知的单变量差商,也可以计算多元和高价差商.
In[1]:=
![Click for copyable input](assets.zh/compute-difference-quotients/In_23.png)
DifferenceQuotient[f[x], {x, h}]
Out[1]=
![](assets.zh/compute-difference-quotients/O_21.png)
二阶差商是一阶商数的差商.
In[2]:=
![Click for copyable input](assets.zh/compute-difference-quotients/In_24.png)
DifferenceQuotient[f[x], {x, 2, h}]
Out[2]=
![](assets.zh/compute-difference-quotients/O_22.png)
In[3]:=
![Click for copyable input](assets.zh/compute-difference-quotients/In_25.png)
DifferenceQuotient[f[x], {x, h}];
DifferenceQuotient[f[x], {x, 2, h}];
% == DifferenceQuotient[%%, {x, h}]
Out[3]=
![](assets.zh/compute-difference-quotients/O_23.png)
计算多元差商.
In[4]:=
![Click for copyable input](assets.zh/compute-difference-quotients/In_26.png)
DifferenceQuotient[(x + y + 1)/(((x^2 + 3) (y + 5))), {x, h}, {y, k}]
Out[4]=
![](assets.zh/compute-difference-quotients/O_24.png)
创建一个多项式的阶数递增的差商的表格,其结果为一些阶数递减的多项式.
In[5]:=
![Click for copyable input](assets.zh/compute-difference-quotients/In_27.png)
Grid[Table[
DifferenceQuotient[x^3 y^2 + 5 x y + 11, {x, i, r}, {y, j, s}], {i,
4}, {j, 3}], Spacings -> {2, 1}]
Out[5]=
![](assets.zh/compute-difference-quotients/O_25.png)