%\setcounter{chapter}{6}
\chapter{Optimization of Functionals}
The goal of this section is to provide a brief introduction to the subject of {\em calculus of variations}. Calculus of variations is related to minimization or maximization of {\em functionals}. A functional is a mapping or a transformation that depends on one or more functions and the values of the functional are real numbers. We now give two examples of functionals.
\begin{example} \rm
The length $l$ of the arc connecting two given points $A(x_0,y_0)$ and $B(x_0,y_0)$ in the $x-y$ plane, as depicted in Figure~\ref{fig:arc_len}, is an example of a functional.
\begin{figure}
\vspace{3in}
\hskip1in\special{bmp:c:/mybook/arc_len.bmp x=4in y=3in}
\caption{The length of arcs joining two given points in the plane as an example of a functional.}
\label{fig:arc_len}
\end{figure}
We know that
\[
l=\int_{x_0}^{x_1}\sqrt{1+\left(dy/dx \right)^2}dx,
\]
that is, $l=l(x)$, subject to the constraints $y(x_0)=y_0$ and $y(x_1)=y_1$.
\end{example}
\markex
\begin{example} \rm
Another example of a functional is the area of the surface of revolution formed by a surface connecting two circular disks as illustrated in Figure~\ref{fig:surf_rev}.
\begin{figure}
\vspace{3in}
\hskip1in\special{bmp:c:/mybook/surf_rev.bmp x=4in y=3in}
\caption{The area of surfaces of revolution connecting two circular disks as an example of a functional.}
\label{fig:surf_rev}
\end{figure}
In particular, the surface of revolution can be formed by a soap film clinging to two circular disks. When a wire circle is dipped into a soap solution and withdrawn, a circular disk of soap film bounded by the circle is formed. If a second smaller circle is made to touch the disk and then moved away, the two circles will be joined by a surface of film that is a surface of revolution in the particular case when the circles are parallel and have their centers on the same axis perpendicular to their planes. If we denote the arc of intersection with the $x-y$ plane by $y=y(x)$, then the area of the surface of revolution is
\[
v=v\left(y(x)\right)=2\pi \int_{x_0}^{x_1} y(x) \sqrt{1+\left(dy/dx \right)^2}dx,
\]
subject to the constraints $y(x_0)=y_0$, $y(x_1)=y_1$. One may then want to minimize $v=v\left( y(x)\right)$ to find$y=y(x)$ resulting in the surface of revolution of minimum area.
\end{example}
\markex
The problem of optimization of functionals dates back to Johann Bernoulli. In 1696 he published a letter in which he posed the problem, which is now known as the {\em brachistochrone problem}. Brachistochrone translates from the Greek as the shortest time. The brachistochrone problem can be described as follows. A particle of mass $m$ and given initial speed $v_0$ is to slide down along a frictionless track connecting two given points. The motion of the particle is to be constrained only by gravity and the shape of the curve of the track. Find the curve of the track that minimizes the time travel between the two given points. We illustrate the problem in Figure~\ref{fig:brachist}.
\begin{figure}
\vspace{3in}
\hskip1in\special{bmp:c:/mybook/brachist.bmp x=4in y=3in}
\caption{Illustration of the brachistochrone problem.}
\label{fig:brachist}
\end{figure}
The brachistochrone problem was solved by Johann Bernoulli himself, his brother Jacob, Isaac Newton, G.~F.~A.~de~L'Hospital, and Gottfried Leibniz. Then, in 1697 Johann Bernoulli posed and solved the {\em geodesics\/} problem which can be formulated as follows. Find a line of shortest length that connects two given points on a given surface---see Figure~\ref{fig:geodesic} for an illustration of the problem. The curves of least length connecting pairs of points on a surface are called {\em geodesics}.
\begin{figure}
\vspace{3in}
\hskip1in\special{bmp:c:/mybook/geodesic.bmp x=4in y=3in}
\caption{The problem of finding geodesics.}
\label{fig:geodesic}
\end{figure}
A general procedure for solving the above type of problems, using the calculus of variations, was given by L.~Euler who flourished between 1707 and 1783. To acquaint ourselves with the methods of the calculus of variations we need first to introduce concepts concerning functionals.
\section{Variation and Its Properties}
A {\em function\/} can be viewed as a rule, or a mapping, that assigns to each element of some set a unique element of a possibly different set. An increment of the argument of a function of one variable $t$ is $\Delta t = t-t_1$.

Similarly, a {\em functional\/} is a mapping that assigns to each function, from some class of functions, a unique number. Let $x:\mb{\Bb R} \to \mb{\Bb R}$ be an argument of a functional. By a {\em variation \/} $\delta x$ of an argument $x$ of a functional $v$ we mean the difference of two functions
\[
\delta x = x-x_1.
\]
We assume that $x$ can change in an arbitrary way in some class of functions.

Recall, that a function $x:\mb{\Bb R} \to \mb{\Bb R}$ is continuous if a small change of its argument $t$ corresponds to a small change of the value $x(t)$ of the function. Similarly, a functional $v$ is said to be continuous if a ``small'' change of its argument $x$ corresponds to a small change of the value of the functional.

A functional $v$ is called linear if
\[
v\left(a x_1 + x_2 \right)=av\left(x_1 \right) + v \left( x_2 \right),
\]
where $a$ is a constant.

If an increment of a functional
\[
\Delta v = v \left( x+ \delta x \right) - v\left(x \right)
\]
can be represented as
\[
\Delta v = L\left( x, \delta x \right) + \beta \left( x, \delta x \right) \max |\delta x |,
\]
where $L\left( x, \delta x \right)$ is a linear functional with respect to $\delta x$, the term $\max |\delta x |$ denotes the maximal value of $| \delta x |$, and $\beta \left( x, \delta x \right) \to 0$ if $\max |\delta x | \to 0$, then the linear part $L$ of $\Delta v$ is called the {\em variation of the functional\/} and is denoted by $\delta v$, that is
\[
\delta v = L\left( x, \delta x \right).
\]
\begin{example}
\label{ex:variation}
\rm
We find the variation of the functional
\[
v=\int_{0}^{1}\left( 2 x^2(t) + x(t)\right)dt.
\]
For this we first calculate its increment to get
\begin{eqnarray*}
\Delta v &=& v\left( x + \delta x \right) - v \left( x \right)\\
&=& \int_{0}^{1}\left(2(x+\delta x )^2 + (x + \delta x) \right)dt - \int_{0}^{1}\left( 2x^2 + x \right)dt\\
&=& \int_{0}^{1} \left( 2x^2 + 4x \delta x + 2 (\delta x)^2 +x + \delta x -2x^2 - x \right)dt\\
&=& \int_{0}^{1} \left( ( 4x +1 ) \delta x \right) dt + 2 \int_{0}^{1} (\delta x)^2 dt.
\end{eqnarray*}
The linear part of $\Delta v$ is
\[
\delta v = \int_{0}^{1} \left( ( 4x +1 ) \delta x \right) dt
\]
which is the variation of the given functional.
\end{example}
\markex
We now state and prove a lemma that will allow us to calculate the variation of a given functional more efficiently than the method we used in Example~\ref{ex:variation}.
\begin{lemma}
\label{lemma:variation}
\[
\delta v = \left.\frac{d}{d \alpha}v\left( x + \alpha \delta x \right) \right\arrowvert _{\alpha = 0}.
\]
\end{lemma}
{\bf Proof}\quad Suppose that for a given functional $v$ there exists its variation. This means that we can represent $\Delta v$ as
\begin{eqnarray*}
\Delta v &=& v\left(x + \alpha \delta x \right) - v \left(x\right)\\
&=& L ( x,\alpha \delta x) + \beta(x, \alpha \delta x)|\alpha|\,\max |\delta x|.
\end{eqnarray*}
Then, the derivative of $v\left(x + \alpha \delta x \right)$ with respect to $\alpha$ evaluated at $\alpha = 0$ is equal to
\begin{eqnarray*}
\lim _{\alpha \to 0} \frac{\Delta v}{\alpha} &=& \lim _{\alpha \to 0} \frac{L ( x,\alpha \delta x) + \beta(x, \alpha \delta x)|\alpha|\,\max |\delta x|}{\alpha}\\
&=& \lim _{\alpha \to  0} \frac{L(x,\alpha \delta x}{\alpha}+\lim_{\alpha \to 0}\frac{\beta(x, \alpha \delta x)|\alpha|\,\max |\delta x|}{\alpha}\\
&=& L(x, \delta x),
\end{eqnarray*}
since $L(x,\alpha \delta x)=\alpha L(x, \delta x)$ and
\[
\lim_{\alpha \to 0}\frac{\beta(x, \alpha \delta x)|\alpha|\,\max |\delta x|}{\alpha} = \lim_{\alpha \to 0}\beta(x, \alpha \delta x)\max |\delta x|=0.
\]
This completes the proof.\\
\hspace*{5.5in} $\Box$
\begin{example}
\rm
We find the variation of the functional we considered in Example~\ref{ex:variation} using Lemma~\ref{lemma:variation}. We have
\begin{eqnarray*}
\delta v &=& \frac{d}{d \alpha}v\left( x + \alpha \delta x \right) \arrowvert _{\alpha = 0}\\
&=& \left.\frac{d}{d \alpha} \left( \int_{0}^{1}\left(2(x+ \alpha \delta x )^2 + (x + \alpha \delta x) \right)dt\right) \right\arrowvert _{\alpha =0}\\
&=& \left.\int_0^1\left( 4(x+\alpha \delta x ) \delta x + \delta x \right) dt \right\arrowvert_{\alpha =0}\\
&=& \int_0^1 ( 4x + 1) \delta x dt,
\end{eqnarray*}
which is the variation of the given functional in Example~\ref{ex:variation}. 
\end{example}
\markex
\begin{defn}
A functional $v$ is maximal on some function $x_0$ if the value of the functional on any function $x$ close to $x_0$ is less than or equal to that on $x_0$, that is
\[
\Delta v = v\left( x \right) - v \left( x_0 \right) \le 0.
\]
\end{defn}
We will next prove a first order necessary condition for  a given functional to achieve a maximum or minimum on a curve.
\begin{thm}
\label{thm:fonc}
If for a functional $v$ there exists a variation and the functional reaches a maximum or a minimum on a curve $x_0$ then
\[
\delta v\left( x_0 \right) = 0.
\]
\end{thm}
{\bf Proof}\quad Suppose that $x_0$ and $\delta x$ are fixed. Then
\[
v\left( x_0 + \alpha \delta x \right) = \Phi(\alpha ),
\]
that is, $v\left( x_0 + \alpha \delta x \right)$ is a function of $\alpha$ that for $\alpha = 0$ achieves its maximum or minimum. This implies that $\frac{d}{d \alpha} \Phi = 0$, or equivalently
\[
\left.\frac{d}{d \alpha}v\left( x_0 + \alpha \delta x \right) \right\arrowvert _{\alpha = 0}=0.
\]
Hence, by Lemma~\ref{lemma:variation} we have $\delta v = 0$. Therefore, a functional that achieves its maximum or a minimum on a function $x_0$, has its variation evaluated at $x_0$ equal to zero.\\
\hspace*{5.5in} $\Box$

The above results will used in the next section to determine conditions that a curve has to satisfy to be a maximizer or a minimizer, that is, an extremal of a given functional.
\section{The Euler-Lagrange Equation}
In this section, we consider the following optimization problem.

{\bf Problem 1}\quad Suppose that we are given two points $(t_0,x_0)$ and $(t_1,x_1)$ in the $(t,x)$-plane. We wish to find a curve, trajectory, joining the given points such that the functional
\[
v\left( x(t) \right)=\int_{t_0}^{t_1}F\left(t,x,\dot{x}\right)dt
\]
along this trajectory can achieve its extremal, that is, maximal or minimal, value. The problem is illustrated in Figure~\ref{fig:prob_1}.
\begin{figure}
\vspace{3in}
\hskip1in\special{bmp:c:/mybook/prob_1.bmp x=4in y=3in}
\caption{Illustration Problem 1.}
\label{fig:prob_1}
\end{figure}
In solving Problem 1 we shall use the following lemma.
\begin{lemma}[Fundamental Lemma of Calculus of Variations]
\label{lemma:flcv}
Suppose that a function $\phi:\mb{\Bb R} \to \mb{\Bb R}$ is continuous on the interval $[t_0,\,t_1]$. Then
\[
\int_{t_0}^{t_1}\phi(t) \delta x(t) dt =0
\]
if and only if $\phi(t)=0$ at every point of the interval $[t_0,\,t_1]$.
\end{lemma}
{\bf Proof}\quad Sufficiency is obvious since we can satisfy $\int_{t_0}^{t_1}\phi(t) \delta x(t) dt =0$ by choosing $\phi$ that vanishes at every point of the interval $[t_0,\,t_1]$.

We prove necessity by contraposition. We thus prove that if $\phi$ is nonzero on some subinterval of $[t_0,\, t_1]$, then $\int_{t_0}^{t_1}\phi(t) \delta x(t) dt \ne 0$. Specifically, assume that $\phi$ is positive (or negative) on the interval $[a,\, b]$, where $t_0\le a \le b \le t_1$. Note that if $\phi$ were nonzero at only one point, then since it is continuous it would have to be nonzero in some neighborhood of that point. Hence, we can assume that $a<b$. Consider now a variation given by
\[
\delta x = \delta x(t) = \left\{\begin{array}{ccc}
k^2(t-a)^2(t-b)^2 & \mb{for}& a \le t \le b\\
0 & & \mb{elsewhere}
\end{array}
\right.
\]
We illustrate $\delta x$ in Figure~\ref{fig:flcv}.
\begin{figure}
\vspace{3in}
\hskip1in\special{bmp:c:/mybook/flcv.bmp x=4in y=3in}
\caption{Illustration of the proof of the Fundamental Lemma of the Calculus of Variations.}
\label{fig:flcv}
\end{figure}
Since $\delta x$ is positive in $[a,\,b]$ and zero elsewhere in the interval $[t_0,\, t_1]$, the integrand of $\int_{t_0}^{t_1}\phi(t) \delta x(t) dt$ will have the same sign as $\phi$ in $[a,\, b]$ and will be zero outside this subinterval. Thus
\[
\int_{t_0}^{t_1}\phi(t) \delta x(t) dt =\int_{a}^{b}\phi(t) \delta x(t) dt \ne 0,
\]
and the proof is complete.\\
\hspace*{5.5in} $\Box$

{\bf Solution to Problem 1}\quad We assume that there is an optimal trajectory $x=x(t)$ joining the points $(t_0,x_0)$ and $(t_1,x_1)$ such that $\delta v(x(t))=0$, that is $v$ has a turning value. Let us then consider an arbitrary acceptable curve $x^{*}=x^{*}(t)$ that is close to $x$, and form a family of curves
\[
x(t,\alpha)=x(t)+\alpha\left(x^{*}(t)-x(t) \right)=x(t)+\alpha \delta x(t).
\]
Note that for $\alpha = 0$ we get $x(t)$ and for $\alpha =1$ we obtain $x^{*}(t)$. We know that $\delta x$ in calculus of variations plays a similar role as $\Delta t$ in the problem of finding an extremal value of a function $x$. Furthermore
\begin{eqnarray*}
\frac{d}{dt}(\delta x(t))&=&\frac{d}{dt}\left(x^{*}(t)-x(t) \right)\\
&=& \delta x',
\end{eqnarray*}
and analogously
\begin{eqnarray*}
\frac{d^2}{dt^2} (\delta x(t)) &=&\frac{d^2}{dt^2}\left(x^{*}(t)-x(t) \right)\\
&=& \delta x''.
\end{eqnarray*}
We are now ready to investigate the behavior of the functional $v=v\left(x(t)\right)=\int_{t_0}^{t_1}F(t,x,\dot{x})dt$ on the curves from the family $x(t,\alpha)$. Note that the functional $v$ can be considered as a function of $\alpha$, that is, $v\left(x(t,\alpha)\right)=\Phi(\alpha)$. It follows from the first order necessary condition for a point to be an extremizer of a function of one variable that $\alpha =0$ is a candidate to be an extremizer of $\Phi$ if
\[
\left.\frac{d \Phi (\alpha)}{d \alpha}\right\arrowvert _{\alpha = 0}=0.
\]
Since
\[
\Phi (\alpha ) = \int_{t_0}^{t_1}F\left(t, x(t, \alpha),x'(t, \alpha) \right)dt,
\]
where $x'(t,\alpha)=\frac{d}{dt}x(t,\alpha)$. Hence,
\[
\frac{d \Phi(\alpha)}{d \alpha}=\int_{t_0}^{t_1} \left( F_{x}\frac{d}{d \alpha} x(t, \alpha) + F_{x'}\frac{d}{d \alpha}x'(t, \alpha) \right) dt,
\]
where $F_{x}=\frac{\partial}{\partial x} F \left(t, x(t,\alpha ),x'(t,\alpha )\right)$, and $F_{x'}=\frac{\partial}{\partial x'} F \left(t, x(t,\alpha ),x'(t,\alpha) \right)$. Since
\[
\frac{d}{d \alpha}x(t, \alpha) = \frac{d}{d \alpha}\left( x(t) + \alpha \delta x(t) \right)= \delta x(t),
\]
and
\[
\frac{d}{d \alpha}x'(t, \alpha) = \frac{d}{d \alpha}\left( x'(t) + \alpha \delta x'(t) \right)= \delta x'(t),
\]
we can write
\[
\frac{d}{d \alpha}\Phi (\alpha )= \int_{t_0}^{t_1} \left( F_{x}(t, x(t,\alpha), x'(t, \alpha)) \delta x(t) + F_{x'}(t, x(t,\alpha), x'(t, \alpha)) \delta x'(t) \right) dt.
\]
By Lemma~\ref{lemma:variation} we have
\[
\frac{d}{d \alpha}\Phi(0)=\delta v.
\]
Therefore,
\[
\delta v = \int_{t_0}^{t_1} \left( F_x \delta x + F_{x'} \delta x' \right) dt,
\]
where for convenience we dropped the argument $t$. Integrating by parts the last term, and taking into account that $\delta x' = (\delta x)'$ yields
\[
\delta v = \left.\left( F_{x'} \delta x \right) \right\arrowvert ^{t_1}_{t_0} + \int_{t_0}^{t_1} \left( F_x - \frac{d}{dt} F_{x'} \right) \delta x dt.
\]
The end points $(t_0, x_0)$ and $(t_1, x_1)$ are fixed. This implies that
\[
\delta x \arrowvert_{t=t_0}=x^{*}(t_0)-x(t_0)=0,
\]
 and
\[
\delta x \arrowvert_{t=t_1}=x^{*}(t_1)-x(t_1)=0.
\]
Hence
\[
\delta v =  \int_{t_0}^{t_1} \left( F_x - \frac{d}{dt} F_{x'} \right) \delta x dt.
\]
By the Fundamental Lemma of Calculus of Variations
\[
\delta v = 0 \Leftrightarrow F_x-\frac{d}{dt}F_{x'}=0.
\]
The equation $F_x-\frac{d}{dt}F_{x'}=0$ can also be represented as
\[
F_x-F_{tx'}-F_{xx'}x'-F_{x'x'}x''=0.
\]
The equation $F_x-\frac{d}{dt}F_{x'}=0$ is known as the Euler-Lagrange equation. The curves $x=x(t,C_1,C_2)$ that are solutions to the Euler-Lagrange equations are called {\em extremals\/}. The constants $C_1$ and $C_2$ are the integration constants. Thus, a functional can only achieve its extremum on the extremals.
\begin{example}\rm
We find the extremal for the functional
\[
v=\int_{0}^{\frac{\pi}{2}}\left( (x')^2-x^2 \right)dt,
\]
where $x(0)=0$, and $x\left(\frac{\pi}{2} \right)=1$. The Euler-Lagrange equation for the problem takes the form
\begin{eqnarray*}
F_x-\frac{d}{dt}F_{x'} &=& \frac{\partial}{\partial x}\left((x')^2-x^2 \right) - \frac{d}{dt}\left( \frac{\partial}{\partial x'}\left((x')^2-x^2 \right)\right)\\
&=& -2x -\frac{d}{dt} \left(2 x'\right)\\
&=& -2x -2 x''\\
&=& 0.
\end{eqnarray*}
Equivalently, the Euler-Lagrange equation can be represented as
\[
x''+x=0.
\]
The characteristic equation of the above differential equation is $s^2+1=0$. Therefore, the general solution of the Euler-Lagrange equation has the form
\[
x(t)=C_1 \cos t + C_2 \sin t.
\]
Taking into account the end-point conditions we get
\begin{eqnarray*}
x(0) &=& C_1 =0\\
x\left( \frac{\pi}{2}\right) &=& C_2=1.
\end{eqnarray*}
We have one extremal
\[
x(t)=\sin t.
\]
The given functional can be minimal or maximal only on the extremal $x(t)= \sin t$.
\end{example}
\markex
\begin{example}\rm
We now find the extremal for the functional
\[
v=\int_0^1\left((x')^2 + 12 xt \right)dt,
\]
where $x(0)=0$, and $x(1)=1$. The Euler-Lagrange equation for the this functional is
\begin{eqnarray*}
F_x-\frac{d}{dt}F_{x'} &=& \frac{\partial}{\partial x}\left((x')^2 12 xt \right)-\frac{d}{dt}\left(\frac{\partial}{\partial x'}\left((x')^2 12 xt \right)\right)\\
&=& 12t -\frac{d}{dt}\left(2x'\right)\\
&=& 12t - 2x''\\
&=& 0.
\end{eqnarray*}
Equivalently, the Euler-Lagrange equation can be represented as
\[
x''=6t.
\]
The general solution to the above differential equation is
\[
x(t)=C_1 t +C_2 +t^3.
\]
From the end-point conditions we get
\begin{eqnarray*}
x(0) &=& C_2=0\\
x(1) &=& C_1 +1=1.
\end{eqnarray*}
Hence, $C_1=0$, and the extremal has the form
\[
x(t)=t^3.
\]
\end{example}
\markex
In Problem 1, both end-points were fixed. We now would like to solve a more general optimization problem, where the end-points need not be fixed. For simplicity we assume first that one of the end-points is fixed, while the other is free. After we solve this problem, we can easily generalize to the case when both end-points are free.

{\bf Problem 2}\quad In the $(t,x)$-plane the left-end point $A$ is fixed, while the right end-point $B$ is free---see Figure~\ref{fig:fix_end}.  It is required to find a trajectory $x=x(t)$ starting at $A$ on which the functional $v=\int_{t_0}^{t_1}F(t,x,x')dt$ can achieve its extremal value, that is, $v$ can have a turning value on $x$.
\begin{figure}
\vspace{3in}
\hskip1in\special{bmp:c:/mybook/fix_end.bmp x=4in y=3in}
\caption{Illustration of Problem 2.}
\label{fig:fix_end}
\end{figure}

{\bf Solution to Problem 2}\quad We assume that a solution to Problem 2 exists, that is, there is a trajectory $x=x(t)$ joining $(t_0,x_0)$ and $(t_1,x_1)$ such that $\delta v=0$. This trajectory must satisfy the Euler-Lagrange equation. Consider an adjoining trajectory specified by $x+\delta x$ joining $(t_0,x_0)$ and $(t_1+\delta t_1, x_1+\delta x_1)$. Then,
\begin{eqnarray*}
\Delta v &=& v(x+\delta x)-v(x)\\
&=& \int_{t_0}^{t_1 + \delta t_1} F(t,x+\delta x,x'+\delta x') dt - \int_{t_0}^{t_1}F(t,x,x')dt\\
&=& \int_{t_1}^{t_1+\delta t_1}F(t,x+\delta x,x'+\delta x') dt + \int_{t_0}^{t_1}\left( F(t,x+\delta x,x'+\delta x') - F(t,x,x') \right) dt.
\end{eqnarray*}
Our goal now is to extract from $\Delta v$ its linear portion with respect to $\delta x$, which we know is the variation of the functional $\delta v$. We approximate the first integral as follows:
\[
\int_{t_1}^{t_1+\delta t_1}F(t,x+\delta x,x'+\delta x') dt \approx \left.F(t,x,x')\right\arrowvert_{t=t_1}\delta t_1.
\]
Expanding the integrand of the second integral into a Taylor series and retaining only first order terms yields
\[
\int_{t_0}^{t_1}\left( F(t,x+\delta x,x'+\delta x') - F(t,x,x') \right) dt=\int_{t_0}^{t_1}\left(F_x(t,x,x')\delta x - F_{x'}(t,x,x')\delta x' \right) dt.
\]
Integrating the second term by parts, and combining with the first term gives
\[
\int_{t_0}^{t_1}\left(F_x\delta x - F_{x'}\delta x' \right) dt=\left(F_{x'}\delta x \right)\arrowvert_{t_0}^{t_1}+\int_{t_0}^{t_1}\left(F_x -\frac{d}{dt} F_{x'}\right)\delta x dt,
\]
where for simplicity of notation we suppressed the arguments of $F_x$ and $F_{x'}$. We assumed that a solution to the problem exits. Hence, an extremal must satisfy the Euler-Lagrange equation
\[
F_x -\frac{d}{dt} F_{x'}=0.
\]
Since the left end-point is fixed
\[
\delta x \arrowvert_{t=t_0}=0.
\]
Taking into account the results of the above manipulations, we have
\[
\Delta v \approx \left.F(t,x,x')\right\arrowvert_{t=t_1}\delta t_1 + \left.\left(F_{x'}\delta x \right)\right\arrowvert_{t=t_1}.
\]
The final step in obtaining $\delta v$ is to evaluate $\left(F_{x'}\delta x \right)\arrowvert_{t_1}$. The problem is two dimensional so we can illustrate it graphically as shown in Figure~\ref{fig:deltas}.
\begin{figure}
\vspace{3in}
\hskip1in\special{bmp:c:/mybook/deltas.bmp x=4in y=3in}
\caption{A geometric interpretation of calculating the variation of the functional for Problem~2.}
\label{fig:deltas}
\end{figure}
Referring to Figure~\ref{fig:deltas} we obtain:
\begin{eqnarray*}
DB &=&\delta x \arrowvert_{t=t_1},\\
FC &=& \delta x_1,\\
EC &\approx & x'(t_1)\delta t_1,\\
DB &=& FC-EC.
\end{eqnarray*}
Hence
\[
\delta x \arrowvert_{t=t_1} \approx \delta x_1 - x'(t_1) \delta t_1.
\]
Using the above we get
\begin{eqnarray*}
\delta v &=& F(t,x,x')\arrowvert_{t=t_1}\delta t_1 + F_{x'} \arrowvert_{t=t_1}\left(\delta x_1 - x'(t_1) \delta t_1 \right)\\
&=& \left(F-x'F_{x'}\right) \arrowvert _{t=t_1}\delta t_1 + F_{x'} \arrowvert_{t=t_1} \delta x_1\\
&=&0.
\end{eqnarray*}
Since the variations $\delta t_1$ and $\delta x_1$ are arbitrary, we have $\delta v = 0$ if in addition to the Euler-Lagrange equation we also have
\begin{eqnarray*}
\left(F-x'F_{x'}\right) \arrowvert _{t=t_1} &=& 0,\\
F_{x'} \arrowvert_{t=t_1} &=& 0.
\end{eqnarray*}
The above end-point relations are called the {\em transversality conditions}. In conclusion, the optimal trajectory must satisfy both the Euler-Lagrange equation and the transversality conditions.

If the position of the end point $B$ is restricted to a curve $x=g_1(t)$, then
\[
\delta x_1 \approx g_1'(t_1) \delta t_1,
\]
and hence
\[
\delta v = \left( F +\left( g_1'-x'\right) F_{x'} \right)\delta t_1 =0
\]
if
\[
\left( F +\left( g_1'-x'\right) F_{x'} \right) \arrowvert _{t=t_1}=0.
\]
The above is the transversality condition for the case when the end-point $B$ is restricted to the curve $x=g_1(t)$.

\section{Exercises}
\begin{exercise}\rm
Show
\end{exercise}