泛函导数

在数学和理论物理中，泛函导数是方向导数的推广。后者对一个有限维向量求微分，而前者则对一个连续函数（可视为无穷维向量）求微分。它们都可以认为是简单的一元微积分中导数的扩展。数学里专门研究泛函导数的分支是泛函分析。 设有流形 M 代表（连续/光滑/有某些边界条件等的）函数 φ 以及泛函 F： F : M → R or F : M → C {\displaystyle F\colon M\rightarrow \mathbb {R} \quad {\mbox{or}}\quad F\colon M\rightarrow \mathbb {C} } , 则F的泛函导数，记为 δ F / δ φ {\displaystyle {\delta F}/{\delta \varphi }} ,是一个满足以下条件的分布： 对任何测量函数 f: ⟨ δ F [ φ ( x ) ] δ φ ( x ) , f ( x ) ⟩ = ∫ δ F [ φ ( x ) ] δ φ ( x ′ ) f ( x ′ ) d x ′ = lim ε → 0 F [ φ ( x ) + ε f ( x ) ] − F [ φ ( x ) ] ε = d d ϵ F [ φ + ϵ f ] | ϵ = 0 . {\displaystyle {\begin{aligned}\left\langle {\frac {\delta F[\varphi (x)]}{\delta \varphi (x)}},f(x)\right\rangle &=\int {\frac {\delta F[\varphi (x)]}{\delta \varphi (x')}}f(x')dx'\\&=\lim _{\varepsilon \to 0}{\frac {F[\varphi (x)+\varepsilon f(x)]-F[\varphi (x)]}{\varepsilon }}\\&=\left.{\frac {d}{d\epsilon }}F[\varphi +\epsilon f]\right|_{\epsilon =0}.\end{aligned}}} 用 φ {\displaystyle \varphi } 的一次变分 δ φ {\displaystyle \delta \varphi } 代替 f {\displaystyle f} 就得到 F {\displaystyle F} 的一次变分 δ F {\displaystyle \delta F} ； 在物理学中，通常用狄拉克δ函数 δ ( x − y ) {\displaystyle \delta (x-y)} ，而不是一般的测试函数 f ( x ) {\displaystyle f(x)} , 来求出点 y {\displaystyle y} 处的泛函导数(这是整个泛函变分的关键点，就像偏导数是梯度的一个分量): δ F [ φ ( x ) ] δ φ ( y ) = lim ε → 0 F [ φ ( x ) + ε δ ( x − y ) ] − F [ φ ( x ) ] ε . {\displaystyle {\frac {\delta F[\varphi (x)]}{\delta \varphi (y)}}=\lim _{\varepsilon \to 0}{\frac {F[\varphi (x)+\varepsilon \delta (x-y)]-F[\varphi (x)]}{\varepsilon }}.} 这适用于 F [ φ ( x ) + ε f ( x ) ] {\displaystyle F[\varphi (x)+\varepsilon f(x)]} 可以展开成 ε {\displaystyle \varepsilon } 的级数時 (或者至少能展为1阶). 但是这一表达在数学上并不严格,因为 F [ φ ( x ) + ε δ ( x − y ) ] {\displaystyle F[\varphi (x)+\varepsilon \delta (x-y)]} 一般而言并未定义。 通过更仔细地定义函数空间，泛函导数的定义可以更准确、正式。例如，当函数空间是一个巴拿赫空间时, 泛函导数就是著名的Fréchet导数, 而这在更一般的局部凸空间上使用加托導數。注意，著名的希尔伯特空间是巴拿赫空间的特例。更正式的处理允许将普通微积分和数学分析的定理推广为泛函分析中对应的定理，以及大量的新定理。 與函數的導數類似，泛函導數滿足下列的性質：（其中 F[ρ] 和 G[ρ] 為兩個泛函） 線性： δ ( λ F + μ G ) [ ρ ] δ ρ ( x ) = λ δ F [ ρ ] δ ρ ( x ) + μ δ G [ ρ ] δ ρ ( x ) , {\displaystyle {\frac {\delta (\lambda F+\mu G)[\rho ]}{\delta \rho (x)}}=\lambda {\frac {\delta F[\rho ]}{\delta \rho (x)}}+\mu {\frac {\delta G[\rho ]}{\delta \rho (x)}},} 其中 λ, μ 皆為常數。 積法則： δ ( F G ) [ ρ ] δ ρ ( x ) = δ F [ ρ ] δ ρ ( x ) G [ ρ ] + F [ ρ ] δ G [ ρ ] δ ρ ( x ) , {\displaystyle {\frac {\delta (FG)[\rho ]}{\delta \rho (x)}}={\frac {\delta F[\rho ]}{\delta \rho (x)}}G[\rho ]+F[\rho ]{\frac {\delta G[\rho ]}{\delta \rho (x)}}\,,} 鏈式法則： 若 F 和 G 為兩個泛函，則 δ F [ G [ ρ ] ] δ ρ ( y ) = ∫ d x δ F [ G ( ρ ) ] δ G [ ρ ( x ) ]   δ G [ ρ ] δ ρ ( y )   . {\displaystyle \displaystyle {\frac {\delta F[G[\rho ]]}{\delta \rho (y)}}=\int dx{\frac {\delta F[G(\rho )]}{\delta G[\rho (x)]}}\ {\frac {\delta G[\rho ]}{\delta \rho (y)}}\ .} 若當中的 G 為一個普通的可導函數 g，則上式化為 δ F [ g ( ρ ) ] δ ρ ( y ) = δ F [ g ( ρ ) ] δ g [ ρ ( x ) ]   d g ( ρ ) d ρ ( y )   . {\displaystyle \displaystyle {\frac {\delta F[g(\rho )]}{\delta \rho (y)}}={\frac {\delta F[g(\rho )]}{\delta g[\rho (x)]}}\ {\frac {dg(\rho )}{d\rho (y)}}\ .} 上面给出的定义是基于一种对所有测量函数 f都成立的关系，因此有人可能会想，它在 f是一个指定的函数（比如说狄拉克δ函数）时也应该成立。但是，δ函数不是一个合理的测量函数。 在定义中，泛函导数描述了整个函数 φ ( x ) {\displaystyle \varphi (x)} 发生微小变化时，泛函 F [ φ ( x ) ] {\displaystyle F[\varphi (x)]} 如何变化。其中， φ ( x ) {\displaystyle \varphi (x)} 的变化量的具体形式没有指明， 給定泛函 F [ ρ ] = ∫ f ( r , ρ ( r ) , ∇ ρ ( r ) ) d r , {\displaystyle F[\rho ]=\int f({\boldsymbol {r}},\rho ({\boldsymbol {r}}),\nabla \rho ({\boldsymbol {r}}))\,d{\boldsymbol {r}},} 及在積分區域的邊界上恆為零的函數 ϕ(r)，由定義可得： ∫ δ F δ ρ ( r ) ϕ ( r ) d r = [ d d ε ∫ f ( r , ρ + ε ϕ , ∇ ρ + ε ∇ ϕ ) d r ] ε = 0 = ∫ ( ∂ f ∂ ρ ϕ + ∂ f ∂ ∇ ρ ⋅ ∇ ϕ ) d r = ∫ [ ∂ f ∂ ρ ϕ + ∇ ⋅ ( ∂ f ∂ ∇ ρ ϕ ) − ( ∇ ⋅ ∂ f ∂ ∇ ρ ) ϕ ] d r = ∫ [ ∂ f ∂ ρ ϕ − ( ∇ ⋅ ∂ f ∂ ∇ ρ ) ϕ ] d r = ∫ ( ∂ f ∂ ρ − ∇ ⋅ ∂ f ∂ ∇ ρ ) ϕ ( r )   d r . {\displaystyle {\begin{aligned}\int {\frac {\delta F}{\delta \rho ({\boldsymbol {r}})}}\,\phi ({\boldsymbol {r}})\,d{\boldsymbol {r}}&=\left[{\frac {d}{d\varepsilon }}\int f({\boldsymbol {r}},\rho +\varepsilon \phi ,\nabla \rho +\varepsilon \nabla \phi )\,d{\boldsymbol {r}}\right]_{\varepsilon =0}\\&=\int \left({\frac {\partial f}{\partial \rho }}\,\phi +{\frac {\partial f}{\partial \nabla \rho }}\cdot \nabla \phi \right)d{\boldsymbol {r}}\\&=\int \left[{\frac {\partial f}{\partial \rho }}\,\phi +\nabla \cdot \left({\frac {\partial f}{\partial \nabla \rho }}\,\phi \right)-\left(\nabla \cdot {\frac {\partial f}{\partial \nabla \rho }}\right)\phi \right]d{\boldsymbol {r}}\\&=\int \left[{\frac {\partial f}{\partial \rho }}\,\phi -\left(\nabla \cdot {\frac {\partial f}{\partial \nabla \rho }}\right)\phi \right]d{\boldsymbol {r}}\\&=\int \left({\frac {\partial f}{\partial \rho }}-\nabla \cdot {\frac {\partial f}{\partial \nabla \rho }}\right)\phi ({\boldsymbol {r}})\ d{\boldsymbol {r}}\,.\end{aligned}}} 其中第二行用到了 f 的全微分， ∂f /∂∇ρ 為純量對向量的導數。 第三行則用到了散度的積法則。第四行由高斯散度定理及邊界上 ϕ=0 的條件得到。由於 ϕ 可以是任意的函數，由變分法基本引理可知，所求泛函導數為 δ F δ ρ ( r ) = ∂ f ∂ ρ − ∇ ⋅ ∂ f ∂ ∇ ρ {\displaystyle {\frac {\delta F}{\delta \rho ({\boldsymbol {r}})}}={\frac {\partial f}{\partial \rho }}-\nabla \cdot {\frac {\partial f}{\partial \nabla \rho }}} 其中 ρ = ρ(r) 且 f = f (r, ρ, ∇ρ)。只要 F[ρ] 具有本節首段的形式，上述公式就適用。對於其他的泛函形式，可由定義出發，求出其泛函導數。（見库仑势能泛函。) 以上公式可推廣到高維，並且有其他高階導數的情況。則泛函可寫成 F [ ρ ( r ) ] = ∫ f ( r , ρ ( r ) , ∇ ρ ( r ) , ∇ ( 2 ) ρ ( r ) , … , ∇ ( N ) ρ ( r ) ) d r , {\displaystyle F[\rho ({\boldsymbol {r}})]=\int f({\boldsymbol {r}},\rho ({\boldsymbol {r}}),\nabla \rho ({\boldsymbol {r}}),\nabla ^{(2)}\rho ({\boldsymbol {r}}),\dots ,\nabla ^{(N)}\rho ({\boldsymbol {r}}))\,d{\boldsymbol {r}},} 其中向量 r ∈ ℝn，而 ∇(i) 為一個張量，其 ni 個分量分別為 i 階微分算子 [ ∇ ( i ) ] α 1 α 2 ⋯ α i = ∂ i ∂ r α 1 ∂ r α 2 ⋯ ∂ r α i where α 1 , α 2 , ⋯ , α i = 1 , 2 , ⋯ , n   . {\displaystyle \left[\nabla ^{(i)}\right]_{\alpha _{1}\alpha _{2}\cdots \alpha _{i}}={\frac {\partial ^{\,i}}{\partial r_{\alpha _{1}}\partial r_{\alpha _{2}}\cdots \partial r_{\alpha _{i}}}}\qquad \qquad {\text{where}}\quad \alpha _{1},\alpha _{2},\cdots ,\alpha _{i}=1,2,\cdots ,n\ .} 與上面類似，由泛函導數的定義可知： δ F [ ρ ] δ ρ = ∂ f ∂ ρ − ∇ ⋅ ∂ f ∂ ( ∇ ρ ) + ∇ ( 2 ) ⋅ ∂ f ∂ ( ∇ ( 2 ) ρ ) + ⋯ + ( − 1 ) N ∇ ( N ) ⋅ ∂ f ∂ ( ∇ ( N ) ρ ) = ∂ f ∂ ρ + ∑ i = 1 N ( − 1 ) i ∇ ( i ) ⋅ ∂ f ∂ ( ∇ ( i ) ρ )   . {\displaystyle {\begin{aligned}{\frac {\delta F[\rho ]}{\delta \rho }}&{}={\frac {\partial f}{\partial \rho }}-\nabla \cdot {\frac {\partial f}{\partial (\nabla \rho )}}+\nabla ^{(2)}\cdot {\frac {\partial f}{\partial \left(\nabla ^{(2)}\rho \right)}}+\dots +(-1)^{N}\nabla ^{(N)}\cdot {\frac {\partial f}{\partial \left(\nabla ^{(N)}\rho \right)}}\\&{}={\frac {\partial f}{\partial \rho }}+\sum _{i=1}^{N}(-1)^{i}\nabla ^{(i)}\cdot {\frac {\partial f}{\partial \left(\nabla ^{(i)}\rho \right)}}\ .\end{aligned}}} 式中，張量 ∂ f ∂ ( ∇ ( i ) ρ ) {\displaystyle {\frac {\partial f}{\partial \left(\nabla ^{(i)}\rho \right)}}} 具有 ni 個分量，各為 f 對 ρ 偏導數之偏導數，即： [ ∂ f ∂ ( ∇ ( i ) ρ ) ] α 1 α 2 ⋯ α i = ∂ f ∂ ρ α 1 α 2 ⋯ α i where ρ α 1 α 2 ⋯ α i ≡ ∂ i ρ ∂ r α 1 ∂ r α 2 ⋯ ∂ r α i   , {\displaystyle \left[{\frac {\partial f}{\partial \left(\nabla ^{(i)}\rho \right)}}\right]_{\alpha _{1}\alpha _{2}\cdots \alpha _{i}}={\frac {\partial f}{\partial \rho _{\alpha _{1}\alpha _{2}\cdots \alpha _{i}}}}\qquad \qquad {\text{where}}\quad \rho _{\alpha _{1}\alpha _{2}\cdots \alpha _{i}}\equiv {\frac {\partial ^{\,i}\rho }{\partial r_{\alpha _{1}}\,\partial r_{\alpha _{2}}\cdots \partial r_{\alpha _{i}}}}\ ,} 並定義張量的純量積為 ∇ ( i ) ⋅ ∂ f ∂ ( ∇ ( i ) ρ ) = ∑ α 1 , α 2 , ⋯ , α i = 1 n   ∂ i ∂ r α 1 ∂ r α 2 ⋯ ∂ r α i   ∂ f ∂ ρ α 1 α 2 ⋯ α i   . {\displaystyle \nabla ^{(i)}\cdot {\frac {\partial f}{\partial \left(\nabla ^{(i)}\rho \right)}}=\sum _{\alpha _{1},\alpha _{2},\cdots ,\alpha _{i}=1}^{n}\ {\frac {\partial ^{\,i}}{\partial r_{\alpha _{1}}\,\partial r_{\alpha _{2}}\cdots \partial r_{\alpha _{i}}}}\ {\frac {\partial f}{\partial \rho _{\alpha _{1}\alpha _{2}\cdots \alpha _{i}}}}\ .} 1927年的Thomas-Fermi模型（英语：Thomas–Fermi model）对于无相互作用的单一电子雲使用了动能泛函是密度泛函理论关于电子结构的第一次尝试 T T F [ ρ ] = C F ∫ ρ 5 / 3 ( r ) d r . {\displaystyle T_{\mathrm {TF} }[\rho ]=C_{\mathrm {F} }\int \rho ^{5/3}(\mathbf {r} )\,d\mathbf {r} .} T T F [ ρ ] {\displaystyle T_{\mathrm {TF} }[\rho ]} 只与电子密度有关 ρ ( r ) {\displaystyle \rho (\mathbf {r} )} 并且不依赖于其梯度, Laplacian, 或者其他更高阶的微分 (像这样的泛函被称为是“局部的”). 因此， δ T T F [ ρ ] δ ρ = C F ∂ ρ 5 / 3 ( r ) ∂ ρ ( r ) = 5 3 C F ρ 2 / 3 ( r ) . {\displaystyle {\frac {\delta T_{\mathrm {TF} }[\rho ]}{\delta \rho }}=C_{\mathrm {F} }{\frac {\partial \rho ^{5/3}(\mathbf {r} )}{\partial \rho (\mathbf {r} )}}={\frac {5}{3}}C_{\mathrm {F} }\rho ^{2/3}(\mathbf {r} ).} 托馬斯和費米利用了以下库仑勢能泛函來描述電子與核之間的電勢 V [ ρ ] = ∫ ρ ( r ) | r |   d r . {\displaystyle V[\rho ]=\int {\frac {\rho ({\boldsymbol {r}})}{|{\boldsymbol {r}}|}}\ d{\boldsymbol {r}}.} 由泛函導數的定義， ∫ δ V δ ρ ( r )   ϕ ( r )   d r = [ d d ε ∫ ρ ( r ) + ε ϕ ( r ) | r |   d r ] ε = 0 = ∫ 1 | r | ϕ ( r )   d r . {\displaystyle {\begin{aligned}\int {\frac {\delta V}{\delta \rho ({\boldsymbol {r}})}}\ \phi ({\boldsymbol {r}})\ d{\boldsymbol {r}}&{}=\left[{\frac {d}{d\varepsilon }}\int {\frac {\rho ({\boldsymbol {r}})+\varepsilon \phi ({\boldsymbol {r}})}{|{\boldsymbol {r}}|}}\ d{\boldsymbol {r}}\right]_{\varepsilon =0}\\&{}=\int {\frac {1}{|{\boldsymbol {r}}|}}\,\phi ({\boldsymbol {r}})\ d{\boldsymbol {r}}\,.\end{aligned}}} 故 δ V δ ρ ( r ) = 1 | r |   . {\displaystyle {\frac {\delta V}{\delta \rho ({\boldsymbol {r}})}}={\frac {1}{|{\boldsymbol {r}}|}}\ .} 至於電子與電子間的相互作用，由以下庫侖勢能泛函描述： J [ ρ ] = 1 2 ∬ ρ ( r ) ρ ( r ′ ) | r − r ′ | d r d r ′ . {\displaystyle J[\rho ]={\frac {1}{2}}\iint {\frac {\rho (\mathbf {r} )\rho (\mathbf {r} ')}{\vert \mathbf {r} -\mathbf {r} '\vert }}\,d\mathbf {r} d\mathbf {r} '\,.} 由定義， ∫ δ J δ ρ ( r ) ϕ ( r ) d r = [ d   d ϵ J [ ρ + ϵ ϕ ] ] ϵ = 0 = [ d   d ϵ ( 1 2 ∬ [ ρ ( r ) + ϵ ϕ ( r ) ] [ ρ ( r ′ ) + ϵ ϕ ( r ′ ) ] | r − r ′ | d r d r ′ ) ] ϵ = 0 = 1 2 ∬ ρ ( r ′ ) ϕ ( r ) | r − r ′ | d r d r ′ + 1 2 ∬ ρ ( r ) ϕ ( r ′ ) | r − r ′ | d r d r ′ {\displaystyle {\begin{aligned}\int {\frac {\delta J}{\delta \rho ({\boldsymbol {r}})}}\phi ({\boldsymbol {r}})d{\boldsymbol {r}}&{}=\left[{\frac {d\ }{d\epsilon }}\,J[\rho +\epsilon \phi ]\right]_{\epsilon =0}\\&{}=\left[{\frac {d\ }{d\epsilon }}\,\left({\frac {1}{2}}\iint {\frac {[\rho ({\boldsymbol {r}})+\epsilon \phi ({\boldsymbol {r}})]\,[\rho ({\boldsymbol {r}}')+\epsilon \phi ({\boldsymbol {r}}')]}{\vert {\boldsymbol {r}}-{\boldsymbol {r}}'\vert }}\,d{\boldsymbol {r}}d{\boldsymbol {r}}'\right)\right]_{\epsilon =0}\\&{}={\frac {1}{2}}\iint {\frac {\rho ({\boldsymbol {r}}')\phi ({\boldsymbol {r}})}{\vert {\boldsymbol {r}}-{\boldsymbol {r}}'\vert }}\,d{\boldsymbol {r}}d{\boldsymbol {r}}'+{\frac {1}{2}}\iint {\frac {\rho ({\boldsymbol {r}})\phi ({\boldsymbol {r}}')}{\vert {\boldsymbol {r}}-{\boldsymbol {r}}'\vert }}\,d{\boldsymbol {r}}d{\boldsymbol {r}}'\\\end{aligned}}} 式末的兩個積分相等，因為可以交換第二個積分中 r 和 r′ 兩個變數，而不改變積分的值。因此， ∫ δ J δ ρ ( r ) ϕ ( r ) d r = ∫ ( ∫ ρ ( r ′ ) | r − r ′ | d r ′ ) ϕ ( r ) d r {\displaystyle \int {\frac {\delta J}{\delta \rho ({\boldsymbol {r}})}}\phi ({\boldsymbol {r}})d{\boldsymbol {r}}=\int \left(\int {\frac {\rho ({\boldsymbol {r}}')}{\vert {\boldsymbol {r}}-{\boldsymbol {r}}'\vert }}d{\boldsymbol {r}}'\right)\phi ({\boldsymbol {r}})d{\boldsymbol {r}}} 故電子－電子庫侖勢能泛函 J[ρ] 的導數為 δ J δ ρ ( r ) = ∫ ρ ( r ′ ) | r − r ′ | d r ′ . {\displaystyle {\frac {\delta J}{\delta \rho ({\boldsymbol {r}})}}=\int {\frac {\rho ({\boldsymbol {r}}')}{\vert {\boldsymbol {r}}-{\boldsymbol {r}}'\vert }}d{\boldsymbol {r}}'\,.} 且其二階泛函導數為 δ 2 J [ ρ ] δ ρ ( r ′ ) δ ρ ( r ) = ∂ ∂ ρ ( r ′ ) ( ρ ( r ′ ) | r − r ′ | ) = 1 | r − r ′ | . {\displaystyle {\frac {\delta ^{2}J[\rho ]}{\delta \rho (\mathbf {r} ')\delta \rho (\mathbf {r} )}}={\frac {\partial }{\partial \rho (\mathbf {r} ')}}\left({\frac {\rho (\mathbf {r} ')}{\vert \mathbf {r} -\mathbf {r} '\vert }}\right)={\frac {1}{\vert \mathbf {r} -\mathbf {r} '\vert }}.} 1935 年，魏茨泽克提出，在托馬斯－費米動能泛函中添加一項梯度修正，使之能更準確描述分子的電子雲： T W [ ρ ] = 1 8 ∫ ∇ ρ ( r ) ⋅ ∇ ρ ( r ) ρ ( r ) d r = ∫ t W   d r , {\displaystyle T_{\mathrm {W} }[\rho ]={\frac {1}{8}}\int {\frac {\nabla \rho (\mathbf {r} )\cdot \nabla \rho (\mathbf {r} )}{\rho (\mathbf {r} )}}d\mathbf {r} =\int t_{\mathrm {W} }\ d\mathbf {r} \,,} 其中 t W ≡ 1 8 ∇ ρ ⋅ ∇ ρ ρ and     ρ = ρ ( r )   . {\displaystyle t_{\mathrm {W} }\equiv {\frac {1}{8}}{\frac {\nabla \rho \cdot \nabla \rho }{\rho }}\qquad {\text{and}}\ \ \rho =\rho ({\boldsymbol {r}})\ .} 由上節的公式可得 δ T W δ ρ ( r ) = ∂ t W ∂ ρ − ∇ ⋅ ∂ t W ∂ ∇ ρ = − 1 8 ∇ ρ ⋅ ∇ ρ ρ 2 − ( 1 4 ∇ 2 ρ ρ − 1 4 ∇ ρ ⋅ ∇ ρ ρ 2 ) where     ∇ 2 = ∇ ⋅ ∇   , {\displaystyle {\begin{aligned}{\frac {\delta T_{\mathrm {W} }}{\delta \rho ({\boldsymbol {r}})}}&={\frac {\partial t_{\mathrm {W} }}{\partial \rho }}-\nabla \cdot {\frac {\partial t_{\mathrm {W} }}{\partial \nabla \rho }}\\&=-{\frac {1}{8}}{\frac {\nabla \rho \cdot \nabla \rho }{\rho ^{2}}}-\left({\frac {1}{4}}{\frac {\nabla ^{2}\rho }{\rho }}-{\frac {1}{4}}{\frac {\nabla \rho \cdot \nabla \rho }{\rho ^{2}}}\right)\qquad {\text{where}}\ \ \nabla ^{2}=\nabla \cdot \nabla \ ,\end{aligned}}} 故所求泛函導數為 δ T W δ ρ ( r ) =     1 8 ∇ ρ ⋅ ∇ ρ ρ 2 − 1 4 ∇ 2 ρ ρ   . {\displaystyle {\frac {\delta T_{\mathrm {W} }}{\delta \rho ({\boldsymbol {r}})}}=\ \ \,{\frac {1}{8}}{\frac {\nabla \rho \cdot \nabla \rho }{\rho ^{2}}}-{\frac {1}{4}}{\frac {\nabla ^{2}\rho }{\rho }}\ .} 最后，注意到任何函数都可以以积分的形式表示成一个泛函。例如， ρ ( r ) = ∫ ρ ( r ′ ) δ ( r − r ′ ) d r ′ . {\displaystyle \rho (\mathbf {r} )=\int \rho (\mathbf {r} ')\delta (\mathbf {r} -\mathbf {r} ')\,d\mathbf {r} '.} 这个泛函只依赖于 ρ {\displaystyle \rho } ，像上面两个例子一样(就是说，它们都是“局部的”)。因此 δ ρ ( r ) δ ρ ( r ′ ) = ∂ ρ ( r ′ ) δ ( r − r ′ ) ∂ ρ ( r ′ ) = δ ( r − r ′ ) . {\displaystyle {\frac {\delta \rho (\mathbf {r} )}{\delta \rho (\mathbf {r} ')}}={\frac {\partial \rho (\mathbf {r} ')\delta (\mathbf {r} -\mathbf {r} ')}{\partial \rho (\mathbf {r} ')}}=\delta (\mathbf {r} -\mathbf {r} ').} 离散随机变量的熵是概率质量函数的一个泛函 H [ p ( x ) ] = − ∑ x p ( x ) log ⁡ p ( x ) {\displaystyle {\begin{aligned}H[p(x)]=-\sum _{x}p(x)\log p(x)\end{aligned}}} 于是 ⟨ δ H δ p , ϕ ⟩ = ∑ x δ H [ p ( x ) ] δ p ( x ′ ) ϕ ( x ′ ) = d d ϵ H [ p ( x ) + ϵ ϕ ( x ) ] | ϵ = 0 = − d d ε ∑ x [ p ( x ) + ε ϕ ( x ) ] log ⁡ [ p ( x ) + ε ϕ ( x ) ] | ε = 0 = − ∑ x [ 1 + log ⁡ p ( x ) ] ϕ ( x ) = ⟨ − [ 1 + log ⁡ p ( x ) ] , ϕ ⟩ . {\displaystyle {\begin{aligned}\left\langle {\frac {\delta H}{\delta p}},\phi \right\rangle &{}=\sum _{x}{\frac {\delta H[p(x)]}{\delta p(x')}}\,\phi (x')\\&{}=\left.{\frac {d}{d\epsilon }}H[p(x)+\epsilon \phi (x)]\right|_{\epsilon =0}\\&{}=-{\frac {d}{d\varepsilon }}\left.\sum _{x}[p(x)+\varepsilon \phi (x)]\log[p(x)+\varepsilon \phi (x)]\right|_{\varepsilon =0}\\&{}=\displaystyle -\sum _{x}[1+\log p(x)]\phi (x)\\&{}=\left\langle -[1+\log p(x)],\phi \right\rangle .\end{aligned}}} 最后， δ H δ p = − 1 − log ⁡ p ( x ) . {\displaystyle {\frac {\delta H}{\delta p}}=-1-\log p(x).} 令 F [ φ ( x ) ] = e ∫ φ ( x ) g ( x ) d x . {\displaystyle F[\varphi (x)]=e^{\int \varphi (x)g(x)dx}.} 以 δ {\displaystyle \delta } 函数作为测量函数 δ F [ φ ( x ) ] δ φ ( y ) = lim ε → 0 F [ φ ( x ) + ε δ ( x − y ) ] − F [ φ ( x ) ] ε = lim ε → 0 e ∫ ( φ ( x ) + ε δ ( x − y ) ) g ( x ) d x − e ∫ φ ( x ) g ( x ) d x ε = e ∫ φ ( x ) g ( x ) d x lim ε → 0 e ε ∫ δ ( x − y ) g ( x ) d x − 1 ε = e ∫ φ ( x ) g ( x ) d x lim ε → 0 e ε g ( y ) − 1 ε = e ∫ φ ( x ) g ( x ) d x g ( y ) . {\displaystyle {\begin{aligned}{\frac {\delta F[\varphi (x)]}{\delta \varphi (y)}}&{}=\lim _{\varepsilon \to 0}{\frac {F[\varphi (x)+\varepsilon \delta (x-y)]-F[\varphi (x)]}{\varepsilon }}\\&{}=\lim _{\varepsilon \to 0}{\frac {e^{\int (\varphi (x)+\varepsilon \delta (x-y))g(x)dx}-e^{\int \varphi (x)g(x)dx}}{\varepsilon }}\\&{}=e^{\int \varphi (x)g(x)dx}\lim _{\varepsilon \to 0}{\frac {e^{\varepsilon \int \delta (x-y)g(x)dx}-1}{\varepsilon }}\\&{}=e^{\int \varphi (x)g(x)dx}\lim _{\varepsilon \to 0}{\frac {e^{\varepsilon g(y)}-1}{\varepsilon }}\\&{}=e^{\int \varphi (x)g(x)dx}g(y).\end{aligned}}} 因此 δ F [ φ ( x ) ] δ φ ( y ) = g ( y ) F [ φ ( x ) ] . {\displaystyle {\frac {\delta F[\varphi (x)]}{\delta \varphi (y)}}=g(y)F[\varphi (x)].} 在三維笛卡尔坐标系中， ∂ f ∂ ∇ ρ = ∂ f ∂ ρ x i ^ + ∂ f ∂ ρ y j ^ + ∂ f ∂ ρ z k ^ , where   ρ x = ∂ ρ ∂ x ,   ρ y = ∂ ρ ∂ y ,   ρ z = ∂ ρ ∂ z and     i ^ ,   j ^ ,   k ^     are unit vectors along the x, y, z axes. {\displaystyle {\begin{aligned}{\frac {\partial f}{\partial \nabla \rho }}={\frac {\partial f}{\partial \rho _{x}}}\mathbf {\hat {i}} +{\frac {\partial f}{\partial \rho _{y}}}\mathbf {\hat {j}} +{\frac {\partial f}{\partial \rho _{z}}}\mathbf {\hat {k}} \,,\qquad &{\text{where}}\ \rho _{x}={\frac {\partial \rho }{\partial x}}\,,\ \rho _{y}={\frac {\partial \rho }{\partial y}}\,,\ \rho _{z}={\frac {\partial \rho }{\partial z}}\,\\&{\text{and}}\ \ \mathbf {\hat {i}} ,\ \mathbf {\hat {j}} ,\ \mathbf {\hat {k}} \ \ {\text{are unit vectors along the x, y, z axes.}}\end{aligned}}} 例如，對於三維 (n = 3) 和二階 (i = 2) 導數，張量 ∇(2) 的分量為 [ ∇ ( 2 ) ] α β = ∂ 2 ∂ r α ∂ r β where α , β = 1 , 2 , 3 . {\displaystyle \left[\nabla ^{(2)}\right]_{\alpha \beta }={\frac {\partial ^{\,2}}{\partial r_{\alpha }\,\partial r_{\beta }}}\qquad \qquad {\text{where}}\quad \alpha ,\beta =1,2,3\,.} 例如，當 n = 3 及 i = 2時，張量的純量積為 ∇ ( 2 ) ⋅ ∂ f ∂ ( ∇ ( 2 ) ρ ) = ∑ α , β = 1 3   ∂ 2 ∂ r α ∂ r β   ∂ f ∂ ρ α β where     ρ α β ≡ ∂ 2 ρ ∂ r α ∂ r β   . {\displaystyle \nabla ^{(2)}\cdot {\frac {\partial f}{\partial \left(\nabla ^{(2)}\rho \right)}}=\sum _{\alpha ,\beta =1}^{3}\ {\frac {\partial ^{\,2}}{\partial r_{\alpha }\,\partial r_{\beta }}}\ {\frac {\partial f}{\partial \rho _{\alpha \beta }}}\qquad {\text{where}}\ \ \rho _{\alpha \beta }\equiv {\frac {\partial ^{\,2}\rho }{\partial r_{\alpha }\,\partial r_{\beta }}}\ .} (Parr & Yang 1989，p. 247, Eq. A.3) harv error: no target: CITEREFParrYang1989 (help). (Parr & Yang 1989，p. 247, Eq. A.4) harv error: no target: CITEREFParrYang1989 (help). (Greiner & Reinhardt 1996，p. 38, Eq. 6) harv error: no target: CITEREFGreinerReinhardt1996 (help). (Greiner & Reinhardt 1996，p. 38, Eq. 7) harv error: no target: CITEREFGreinerReinhardt1996 (help). (Parr & Yang 1989，p. 248, Eq. A.11) harv error: no target: CITEREFParrYang1989 (help). (Parr & Yang 1989，p. 247, Eq. A.9) harv error: no target: CITEREFParrYang1989 (help). R. G. Parr, W. Yang, “Density-Functional Theory of Atoms and Molecules”, Oxford University Press, Oxford 1989. B. A. Frigyik, S. Srivastava and M. R. Gupta, Introduction to Functional Derivatives, UWEE Tech Report 2008-0001. https://web.archive.org/web/20120207192424/http://www.ee.washington.edu/research/guptalab/publications/functionalDerivativesIntroduction.pdf