CALCULUS OF VARIATIONS
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.
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:
The Lagrangian function is formed as shown below.
The Lagrange multiplier l is a function of the independent variable, x, and the unconstrained Euler equation is solved as given below.
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.
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:
The Langrangian function is:
There are three optimal functions to be determined and the corresponding three Euler equations are:
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.
These can be integrated after some manipulations to give:
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.
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:
where J is a known constant.
To solve this problem the Lagrangian function L(x, y, y') is formed as
and the following unconstrained Euler equation is solved along with the constraint equation.
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.
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:
The Lagrangian function is:
The two Euler equations are:
Performing the differentiation and substituting into the Euler equations give:
The two equations above can be integrated once to obtain the following results:
Squaring both sides and adding the two equations gives the following:
which is the equation of a circle. Thus a circle encloses the maximum area for a given length curve.
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:
As was done previously the Lagrangian function is formed as follows:
Then the Lagrange function is used in the Euler equation.
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.
The following problem to minimize I[y1,y2] has a differential equation constraint:
The Lagrangian function is:
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.
The solutions for y1 and y2 are obtained by manipulating and integrating the equation set to give:
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.
An agitated tank contains W pounds of water at 32°F. It is desired to raise the temperature of the water in the tank to 104°F 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, 32°F. This economic model is given by the following equation.
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.
For water the heat capacity, Cp, is equal to 1.0 BTU/lb°F, and this equation simplifies to the following form:
The calculus of variations problem can now be formulated as:
with T1(0) = T2(0) = 32°F, and T2 (Ö2) = 104°F 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:
and the Euler equations are:
The results of performing the differentiation are:
Substituting into the Euler equations gives the following set of equations.
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:
With the boundary conditions of T2(0) = 32 and T2 (Ö2) = 104, the solution to the differential equation is:
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:
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 209°F for the water temperature in the tank to reach 104°F in Ö2 hours.
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.
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).