DifferenceQuotient[f,{x,h}]
给出差商
.
DifferenceQuotient[f,{x,n,h}]
给出 h 步的多重差商.
DifferenceQuotient[f,{x1,n1,h1},{x2,n2,h2},…]
计算 x1,x2,… 的偏差商.
DifferenceQuotient
DifferenceQuotient[f,{x,h}]
给出差商
.
DifferenceQuotient[f,{x,n,h}]
给出 h 步的多重差商.
DifferenceQuotient[f,{x1,n1,h1},{x2,n2,h2},…]
计算 x1,x2,… 的偏差商.
更多信息和选项
- DifferenceQuotient 给出一条曲线上两个相邻点之间的割线的斜率.
- DifferenceQuotient[f,{x,n,h}] 等价于 DifferenceDelta[f,{x,n,h}]/
. - DifferenceQuotient[f,…,Assumptions->assum] 在计算差商的过程中使用假设 assum.
范例
打开所有单元 关闭所有单元基本范例 (1)
范围 (16)
基本用途 (4)
DifferenceQuotient[f[x], {x, h}]DifferenceQuotient[f[x], {x, -h}]DifferenceQuotient[f[x - h], {x, 2h}]DifferenceQuotient[f[x], {x, 2, h}]DifferenceQuotient[f[x], {x, 3, h}]DifferenceQuotient[f[x, y], {x, r}, {y, s}]DifferenceQuotient 逐项作用于列表:
DifferenceQuotient[{f[x], g[x]}, {x, h}]单变量差商 (8)
常数的差商 DifferenceQuotient 为 0:
DifferenceQuotient[c, {x, h}]多项式函数的差商 DifferenceQuotient 为多项式函数:
DifferenceQuotient[x ^ 3, {x, h}]Table[DifferenceQuotient[x ^ 4, {x, n, h}], {n, 4}]DifferenceQuotient[(x + 1) / (x + 3), {x, h}]Table[DifferenceQuotient[(x + 1) / (x + 3), {x, n, h}], {n, 2}]DifferenceQuotient[Sin[x], {x, h}]DifferenceQuotient[Cos[2x], {x, h}]Table[DifferenceQuotient[a ^ x, {x, n, h}], {n, 3}]DifferenceQuotient[(x ^ 2 + x + 1)2 ^ x, {x, h}]带有整数步长的 PolyGamma 的差商都是有理函数:
Block[{h = 3}, Table[DifferenceQuotient[PolyGamma[n, x], {x, h}], {n, 0, 3}]]HarmonicNumber 和 Zeta 也类似:
DifferenceQuotient[HarmonicNumber [x, 2], {x, 3}]DifferenceQuotient[Zeta [2, x], {x, 3}]h 步长的 FactorialPower 有一个与 h 步长匹配的 a 的简单差商:
DifferenceQuotient[FactorialPower[x, n, h], {x, h}]多变量差商 (4)
多变量多项式函数的差商 DifferenceQuotient 是多项式函数:
DifferenceQuotient[x ^ 3 y ^ 2 + 5 x y + 11, {x, h}, {y, k}]DifferenceQuotient[(x + y + 1) / (((x ^ 2 + 3)(y + 5))), {x, h}, {y, k}]DifferenceQuotient[(x + y + 1) / (((x ^ 2 + 3)(y + 5))), {x, 2, h}, {y, 2, k}]基于变量子集的多变量函数的差商 DifferenceQuotient 为 0:
DifferenceQuotient[f[x], {x, h}, {y, k}]DifferenceQuotient[ g[y], {x, h}, {y, k}]DifferenceQuotient[ h[x, y], {x, h}, {y, k}, {z, p}]单变量函数的乘积的差商 DifferenceQuotient:
DifferenceQuotient[f[x] g[y], {x, h}, {y, k}]DifferenceQuotient[f[x], {x, h}]DifferenceQuotient[ g[y], {y, k}]选项 (1)
应用 (10)
第一性原理的导数 (3)
f[x_] := x ^ 2 + 5x + 7Limit[DifferenceQuotient[f[x], {x, h}], h -> 0]使用 D 计算导数:
f'[x]f[x_] := E ^ (a x)Limit[DifferenceQuotient[f[x], {x, h}], h -> 0]f'[x]f[x_] := Sin[2x + 1]Limit[DifferenceQuotient[f[x], {x, h}], h -> 0]f'[x]f[x_] := x ^ nLimit[DifferenceQuotient[f[x], {x, 2, h}], h -> 0]f''[x]f[x_] := x ^ xLimit[DifferenceQuotient[f[x], {x, 3, h}], h -> 0]f'''[x]//Simplifyf[x_, y_] := Cos[x ^ 2 + E ^ (-y)]Plot3D[f[x, y], {x, -2, 2}, {y, -1, 1}]Limit[DifferenceQuotient[f[x, y], {x, h}], h -> 0]D[f[x, y], x]//SimplifyLimit[DifferenceQuotient[f[x, y], {y, k}], k -> 0]D[f[x, y], y]Limit[Limit[DifferenceQuotient[f[x, y], {x, h}, {y, k}], h -> 0], k -> 0]D[f[x, y], x, y]近似导数 (3)
使用 DifferenceQuotient 求某点的近似导数:
f[x_] := 2 x^3 - 15 x^2 + 33 x - 20Plot[f[x], {x, 0, 5}]f'[2.57]DifferenceQuotient 给出的近似值:
DifferenceQuotient[f[x], {x, 0.01}] /. {x -> 2.57}f[x_] := Sin[E ^ x]Plot[f[x], {x, 0, π}]f'[2]N[%]hvals = {0.1, 0.01, 0.0001, 0.0001};fd = Table[DifferenceQuotient[f[x], {x, h}], {h, hvals}] /. {x -> 2}bd = Table[DifferenceQuotient[f[x], {x, -h}], {h, hvals}] /. {x -> 2}Table[DifferenceQuotient[f[x - h], {x, 2h}], {h, {0.1, 0.01, 0.0001, 0.0001}}] /. {x -> 2}使用 DifferenceQuotient 计算某点处的偏导数近似值:
f[x_, y_] := Sin[x + y]Cos[ 3y]Plot3D[f[x, y], {x, 0, 5}, {y, 0, 5}]{D[f[x, y], {x, 2}], D[f[x, y], x, y], D[f[x, y], {y, 2}]} /. {x -> 2.3, y -> 3.8}{DifferenceQuotient[f[x, y], {x, 2, h}], DifferenceQuotient[f[x, y], {x, h}, {y, k}], DifferenceQuotient[f[x, y], {y, 2, k}]} /. {x -> 2.3, y -> 3.8, h -> 0.001, k -> 0.002}微分方程 (3)
deqn = {y'[x] == 2x - y[x], y[0] == 5};reqn = {DifferenceQuotient[y[x], {x, 1 / 10}] == 2x - y[x], y[0] == 5}//Simplify使用 DSolveValue 求解微分方程:
dsol = DSolveValue[deqn, y[x], x]Plot[dsol, {x, 0, 5}]使用 RSolveValue 求解差分方程:
rsol = RSolveValue[reqn, y[x], x]//SimplifyTable[dsol, {x, 0., 5}]Table[rsol, {x, 0., 5}]deqn = {y'[x] == 4 - 3y[x], y[0] == 5};reqn = {DifferenceQuotient[y[x], {x, -1 / 10}] == 4 - 3y[x], y[0] == 5}//Simplify使用 DSolveValue 求解微分方程:
dsol = DSolveValue[deqn, y[x], x]Plot[dsol, {x, 0, 5}]使用 RSolveValue 求解差分方程:
rsol = RSolveValue[reqn, y[x], x]//SimplifyTable[dsol, {x, 0., 5}]Table[rsol, {x, 0., 5}]deqn = {y'[x] == x - 3y[x], y[0] == 1};reqn = {DifferenceQuotient[y[x], {x, h}] == x - 3y[x], y[0] == 1}//Simplify使用 DSolveValue 求解微分方程:
dsol = DSolveValue[deqn, y[x], x]//SimplifyPlot[dsol, {x, 0, 5}]使用 RSolveValue 求解差分方程:
rsol[h_] = RSolveValue[reqn, y[x], x]Table[{dsol, rsol[0.1], rsol[-0.1]}, {x, 0., 5}]//TableFormLimit[rsol[h], h -> 0]//FullSimplify外推法 (1)
理查森外推法是一个应用于数列加速度的方法,可用于提高随参数 h 变化的数列 a[h] 收敛的速率. 使用数列 a[x,h] 和理查森外推法来加速 DifferenceQuotient 收敛于函数 f[x] 的导数,数列定义为:
a[x_, h_] = DifferenceQuotient[f[x], {x, h}]r[x_, h_, k_] = (k ^ 2 a[x, h] - a[x, k h]) / (k ^ 2 - 1)//Simplifyf[x_] := x Sin[E ^ (x)]f'[3.4]DifferenceQuotient 给出的近似值:
a[3.4, 0.001]Table[r[3.4, 0.001, k], {k, {0.5, 0.3, 0.0001}}]属性和关系 (6)
DifferenceQuotient 给出连接一条曲线上相近两点的割线的斜率:
f[x_] := x ^ 3 + 2x - 5diffquotient = DifferenceQuotient[f[x], {x, h}]% /. {x -> 3, h -> 2}secantslope = (f[5] - f[3]) / 2Show[Plot[f[x], {x, 1, 6}], Graphics[{Red, Line[{{2.5, 2.5}, {5.5, 155.5}}]}]]差商 DifferenceQuotient 的极限 Limit 是导数 D:
DifferenceQuotient[f[x], {x, h}]Limit[%, h -> 0, Analytic -> True]多重差商的迭代极限 Limit 给出混合偏导数:
DifferenceQuotient[f[x, y], {x, r}, {y, s}]Limit[Limit[%, r -> 0, Analytic -> True], s -> 0, Analytic -> True]DifferenceQuotient 与 DifferenceDelta 的关系为
:
DifferenceQuotient[f[x], {x, h}] == DifferenceDelta[f[x], {x, 1, h}] / h//SimplifyTable[DifferenceQuotient[f[x], {x, n, h}] == DifferenceDelta[f[x], {x, n, h}] / h ^ n//Simplify, {n, 4}]//SimplifyDifferenceQuotient 与 DiscreteShift 的关系为
:
DifferenceQuotient[f[x], {x, h}] == (DiscreteShift[f[x], {x, 1, h}] - f[x]) / h//SimplifyDifferenceQuotient 是一个线性运算符:
DifferenceQuotient[f[x] + g[x], {x, h}] == DifferenceQuotient[f[x], {x, h}] + DifferenceQuotient[g[x], {x, h}]//TogetherDifferenceQuotient[c f[x], {x, h}] == c DifferenceQuotient[f[x], {x, h}]//Together互动范例 (1)
f[x_] = 10 Exp[-(x^2 - x/4)] Sin[2 x];g[h_, b_][x_] = f[b] + (DifferenceQuotient[f[x], {x, h}] /. (x -> b)) (x - b);Manipulate[
Plot[{f[x], g[h, b][x]}, {x, -3, 3}, PlotRange -> 12, Epilog -> {AbsolutePointSize[7], Point[{{b, f[b]}, {b + h, f[b + h]}}]}], {{b, 0}, -2, 2, Appearance -> "Labeled"}, {{h, 1}, -1, 1, Appearance -> "Labeled"}, SaveDefinitions -> True]巧妙范例 (1)
flist = {1, x, x ^ 2, x ^ 3, 1 / x, Sin[x], Cos[x], Sinh[x], Cosh[x], a ^ (x)};Grid[Transpose[{flist, DifferenceQuotient[flist, {x, h}]}], Dividers -> All, Spacings -> {4, 2}, Background -> StandardBlue, BaseStyle -> {FontFamily -> Times, FontSize -> 13}]//TraditionalForm文本
Wolfram Research (2016),DifferenceQuotient,Wolfram 语言函数,https://reference.wolfram.com/language/ref/DifferenceQuotient.html.
CMS
Wolfram 语言. 2016. "DifferenceQuotient." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/DifferenceQuotient.html.
APA
Wolfram 语言. (2016). DifferenceQuotient. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/DifferenceQuotient.html 年
BibTeX
@misc{reference.wolfram_2026_differencequotient, author="Wolfram Research", title="{DifferenceQuotient}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/DifferenceQuotient.html}", note=[Accessed: 10-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_differencequotient, organization={Wolfram Research}, title={DifferenceQuotient}, year={2016}, url={https://reference.wolfram.com/language/ref/DifferenceQuotient.html}, note=[Accessed: 10-August-2026]}