$
\newcommand{\I}{\mathrm{i}}
\newcommand{\E}{\mathrm{e}}
\newcommand{\bvec}[1]{\boldsymbol{\mathbf{#1}}}
\newcommand{\mat}[1]{\boldsymbol{\mathbf{#1}}}
\newcommand{\ten}[1]{\boldsymbol{\mathbf{#1}}}
\newcommand{\Nabla}{\boldsymbol{\nabla}}
\renewcommand{\Tr}{^{\mathrm{T}}}
\newcommand{\uvec}[1]{\hat{\boldsymbol{\mathbf{#1}}}}
\renewcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}}
\newcommand{\ali}[1]{\begin{aligned}#1\end{aligned}}
\newcommand{\leftgroup}[1]{\left\{\begin{aligned}#1\end{aligned}\right.}
\newcommand{\vmat}[1]{\begin{vmatrix}#1\end{vmatrix}}
\newcommand{\Cj}{^*}
\newcommand{\Her}{^\dagger}
\newcommand{\Q}[1]{\hat #1}
\newcommand{\Qv}[1]{\uvec #1}
\newcommand{\sinc}{\operatorname{sinc}}
\newcommand{\Arctan}{\operatorname{Arctan}}
\newcommand{\erfi}{\operatorname{erfi}}
\newcommand{\Arctan}{\operatorname{Arctan}}
\newcommand{\Si}[1]{\,\mathrm{#1}}
\newcommand{\les}{\leqslant}
\newcommand{\ges}{\geqslant}
\newcommand{\qty}[1]{\left\{{#1}\right\}}
\newcommand{\qtyRound}[1]{\left({#1}\right)}
\newcommand{\qtySquare}[1]{\left[{#1}\right]}
\newcommand{\abs}[1]{\left\lvert{#1}\right\rvert}
\newcommand{\eval}[1]{\left.{#1}\right\rvert}
\newcommand{\comm}[2]{\left[{#1},{#2}\right]}
\newcommand{\commStar}[2]{[{#1},{#2}]}
\newcommand{\pb}[2]{\left\{{#1},{#2}\right\}}
\newcommand{\pbStar}[2]{\{{#1},{#2}\}}
\newcommand{\vdot}{\boldsymbol\cdot}
\newcommand{\cross}{\boldsymbol\times}
\newcommand{\grad}{\boldsymbol\nabla}
\newcommand{\div}{\boldsymbol{\nabla}\boldsymbol{\cdot}}
\newcommand{\curl}{\boldsymbol{\nabla}\boldsymbol{\times}}
\newcommand{\laplacian}{\boldsymbol{\nabla}^2}
\newcommand{\sinRound}[2][{}]{\sin^{#1}\left(#2\right)}
\newcommand{\cosRound}[2][{}]{\cos^{#1}\left(#2\right)}
\newcommand{\tanRound}[2][{}]{\tan^{#1}\left(#2\right)}
\newcommand{\cscRound}[2][{}]{\csc^{#1}\left(#2\right)}
\newcommand{\secRound}[2][{}]{\sec^{#1}\left(#2\right)}
\newcommand{\cotRound}[2][{}]{\cot^{#1}\left(#2\right)}
\newcommand{\sinhRound}[2][{}]{\sinh^{#1}\left(#2\right)}
\newcommand{\coshRound}[2][{}]{\cosh^{#1}\left(#2\right)}
\newcommand{\tanhRound}[2][{}]{\tanh^{#1}\left(#2\right)}
\newcommand{\arcsinRound}[2][{}]{\arcsin^{#1}\left(#2\right)}
\newcommand{\arccosRound}[2][{}]{\arccos^{#1}\left(#2\right)}
\newcommand{\arctanRound}[2][{}]{\arctan^{#1}\left(#2\right)}
\newcommand{\expRound}[1]{\exp\left(#1\right)}
\newcommand{\logRound}[2][{}]{\log^{#1}\left(#2\right)}
\newcommand{\lnRound}[2][{}]{\ln^{#1}\left(#2\right)}
\renewcommand{\Re}{\mathrm{Re}}
\renewcommand{\Im}{\mathrm{Im}}
\newcommand{\dd}[1][]{\,\mathrm{d}^{#1}}
\newcommand{\dv}[2][{}]{\frac{\mathrm{d}^{#1}}{\mathrm{d}{#2}^{#1}}}
\newcommand{\dvStar}[2][{}]{\mathrm{d}^{#1}/\mathrm{d}{#2}^{#1}}
\newcommand{\dvTwo}[3][{}]{\frac{\mathrm{d}^{#1}{#2}}{\mathrm{d}{#3}^{#1}}}
\newcommand{\dvStarTwo}[3][{}]{\mathrm{d}^{#1}{#2}/\mathrm{d}{#3}^{#1}}
\newcommand{\pdv}[2][{}]{\frac{\partial^{#1}}{\partial{#2}^{#1}}}
\newcommand{\pdvStar}[2][{}]{\partial^{#1}/\partial{#2}^{#1}}
\newcommand{\pdvTwo}[3][{}]{\frac{\partial^{#1}{#2}}{\partial{#3}^{#1}}}
\newcommand{\pdvStarTwo}[3][{}]{\partial^{#1}{#2}/\partial{#3}^{#1}}
\newcommand{\pdvThree}[3]{\frac{\partial^2{#1}}{\partial{#2}\partial{#3}}}
\newcommand{\pdvStarThree}[3]{\partial^2{#1}/\partial{#2}\partial{#3}}
\newcommand{\bra}[1]{\left\langle{#1}\right\rvert}
\newcommand{\braStar}[1]{\langle{#1}\rvert}
\newcommand{\ket}[1]{\left\lvert{#1}\right\rangle}
\newcommand{\ketStar}[1]{\lvert{#1}\rangle}
\newcommand{\braket}[1]{\left\langle{#1}\middle|{#1}\right\rangle}
\newcommand{\braketStar}[1]{\langle{#1}|{#1}\rangle}
\newcommand{\braketTwo}[2]{\left\langle{#1}\middle|{#2}\right\rangle}
\newcommand{\braketStarTwo}[2]{\langle{#1}|{#2}\rangle}
\newcommand{\ev}[1]{\left\langle{#1}\right\rangle}
\newcommand{\evStar}[1]{\langle{#1}\rangle}
\newcommand{\evTwo}[2]{\left\langle{#2}\middle|{#1}\middle|{#2}\right\rangle}
\newcommand{\evStarTwo}[2]{\langle{#2}|{#1}|{#2}\rangle}
\newcommand{\mel}[3]{\left\langle{#1}\middle|{#2}\middle|{#3}\right\rangle}
\newcommand{\melStar}[3]{\langle{#1}|{#2}|{#3}\rangle}
\newcommand{\order}[1]{\mathcal{O}\left(#1\right)}
\newcommand{\bmat}[1]{\begin{bmatrix}#1\end{bmatrix}}
\newcommand{\Bmat}[1]{\left\{\begin{matrix}#1\end{matrix}\right\}}
\newcommand{\sumint}[1]{\int\kern-1.4em\sum}
\newcommand{\Q}[1]{\hat{#1}}
\newcommand{\opn}{\operatorname}
\newcommand{\norm}[1]{\left\lVert{#1}\right\rVert}
$
导数与差分
一阶导数
我们在导数的定义中已经知道1
\begin{equation}
f'(x) = \lim_{h\to 0}\frac{f(x + h/2) - f(x - h/2)}{h}
\end{equation}
在一些应用(如数值计算)中, 我们只能把 $h$ 取一个很小的数值(如 $10^{-10}$)而并非无穷小, 这就需要我们估计用上式右边的
差分来代替 $f'(x)$ 有多精确. 为了估算误差, 我们可以将 $f(x \pm h/2)$ 展开为关于 $h$ 的泰勒级数
\begin{equation}
f(x \pm h/2) = f(x) \pm f'(x)\frac h2 + \frac12 f''(x) \qtyRound{\frac h2}^2 + \order{h^3}
\end{equation}
代入
式 1 得
\begin{equation}
\lim_{h\to 0} \frac{f'(x)h + \order{h^3}}{h} = f'(x) + \order{h^2}
\end{equation}
所以用差分代替一阶导数可以精确到 $h$ 的二阶无穷小 $\order{h^2}$.
二阶导数
能否用类似的方法来表示二阶导数呢? 根据二阶导数的定义, 我们需要用双重极限来表示
\begin{equation}\ali{
f''(x) &= \lim_{l\to 0} \frac{f'(x+l/2) - f'(x - l/2)}{l}\\
&= \lim_{l\to 0}\lim_{h\to 0} \frac{1}{lh} [f(x + l/2 + h/2) - f(x + l/2 - h/2)\\
&\qquad\qquad - f(x - l/2 + h/2) + f(x - l/2 - h/2)]
}\end{equation}
但我们希望只用一个极限来表示二阶导数. 然而我们不确定 $h$ 是否需要是 $l$ 的高阶无穷小. 我们不妨来试试令 $l = h$, 即
\begin{equation}
f''(x) = \lim_{h\to 0} \frac{f(x + h) - 2f(x) +f(x-h)}{h^2}
\end{equation}
要验证该式成立与否, 将 $f(x \pm h)$ 关于 $h$ 做泰勒展开得
\begin{equation}
f(x \pm h) = f(x) \pm f'(x) h + \frac12 f''(x) h^2 \pm \frac16 f'''(x) h^3 + \order{h^4}
\end{equation}
代入
式 5 右边得
\begin{equation}
\lim_{h\to 0} \frac{f''(x)h^2 + \order{h^4}}{h^2} = f''(x) + \order{h^2}
\end{equation}
这就验证了
式 5 的正确性. 另外我们得知用差分来近似二阶导数 $f''(x)$ 同样是精确到二阶无穷小 $\order{h^2}$.
1. 以下假设 $f(x)$ 在某区间内处处可导.
致读者: 小时物理百科一直以来坚持所有内容免费且不做广告,这导致我们处于日渐严重的亏损状态。长此以往很可能会最终导致我们不得不选择商业化,例如大量广告,内容付费,会员制,甚至被收购。因此,我们鼓起勇气在此请求广大读者
热心捐款,使网站得以健康发展。如果看到这条信息的每位读者能慷慨捐助 10 元,我们几天内就能脱离亏损状态,并保证网站能在接下来的一整年里向所有读者继续免费提供优质内容。感谢您的支持。
—— 小时(项目创始人)