Appendix C — The First Variation and the Functional Derivative
This proof demonstrates the relationship between the first variation of a functional (\(\delta I\)) and its functional derivative (\(\frac{\partial I}{\partial u}\)) i.e.
\[ \delta I(u) = \frac{\partial I}{\partial u} \delta u \]
Define the Functional and its Variation
We begin with a common form of a functional, \(I\), which depends on a function \(u(x)\) and its first derivative \(u'(x)\).
\[ I[u(x)] = \int_{a}^{b} F(x, u(x), u'(x)) \,dx \]
The first variation of this functional, \(\delta I\), is defined by perturbing the function \(u(x)\) by a small amount \(\epsilon\eta(x)\), where \(\epsilon\) is a small scalar and \(\eta(x)\) is an arbitrary function. The variation is the derivative with respect to \(\epsilon\) evaluated at \(\epsilon=0\). \[ \delta I = \frac{d}{d\epsilon} I[u(x) + \epsilon\eta(x)] \bigg|_{\epsilon=0} \]
Upon substituting the perturbed function into the integral definition of \(I\).
\[ I[u + \epsilon\eta] = \int_{a}^{b} F(x, u + \epsilon\eta, u' + \epsilon\eta') \,dx \]
Differentiate with respect to \(\epsilon\)
We now differentiate the entire expression with respect to \(\epsilon\). Using the chain rule, the derivative passes inside the integral.
\[ \frac{d}{d\epsilon} I[u + \epsilon\eta] = \int_{a}^{b} \left( \frac{\partial F}{\partial u} \frac{\partial(u + \epsilon\eta)}{\partial\epsilon} + \frac{\partial F}{\partial u'} \frac{\partial(u' + \epsilon\eta')}{\partial\epsilon} \right) \,dx \]
The derivatives inside the parentheses are simply \(\eta(x)\) and \(\eta'(x)\), respectively.
\[ \frac{d}{d\epsilon} I[u + \epsilon\eta] = \int_{a}^{b} \left( \frac{\partial F}{\partial u}\eta(x) + \frac{\partial F}{\partial u'}\eta'(x) \right) \,dx \]
Apply integration by parts
To isolate the term \(\eta(x)\), we apply integration by parts to the second term in the integral. For \(\int v \, dw = vw - \int w \, dv\), we set:
- \(v = \frac{\partial F}{\partial u'}\)
- \(dw = \eta'(x)dx\)
- \(dv = \frac{d}{dx}\left(\frac{\partial F}{\partial u'}\right)dx\)
- \(w = \eta(x)\)
This gives: \[ \int_{a}^{b} \frac{\partial F}{\partial u'}\eta'(x) \,dx = \left[ \frac{\partial F}{\partial u'}\eta(x) \right]_{a}^{b} - \int_{a}^{b} \eta(x) \frac{d}{dx}\left(\frac{\partial F}{\partial u'}\right) \,dx \]
We assume the variation \(\eta(x)\) is zero at the boundaries (\(\eta(a) = \eta(b) = 0\)), so the boundary term \(\left[ \dots \right]_{a}^{b}\) vanishes.
Combine and identify the functional derivative
Substituting the result of the integration by parts back into our expression from Differentiate with respect to \epsilon, we get: \[ \frac{d}{d\epsilon} I[u + \epsilon\eta] = \int_{a}^{b} \left( \frac{\partial F}{\partial u}\eta(x) - \frac{d}{dx}\left(\frac{\partial F}{\partial u'}\right)\eta(x) \right) \,dx \] Now, we can factor out the arbitrary function \(\eta(x)\). \[ \frac{d}{d\epsilon} I[u + \epsilon\eta] = \int_{a}^{b} \left( \frac{\partial F}{\partial u} - \frac{d}{dx}\left(\frac{\partial F}{\partial u'}\right) \right) \eta(x) \,dx \] The term in the parentheses is defined as the functional derivative of \(I\) with respect to \(u\), denoted \(\frac{\delta I}{\delta u(x)}\). \[ \frac{\delta I}{\delta u(x)} \equiv \frac{\partial F}{\partial u} - \frac{d}{dx}\left(\frac{\partial F}{\partial u'}\right) \]
By substituting the definition of the functional derivative and replacing \(\epsilon\eta(x)\) with the general variation \(\delta u(x)\), we arrive at the final proven relationship: \[ \delta I = \int_{a}^{b} \frac{\delta I}{\delta u(x)} \delta u(x) \,dx \] This shows that the first variation (\(\delta I\)) is equal to the integral of the functional derivative (\(\frac{\delta I}{\delta u}\)) multiplied by the variation in the function (\(\delta u\)). In a discretized system like FEM, this integral becomes a dot product: \[ \delta I \approx \frac{\partial I}{\partial \boldsymbol{d}} \cdot \delta\boldsymbol{d} \]