Chapter 8

 CALCULUS OF VARIATIONS

Constrained Variational Problems top

Generally, there are two procedures used for solving variational problems that have constraints. These are the methods of direct substitution and Lagrange multipliers. In the method of direct substitution, the constraint equation is substituted into the integrand; and the problem is converted into an unconstrained problem as was done in Chapter II. In the method of Lagrange multipliers, the Lagrangian function is formed; and the unconstrained problem is solved using the appropriate forms of the Euler or Euler-Poisson equation. However, in some cases the Lagrange multiplier is a function of the independent variables and is not a constant. This is an added complication that was not encountered in Chapter II.

Algebraic Constraints top

To illustrate the method of Lagrange multipliers, the simplest case with one algebraic equation will be used. The extension to more complicated cases are the same as that for analytical methods:  

Equ8-58.jpg (8543 bytes)

The Lagrangian function is formed as shown below.

L(x, y, y', l) = F(x, y, y') + l(x) G(x, y)               (8-59)

The Lagrange multiplier l is a function of the independent variable, x, and the unconstrained Euler equation is solved as given below.

 Equ8-60.jpg (4356 bytes)

along with the constraint equation G(x, y) = 0.

There is a Lagrange multiplier for each constraint equation when the Lagrangian function is formed. A derivation of the Lagrange multiplier method is given by Forray(1), and the following example illustrates the technique.

 

Example 8-6(8)

The classic example to illustrate this procedure is the problem of finding the path of a unit mass particle on a sphere from point (0,0,1) to point (0,0,-1) in time T, which minimizes the integral of the kinetic energy of the particle. The integral to be minimized and the constraint to be satisfied are:

Ex8-6a.jpg (9201 bytes)

The Langrangian function is:

L[x(t), y(t), z(t), l(t)] = [(x')2 + (y')2 + (z')2] + l(x2 + y2 + z2 - 1)

There are three optimal functions to be determined and the corresponding three Euler equations are:

 Ex8-6b.jpg (9504 bytes)

Performing the partial differentiation of L, recognizing that [(x')2 + (y')2 + (z')2] = s' (an arc length which is a constant), and substituting into the Euler equations; three simple second order ordinary differential equations are obtained.

 Ex8-6c.jpg (5687 bytes)

These can be integrated after some manipulations to give:

x + c1y + c2z  =  0

which is the equation of a plane through the center of the sphere. The intersection of this plane and the sphere is a great circle which is the optimal path. It can be shown that the minimum kinetic energy is p2/T.

Integral Constraints top

Isoperimetric problems(1) are ones where an integral is to be optimized subject to a constraint which is another integral having a specified value. This name came from the famous problem of Dido of finding the closed curve of given perimeter for which the area is a maximum. For the Euler equation the problem can be stated as:

Equ8-61.jpg (9263 bytes)

where J is a known constant.

     To solve this problem the Lagrangian function L(x, y, y') is formed as

shown below,

L(x, y, y', l) = F(x, y, y') + lG(x, y, y')               (8-62)

and the following unconstrained Euler equation is solved along with the constraint equation.

 Equ8-60.jpg (4356 bytes)

For integral equation constraints, the Lagrange multiplier l is a constant; and each constraint has a Lagrange multiplier when forming the Lagrangian function. The following example illustrates the use of Lagrange multipliers with an integral constraint. It is the classic problem of Dido mentioned previously.

 

Example 8-7(1)

Determine the shape of the curve of length J that encloses the maximum area. The integral to be maximized and the integral constraint are as follows:

 Ex8-7a.jpg (9183 bytes)

The Lagrangian function is:

L = y1 y2' - y2 y1' + l[ y1'2 + y2' 2]

The two Euler equations are:

 Ex8-7b.jpg (7080 bytes)

Performing the differentiation and substituting into the Euler equations give:

 Ex8-7c.jpg (9599 bytes)

The two equations above can be integrated once to obtain the following results:

 Ex8-7d.jpg (6309 bytes)

Squaring both sides and adding the two equations gives the following:

( y1 - c1 )2 + ( y2 - c2 )2 l2/4  =  constant

which is the equation of a circle. Thus a circle encloses the maximum area for a given length curve.

Differential Equation Constraints top

To illustrate the method of Lagrange multipliers for differential equation constraints, a simple case will be used. Extensions to more detailed cases are the same as for the two previous types of constraints. The problem is as follows:

Equ8-63.jpg (9160 bytes)

As was done previously the Lagrangian function is formed as follows:

L(x, y, y', l) = F(x, y, y') + l(x)G(x, y, y')          (8-64)

Then the Lagrange function is used in the Euler equation.

 Equ8-60.jpg (4356 bytes)

In this case the Lagrange multiplier l(x) is a function of the independent variable. This procedure is illustrated in the following example which was given by Beveridge and Schechter(10). Also, they extend these results to obtain Pontryagin's maximum principle for constraints placed on the range of the dependent and independent variables.

 

Example 8-8(10)

The following problem to minimize I[y1,y2] has a differential equation constraint:

Ex8-8a.jpg (7582 bytes)

The Lagrangian function is:

L = y12 + y22 + l(y1' - y2 + y1)

Using equation (8-60) the two Euler equations for y1 and y2 are obtained. They are to be solved with the constraint equation, and this gives the following set of equations.

    - 2y1         -l + l'   =  0

             2y2 - l          =  0

y1' + y1 - y2                =  0

The solutions for y1 and y2 are obtained by manipulating and integrating the equation set to give:

 Ex8-8b.jpg (6611 bytes)

where the constants of integration c1 and c2 are evaluated using the boundary conditions. A particular solution for y1(0) = 1 and y2(x1) = 0 is given by Beveridge and Schechter(10).

     The previous examples were designed to illustrate the particular extension of the calculus of variations and were essentially simple mathematics problems with no industrial application associated with them. However, the following example was designed to illustrate the application of the calculus of variations to a process, and it employs unsteady material and energy balance equations to determine the optimum way to control the flow rate to an agitated tank. Although the example is relatively simple, it illustrates economic model and process constraints for a dynamic system; and an optimal control function is developed.

 

Example 8-9(11)

An agitated tank contains W pounds of water at 32F. It is desired to raise the temperature of the water in the tank to 104F in (2.0) hours by feeding water at a rate of W lb. per hour. The tank is completely filled with water, and the overflow water at T2(t) is equal to the input flow rate at T1(t). The average residence time of water in the tank is one hour, and the tank is perfectly mixed. The temperature of the inlet can be adjusted as a function of time by an electric heater in the feed pipe which is connected to a variable voltage transformer. The sensible heat accompanying water flowing into and out of the tank during the process must be considered lost. Therefore, it is, desired to minimize the integral of the sum of squares of the difference between the temperatures, T1(t) and T2(t), and the reference temperature, 32F. This economic model is given by the following equation.

 Ex8-9a.jpg (6647 bytes)

An unsteady-state energy balance on the water in the tank at time t gives the following equation relating the temperatures T1(t), T2(t) and the system parameters.

Ex8-9b.jpg (6537 bytes)

For water the heat capacity, Cp, is equal to 1.0 BTU/lbF, and this equation simplifies to the following form:

Ex8-9c.jpg (3475 bytes)

The calculus of variations problem can now be formulated as:

Ex8-9d.jpg (14199 bytes)

with T1(0) = T2(0) = 32F, and T2 (2) = 104F as boundary conditions.

Two optimal functions are determined, and the solution of two Euler equations are required using equation (8-60). The Lagrangian function is:

L[T1(t),T2(t), l(t)]  =  (T1 - 32)2   +  (T2 - 32)2  + l(t)[T2' - T1 + T2]

and the Euler equations are:

Ex8-9e.jpg (7425 bytes)

The results of performing the differentiation are:

Ex8-9f.jpg (19812 bytes)

Substituting into the Euler equations gives the following set of equations.

Ex8-9g.jpg (8664 bytes)

The third equation is the constraint, and these equations are solved for T1(t) and T2(t). The set has two ordinary differential equations and one algebraic equation. Manipulating and solving this set for one equation in terms of T2(t) gives:

T2" - 2T2  =  - 64

With the boundary conditions of T2(0) = 32 and T2 (2) = 104, the solution to the differential equation is:

 Ex8-9h.jpg (3915 bytes)

where 9.91 = 72/(e2 - e-2). The constraint is used to obtain the entering water temperature as a function of time, and substituting in the solution for T2(t) gives:

Ex8-9i.jpg (5859 bytes)

The solutions for the optimal functions, T1(t) and T2(t) are tabulated and plotted in Figure 8-3. As shown in the figure the warm water temperature increases to 209F for the water temperature in the tank to reach 104F in 2 hours.

Closure top

Some of the important results from the chapter are summarized in an abbreviated form in Table 8-1. First, a set of Euler equations is shown in the table to be solved when the integrand contains several optimal functions and their first derivatives. Corresponding boundary conditions are required on each of these Euler equations which are second order ordinary differential equations. Next in the table is the integral that has higher order derivatives in the integrand. For this case the Euler-Poisson equation has to be solved, and it is of order 2m, where m is the order of the highest derivative in the integrand. Also appropriate boundary conditions on y and its derivatives at x0 and x1 are required to obtain the particular solution of the differential equation. A combination of these two cases is given in the table where a set of Euler-Poisson equations is solved for the optimum functions.

     When the optimal function involves more than one independent variable a partial differential equation has to be solved, and the table shows the case for two independent variables, a second order partial differential equation. Equation (8-57) gives the comparable equation for n independent variables. However, the results given in the table and the chapter are only for an optimal function with first partial derivatives in the integrand. Results comparable to the Euler-Poisson equation with higher order derivatives are available in Weinstock(3).

     When constraints are involved the Lagrange function is formed as shown in the table. This gives an unconstrained problem that can be solved by the Euler and/or Euler Poisson equation, along with the constraint equations.

     The purpose of the chapter was to give some of the key results of the calculus of variations, and to emphasize the similarities and differences between finding an optimal function and an optimal point. Consequently, it was necessary to select the methods given here from some equally important methods that were omitted. Two of these are the concept of a variation and the use of the second variation for the sufficient conditions to determine if the function was actually a maximum or minimum. These are discussed by Courant and Hilbert(5) along with the problem of the existence of a solution. Also, most texts discuss the moving (or natural) boundary problem where one or both of the limits on the integral to be optimized can be a function of the independent variable. This leads to extensions of the Brachistochrone problem and Forray's discussion(1) is recommended. With the background of this chapter, extension to Hamilton's principle follows, and is typically the next topic presented on the subject. Also, this material leads to extensions that include Pontryagin's maximum principle, Sturm-Liouville problems, and application in optics, dynamics of particles, vibrations, elasticity, and quantum mechanics.

     The calculus of variations can be used to solve transport phenomena problems, i.e., obtain solutions to the partial differential equations representing the conservation of mass, momentum and energy of a system. In this approach the partial differential equations are converted to the corresponding integral to be optimized from the calculus of variations. Then approximate methods of integration are used to find the minimum of the integral, and this yields the concentration, temperature and/or velocity profiles required for the solution of the original differential equations. This approach is described by Schechter(4) in some detail.

     Again the purpose of the chapter was to introduce the topic of finding the optimal function. The references at the end of the chapter are recommended for further information; they include the texts by Fan(12) and Fan and Wang(13) on the maximum principle and Kirk(14) among others (7,15,16) on optimal control.

References top

1. Forray, M. J., Variational Calculus in Science and Engineering, McGraw-Hill Book Company, New York (1968).

2. Ewing, G. M. Calculus of Variations with Applications, W.W. Norton Co. Inc, New York (1969).

3. Weinstock, Robt. Calculus of Variations, McGraw-Hill Book Company, New York (1952).

4. Schechter, R. S. The Variational Method in Engineering, McGraw-Hill Book Company, New York (1967).

5. Courant, R. and D. Hilbert, Methods of Mathematical Physics, Vol. I, John Wiley and Sons, Inc., New York (1953).

6. Sagan, Hans Introduction to the Calculus of Variations, McGraw Hill Book Co., New York (1969).

7. M.M. Denn, Optimization by Variational Methods, McGraw-Hill Book Company, New York (1970).

8. Wylie, C. R. and L. C. Barrett, Advanced Engineering Mathematics 5th Ed., McGraw-Hill Book Company, New York (1982).

9. Burley, D. M., Studies in Optimization, John Wiley and Sons, Inc., New York (1974).

10. Beveridge, G. S. G. and R. S. Schechter, Optimization: Theory and Practice, McGraw-Hill Book Company, New York (1970).

11. Fan, L.T., E.S. Lee, and L.E. Erickson, Proc. of the Mid-Am. States Univ. Assoc. Conf. on Modern Optimization Techniques and their Application in Engineering Design, Part I, Kansas State University, Manhattan, Kansas (Dec.19-22,1966).

12. L.T. Fan, The Continuous Maximum Principle, John Wiley and Sons Inc., New York (1966).

13. L.T. Fan and C.S. Wang, The Discrete Maximum Principal, John Wiley and Sons Inc., New York (1964).

14. Kirk, D.E. Optimal Control Theory, An Introduction. Prentice Hall, Inc., Englewood Clifffs, New Jersey (1970).

15. Miele, A. , Optimization Techniques with Applications to Aerospace Systems, Ed., G. Leitman, Ch.4, Academic Press, New York (1962).

16. Connors, M. M. and D. Teichroew, Optimal Control of Dynamic Operations Research Models, International Textbook Inc., Scranton, Pennsylvania (1967).

top