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.
The calculus of variations extends the ideas of maxima and minima of functions to functionals.
For a function of one variable f(x), the minimum occurs at some point xmin. For a functional, instead of a point minimum, we think in terms of a function that minimizes the functional. Thus, for a functional I[f(x)] we can have a minimizing function fmin(x).
The problem of finding extrema (minima and maxima) or points of inflection (saddle points) can either be constrained or unconstrained.
Suppose f(x) 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 f(x) has
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 f(x1,x2, x3,t). Then, the function f is stationary if
Since x1, x2, x3, and t are independent variables, we can write the stationarity condition as
Suppose we have a function f(x1,x2, x3). We want to find the minimum (or maximum) of the function f with the added constraint that
The added constraint is equivalent to saying that the variables x1, x2, and x3 are not independent and we can write one of the variables in terms of the other two.
The stationarity condition for f is
Since the variables x1, x2, and x3 are not independent, the coefficients of dx1, dx2, and dx3 are not zero.
At this stage we could express x3 in terms of x1 and x2 using the constraint equation (1), form another stationarity condition involving only x1 and x2, and set the coefficients of dx1 and dx2 to zero. However, it is usually impossible to solve equation (1) analytically for x3. Hence, we use a more convenient approach called the Lagrange multiplier method.
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 x1 and x2 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
Consider the functional
We wish to minimize the functional I with the constraints (prescribed boundary conditions)
Let the function y = y(x) minimize I. Let us also choose a trial function (that is not quite equal to the solution y(x))
where λ is a parameter, and v(x) is an arbitrary continuous function that has the property that
(See Figure 1 for a geometric interpretation.)
Plug (6) into (5) to get
You can show that equation (8) can be written as (show this)
The quantity δI is called the first variation of I and the quantity δ2I is called the second variation of I. Notice that δI consists only of terms containing λ while δ2I consists only of terms containing λ2.
The necessary condition for I[y(x)] to be a minimum is
The first variation of the functional I[y] in the direction v is defined as
To find which function makes δI zero, we first integrate the first term of equation (9) by parts. We have,
Since v = at x0 and x1, we have
Plugging equation (12) into (9) and applying the minimizing condition (11), we get
The fundamental lemma of variational calculus states that if u(x) is a piecewise continuous function of x and v(x) 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 I. 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 δ2I. From equation (10) we can see that δ2I > 0 if f(x) > 0 and g(x) > 0 and in that case the problem is guaranteed to be a minimization problem.
We often define
where δy is called a variation of y(x).
In this notation, equation (9) can be written as
You see this notation in the principle of virtual work in the mechanics of materials.
Consider the string of length l under a tension T (see Figure 2). When a vertical load f is applied, the string deforms by an amount u(x) in the y-direction. The deformed length of an element dx 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
The force T in the string moves a distance
Therefore, the work done by the force T (per unit original length of the string) (the stored elastic energy) is
The work done by the forces f (per unit original length of string) is
We want to minimize the total energy. Therefore, the functional to be minimized is
The Euler equation is
The solution is