Ideas from the calculus of variations are commonly found in papers dealing with the finite element method. This handout discusses some of the basic notations and concepts of variational calculus. Most of the examples are from Variational Methods in Mechanics by T. Mura and T. Koya, Oxford University Press, 1992.
The calculus of variations is a sort of generalization of the calculus that you all know. The goal of variational calculus is to find the curve or surface that minimizes a given function. This function is usually a function of other functions and is also called a functional.
Maxima and minima of functions[edit | edit source]
The calculus of variations extends the ideas of maxima and minima of functions to functionals.
For a function of one variable
, the minimum occurs at some point
. For a functional, instead of a point minimum, we think in terms of a function that minimizes the functional. Thus, for a functional
we can have a minimizing function
.
The problem of finding extrema (minima and maxima) or points of inflection (saddle points) can either be constrained or unconstrained.
The unconstrained problem.[edit | edit source]
Suppose
is a function of one variable. We want to find the maxima, minima, and points of inflection for this function. No additional constraints are imposed on the function. Then, from elementary calculus, the function
has
- a minimum if
and
.
- a maximum if
and
.
- a point of inflection if
.
Any point where the condition
is satisfied is called a stationary point and we say that the function is stationary at that point.
A similar concept is used when the function is of the form
. Then, the function
is stationary if

Since
,
,
, and
are independent variables, we can write the stationarity condition as

The constrained problem - Lagrange multipliers.[edit | edit source]
Suppose we have a function
. We want to find the minimum (or maximum) of the function
with the added constraint that

The added constraint is equivalent to saying that the variables
,
, and
are not independent and we can write one of the variables in terms of the other two.
The stationarity condition for
is

Since the variables
,
, and
are not independent, the
coefficients of
,
, and
are not zero.
At this stage we could express
in terms of
and
using the constraint equation (1), form another stationarity condition involving only
and
, and set the coefficients of
and
to zero. However, it is usually impossible to solve equation (1) analytically for
. Hence, we use a more convenient approach called the Lagrange multiplier method.
Lagrange multiplier method.[edit | edit source]
From equation (1) we have

We introduce a parameter
called the Lagrange multiplier and using equation (2) we get

Then we have,

We choose the parameter
such that

Then, because
and
are independent, we must have

We can now use equations (1), (3), and (4) to solve for the extremum point and the Lagrange multiplier. The constraint is satisfied in the process.
Notice that equations (1), (3) and (4) can also be written as

where

Consider the functional
![{\displaystyle {\text{(5)}}\qquad I[y(x)]=\int _{x_{0}}^{x_{1}}\left[f(x)\left({\cfrac {dy(x)}{dx}}\right)^{2}+g(x)y(x)^{2}+2h(x)y(x)\right]~dx~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/afa5d60e04eb4002e74169c3f5dad3fc62336de6)
We wish to minimize the functional
with the constraints (prescribed boundary conditions)

Let the function
minimize
. Let us also choose a trial function (that is not quite equal to the solution
)

where
is a parameter, and
is an arbitrary continuous function that has the property that

(See Figure 1 for a geometric interpretation.)
Figure 1. Minimizing function  and trial functions.
|
Plug (6) into (5) to get
![{\displaystyle {\text{(8)}}\qquad I[y(x)+\lambda v(x)]=\int _{x_{0}}^{x_{1}}\left[f(x)\left({\cfrac {dy(x)}{dx}}+\lambda {\cfrac {dv}{dx}}\right)^{2}+g(x)\left[y(x)+\lambda v(x)\right]^{2}+2h(x)\left[y(x)+\lambda v(x)\right]\right]~dx~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f4f9f6a2eb12381e28450bb74f39a0e8c6882834)
You can show that equation (8) can be written as (show this)
![{\displaystyle I[y(x)+\lambda v(x)]=I[y(x)]+\delta I+\delta ^{2}I~~~~{\text{or,}}~~~~I[y(x)+\lambda v(x)]-I[y(x)]=\delta I+\delta ^{2}I}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9fd6d934ca03b10cdfa55277856e52d9800500b3)
where
![{\displaystyle {\text{(9)}}\qquad \delta I=2\lambda \int _{x_{0}}^{x_{1}}\left[f(x)\left({\cfrac {dy(x)}{dx}}\right)\left({\cfrac {dv(x)}{dx}}\right)+g(x)y(x)v(x)+h(x)v(x)\right]~dx}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2dcc710adcbde521d7c9e06f308e87b20dcb7259)
and
![{\displaystyle {\text{(10)}}\qquad \delta ^{2}I=\lambda ^{2}\int _{x_{0}}^{x_{1}}\left[f(x)\left({\cfrac {dv(x)}{dx}}\right)^{2}+g(x)[v(x)]^{2}\right]~dx~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/013505062e687c07493c5dfe2a34a6f4cf44225a)
The quantity
is called the first variation of
and
the quantity
is called the second variation of
. Notice
that
consists only of terms containing
while
consists only of terms containing
.
The necessary condition for
to be a minimum is

The first variation of the functional
in the direction
is defined as
![{\displaystyle {\delta I(y;v)=\lim _{\epsilon \rightarrow 0}{\cfrac {I[y+\epsilon v]-I[y]}{\epsilon }}\equiv \left.{\cfrac {d}{d\epsilon }}I[y+\epsilon v]\right|_{\epsilon =0}~.}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/eb1f4493066b07209126d17d545b90e6715df8b0)
To find which function makes
zero, we first integrate the first term of equation (9) by parts. We have,
![{\displaystyle \int _{x_{0}}^{x_{1}}\left(f{\cfrac {dy}{dx}}\right){\cfrac {dv}{dx}}~dx=\left[\left(f{\cfrac {dy}{dx}}\right)v\right]_{x_{0}}^{x_{1}}-\int _{x_{0}}^{x_{1}}{\cfrac {d}{dx}}\left(f{\cfrac {dy}{dx}}\right)v~dx~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6b189094dc654344b6b326f6ff45efb2b5a6763d)
Since
at
and
, we have

Plugging equation (12) into (9) and applying the minimizing condition (11), we get
![{\displaystyle 0=\int _{x_{0}}^{x_{1}}\left[-{\cfrac {d}{dx}}\left(f(x){\cfrac {dy(x)}{dx}}\right)v(x)+g(x)y(x)v(x)+h(x)v(x)\right]~dx}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7bff495d5d6c8be7c6d63f3c685e39a97b6803bc)
or,
![{\displaystyle {\text{(13)}}\qquad \int _{x_{0}}^{x_{1}}\left[-{\cfrac {d}{dx}}\left(f(x){\cfrac {dy(x)}{dx}}\right)+g(x)y(x)+h(x)\right]v(x)~dx=0~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/68d54de210ee45e243bcdc55a94e751b9bce82ed)
The fundamental lemma of variational calculus states that if
is a piecewise continuous function of
and
is a continuous function that vanishes on the boundary, then

Applying (14) to (13) we get

Equation (15) is called the Euler equation of the functional
. The solution of the Euler equation is the minimizing function that we seek.
Of course, we cannot be sure that the solution represents and minimum unless we check the second variation
. From equation (10) we can see that
if
and
and in that case the problem is guaranteed to be a minimization problem.
We often define

where
is called a variation of
.
In this notation, equation (9) can be written as
![{\displaystyle \delta I=2\int _{x_{0}}^{x_{1}}\left[f\left({\cfrac {dy}{dx}}\right)\delta y^{'}+gy\delta y+h\delta y\right]~dx}](https://wikimedia.org/api/rest_v1/media/math/render/svg/df20a449cf5dfb27865f3b9afd207d13245cf9c3)
You see this notation in the principle of virtual work in the mechanics of materials.
Consider the string of length
under a tension
(see Figure 2). When a vertical load
is applied, the string deforms by an amount
in the
-direction. The deformed length of an element
of the string is

If the deformation is small, we can expand the relation into a Taylor series and ignore the higher order terms to get
![{\displaystyle ds=\left[1+{\frac {1}{2}}\left({\cfrac {du}{dx}}\right)^{2}\right]dx~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/dabd7129e88213621ac4810830da0350c6c959de)
Figure 2. An elastic string under a transverse load.
|
The force T in the string moves a distance

Therefore, the work done by the force
(per unit original length of the string) (the stored elastic energy) is

The work done by the forces
(per unit original length of string) is

We want to minimize the total energy. Therefore, the functional to be minimized is
![{\displaystyle I[y]={\cfrac {T}{2}}\int _{0}^{l}\left({\cfrac {du}{dx}}\right)^{2}~dx-\int _{0}^{l}fu~dx~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/98ee87aac0a4a1015dd7329ec1012510ca22df82)
The Euler equation is

The solution is
