変分原理
δ S [ q ( t ) ] = ∫ t 1 t 2 [ ∂ L ∂ q δ q + ∂ L ∂ q ̇ δ q ̇ ] d t = ∫ t 1 t 2 [ ∂ L ∂ q δ q + d d t ( ∂ L ∂ q ̇ δ q ) − d d t ( ∂ L ∂ q ̇ ) δ q ] d t = ∂ L ∂ q ̇ δ q | t 1 t 2 + ∫ t 1 t 2 [ ∂ L ∂ q − d d t ( ∂ L ∂ q ̇ ) ] δ q d t , {\displaystyle {\begin{aligned}\delta S\left[q(t)\right]&=\int _{t_{1}}^{t_{2}}\left[{\frac {\partial L}{\partial q}}\delta q+{\frac {\partial L}{\partial {\dot {q}}}}\delta {\dot {q}}\right]dt\\&=\int _{t_{1}}^{t_{2}}\left[{\frac {\partial L}{\partial q}}\delta q+{\frac {d}{dt}}\left({\frac {\partial L}{\partial {\dot {q}}}}\delta q\right)-{\frac {d}{dt}}\left({\frac {\partial L}{\partial {\dot {q}}}}\right)\delta q\right]dt\\&=\left.{\frac {\partial L}{\partial {\dot {q}}}}\delta {q}\right|_{t_{1}}^{t_{2}}+\int _{t_{1}}^{t_{2}}\left[{\frac {\partial L}{\partial q}}-{\frac {d}{dt}}\left({\frac {\partial L}{\partial {\dot {q}}}}\right)\right]\delta qdt,\end{aligned}}}
と変形できる。
δ F [ φ ( r ) ] = ∫ V { ∇ ⋅ ( δ φ ( r ) ∇ φ ( r ) ) − δ φ ( r ) ∇ 2 φ ( r ) − ρ ( r ) ε 0 δ φ ( r ) } d V = ∫ ∂ V δ φ ( r ) ∇ φ ( r ) ⋅ d S − ∫ V { ∇ 2 φ ( r ) + ρ ( r ) ε 0 } δ φ ( r ) d V = − ∫ V { ∇ 2 φ ( r ) + ρ ( r ) ε 0 } δ φ ( r ) d V {\displaystyle {\begin{aligned}\delta F[\phi ({\boldsymbol {r}})]&=\int _{V}\left\{\nabla \cdot \left(\delta \phi ({\boldsymbol {r}})\nabla \phi ({\boldsymbol {r}})\right)-\delta \phi ({\boldsymbol {r}})\nabla ^{2}\phi ({\boldsymbol {r}})-{\rho ({\boldsymbol {r}}) \over \varepsilon _{0}}\delta \phi ({\boldsymbol {r}})\right\}dV\\&=\int _{\partial V}\delta \phi ({\boldsymbol {r}})\nabla \phi ({\boldsymbol {r}})\cdot d{\boldsymbol {S}}-\int _{V}\left\{\nabla ^{2}\phi ({\boldsymbol {r}})+{\rho ({\boldsymbol {r}}) \over \varepsilon _{0}}\right\}\delta \phi ({\boldsymbol {r}})dV\\&=-\int _{V}\left\{\nabla ^{2}\phi ({\boldsymbol {r}})+{\rho ({\boldsymbol {r}}) \over \varepsilon _{0}}\right\}\delta \phi ({\boldsymbol {r}})dV\end{aligned}}}
となる。ここで、ガウスの発散定理および境界上 ∂ V {\displaystyle \partial V} で静電ポテンシャルの変分 δ φ ( r ) {\displaystyle \delta \phi ({\boldsymbol {r}})} がゼロであることを使った。