We first introduce some notation and then begin our adventure with a brief introduction to the simplest problem of calculus of variations. We first consider g(t,x,u) which is assumed to be a twice differentiable with respect to all of its variables, i.e. g(t,x,u) belongs to C^{2} .  We denote Piecewise Smooth functions on the open interval (t_0,t_1) by PWS(t_0,t_1).  It is understood that  if f \in PWS(t_0,t_1), then

f(t) = c+\int_{t_0}^{t_1}w(s)ds              (1)

where w(t) is piecewise continuous function,PWC(t_0,t_1), on (t_0,t_1) and c is a constant .

Now let X = PWS(t_0,t_1) denote the space of all real values piecewise smooth functions defined on [t_0,t_1]. For each PWS  function  y:[t_0,t_1] \to R , define the J: X\to R by

J(y(. )) = \int_{t_0}^{t_1} \!g(s,x(s),x'(s))\,ds.

Assume the points (t_0,x_0), (t_1,x_1) are given and define the set of PWS functions \Lambda by

\Lambda =\{x(.) \in PWS(t_0,t_1) | x(t_0)=x_0, x(t_1)= x_1 \}.

Note the J:X\to R is a real valued function on X.

Our objective is to maximize or equivalently minimize the functional given above  on the set \Lambda.  It turns out that many optimization and control problems end up in the form of a functional like the one we defined. So if we can learn how to minimize such a functional on the set \Lambda of interest, then we can solve a great deal of problems that are very much practical. For example  the equations of motion of the   Double Pendulum can be found explicitly using Calculus of Variations methods very quickly.  However, before we embark on our journey, we first introduce the Holy Grail of Calculus of Variations, a beautiful  result , a mathematical jewel:The Lemma of Du Bois Reymond.

Lemma 1:

Part (A)

If \alpha(t) is   piecewise continuous on [t_0,t_1] and

\int_{t_0}^{t_1} \alpha(s) \psi'(s) ds =0              (2)

\forall \, \psi(.) \in W_0 =PWS_0(t_0,t_1) =\{ \psi \in PWS(t_0,t_1)|\psi(t_0)=0,\psi(t_1)=0\}, then \alpha(t)  is a constant on [t_0,t_1] except at a finite number of points. That is \exists a constant c and a set of points t_0<\hat{ t_1} < \hat{t_2}<\dots <\hat{t_p}<t_1, in (t_0,t_1) such that \forall \, t\in (t_0,t_1) with t\neq\hat{t_i},i=1,2,\dots , p \, \, \, \, \, \, \,\alpha(t)=c.  The converse is true.

Part (B)

If \alpha(t) and \beta(t) are PWC on [t_0,t_1] and

\int_{t_0}^{t_1}[\alpha(s) \psi(s) +\beta(s) \psi'(s)]ds=0

\forall \, \psi \in W_0, then  \exists a constant c   such that \forall t \in (t_0,t_1)


The converse holds. Furthermore, \beta(.) is PWS, and at points t where \alpha(.) is continuous

\beta'(t) = \alpha(t).

Now we proceed to proof part A .


If  \alpha(t) is to be a constant in the sense stated in the lemma above, then it must satisfy the following equation,

c = \dfrac{1}{t_1-t_0}\int_{t_0}^{t_1}\alpha(s)ds.                (3)

Since \psi(t) is required to vanish at the t_0 and t_1, it follows that

\int_{t_0}^{t_1} c \psi '(s) ds = c[ \psi (t_1) - \psi (t_0)] = 0

we observe that using the hypothesis  (2)  implies

\int_{t_0}^{t_1} (\alpha(s) - c)\psi'(s) ds =0.                (4)

We observe that the function \psi(t) = \int_{t_0}^{t}(\alpha(\tau) - c)d\tau is PWS by defintion (1). Clearly \psi(t_0) = \psi(t_1) =0 by (3); hence \psi(t) has the properties required in the part A of the lemma. Moreover, \psi'(t)= \alpha(t)-c except for a possible finite subset of [t_0,t_1]. After substituting \psi' = \alpha - c in  (4) we have that

\int_{t_0}^{t_1}(\alpha(s)-c)^2 ds=0.             (5)

Let t_2 \in [t_0,t_1]  be a point at which \alpha(t) is continuous. If \alpha(t_2)\neq c, then \alpha(t) must differ from c on some positive subinterval [t_0,t_1] of positive length. Integral (5) cannot then vanish as stated and, from this contradiction, we infer that \alpha(t_2) = c, hence \alpha(t) = c whenever \alpha(t) is continuous. This establishes the proof.   We leave the  part B and converse of part A as an exercise to the reader. The proof should require no more than integration by parts and introductory calculus.


Euler’s Necessary condition and some problems (already).