# PlanetPhysics/Introduction to Calculus of Variations

The Calculus of Variations owed its origin to the attempt to solve a very interesting and rather narrow class of problems in Maxima and Minima, in which it is required to find the form of a function such that the definite integral of an expression involving that function and its derivative shall be a maximum or a minimum.
Let us consider three simple examples: The Shortest Line, The Curve of Quickest Descent, and The Minimum Surface of Revolution.
$(a)$ {\it The Shortest Line}. Let it be required to find the equation of the shortest plane curve joining two given points.
We shall use rectangular coordinates in the plane in question taking one of the points as the origin. Call the coordinates of the second point $x_{1},\,y_{1}$.
If $y=f(x)$ is a curve through $(0,0)$ and $(x_{1},\ y_{1})$ and $I$ is the length of the arc between the points, obviously
$I=\int _{0}^{x_{1}}{\sqrt {dx^{2}+dy^{2}}}$
or
   $I=\int _{0}^{x_{1}}{\sqrt {1+y^{\prime 2}}}dx$
and we wish to determine the form of the function $f$ so that this integral shall be a minimum.
$(b)$ {\it The Curve of Quickest Descent}. Let it be required to find the form of a smooth curve lying in a vertical plane and joining two given points, down which a particle starting from rest will slide under gravity from the first point to the second in the least possible time.
We shall use rectangular axes in the vertical plane taking the higher point as the origin and taking the axis of $X$ downward. Call the coordinates of the second point $x_{1},\ y_{1}$.
   \includegraphics[scale=0.3]{image005.eps}
Let $y=f(x)$ be a curve through $(0,0)$ and $(x_{1},\ y_{1})$ and use the well-known fact that ${\frac {ds}{dt}},$ the velocity of the moving particle at any time, is ${\sqrt {2gx}}$.
We have ${\frac {ds}{dt}}={\sqrt {2gx}},$
whence
$dt={\frac {ds}{\sqrt {2gx}}}={\frac {\sqrt {1+y^{\prime 2}}}{\sqrt {2gx}}}dx$
and
$t=\int _{0}^{x_{1}}{\frac {1}{\sqrt {2gx}}}{\sqrt {1+y^{\prime {2}}}}dx.$
Let
   $I=\int _{0}^{x_{1}}{\frac {1}{\sqrt {x}}}{\sqrt {1+y^{\prime {2}}}}dx,$
and the form of the function $f$ is to be determined so that this integral shall be a minimum.
$(c)$ {\it The Minimum Surface of Revolution}. Given two points and aline which are co-planar, let it be required to find the form of a curve terminated by the two points and lying in the plane which, by its revolution about the given line, shall generate a surface of the least possible area.
Take the line as the axis of $X$ and use an axis of $Y$ through one of the points. Call the coordinates of the points $0,\ y_{0}$, and $x_{1},\ y_{1}$. Let $y=f(x)$ be a curve through $(0,\ y_{0})$ and $(x_{1},\ y_{1})$.
If $S$ is the area of the surface of revolution generated by the curve,
$S=2\pi \int _{0}^{x_{1}}yds=2\pi \int _{0}^{x_{1}}y{\sqrt {1+y^{\prime _{2}}}}dx.$
Let
   $I=\int _{0}^{x_{1}}y{\sqrt {1+y^{\prime {2}}}}dx$
and we wish to determine the form of the function $f$ so that $I$ shall be a minimum.
The three problems just considered are special cases of what we shall call our {\it fundamental} problem which is, to determine the form of the function $f$ so that if $y=f(x)$,
$\int _{x_{0}}^{x_{1}}\phi (x,\ y,\ y^{\prime })dx$
shall be a maximum or a minimum; $\phi$ being a given function and $x_{0}$ and $x_{1}$ being given constants, as are $y_{0}$ and $y_{1}$, the corresponding values of $y$.
In ordinary problems in maxima and minima $y=f(x)$ is a given function and we wish to find a value, $x_{0}$, of $x$ for which $y$ is greater, if we seek a maximum, less, if we seek a minimum, than for {\it neighboring} values of $x$; that is, for values of $x$ differing from $x_{0}$ by a sufficiently small amount whether that amount is positive or negative.
In our new problems, to speak in geometrical language, we have to find the {\it form} of a curve for which our integral, $I$, is greater or less than for any {\it neighboring} curve having the same end-points.
Let us now attack our first problem, that of the {\it shortest line}. We have to find the form of the function $f$ so that if
$I=\int _{0}^{x_{1}}{\sqrt {1+y^{\prime {2}}}}dx$
$I$ shall be a minimum when $y=f(x)$.
Let $y=F(x)$ be any other continuous curve joining the given points, and let $\eta (x)=F(x)-f(x)$.
Then $y=f(x)+\eta (x)$ is our curve $y=F(x)$. Consider the curve $y=f(x)+\alpha \eta (x)$ where $\alpha$ is a parameter independent of $x$.
   \includegraphics[scale=0.3]{image006.eps}
For any particular value of $\alpha$ the curve $y=f(x)+\alpha \eta (x)$ is one of a family of curves including $y=f(x)$ for $\alpha =0$ and $y=F(x)$ for $\alpha =1$.
By taking a sufficiently small value for $\alpha$ we can make $\alpha \eta (x)$ less in absolute value for that and all less values of $\alpha$, and for all values of $x$ between $0$ and $x_{1}$, than any previously chosen quantity $\xi$; and for such values of $\alpha$ the curve $y=f(x)+\alpha \eta (x)$ is said to be a curve in the neighborhood of $y=f(x)$.
If $y=f(x)$ and $y=F(x)$ are given, $I(\alpha )$, the $I$ for any one of our curves $y=f(x)+\alpha \eta (x)$,is
$\int _{0}^{x_{1}}{\sqrt {1+(y^{\prime }+\alpha \eta ^{\prime }(x))^{2}}}dx$
and $I(\alpha )$ is a function of $\alpha$ only.
A necessary condition that $I(\alpha )$ should be a minimum when $\alpha =0$ is well known to be that ${\frac {d}{d\alpha }}I(\alpha )$ should be zero when $\alpha =0$. This condition we shall express as $I^{\prime }(0)=0$.
Since the limits $0$ and $x_{1}$ are constants
$I^{\prime }(\alpha )=\int _{0}^{x_{1}}{\frac {d}{d\alpha }}{\sqrt {1+\left[y^{\prime }+\alpha \eta ^{\prime }(x)\right]^{2}}}dx$
$I^{\prime }(\alpha )={\frac {y^{\prime }+\alpha \eta ^{\prime }(x)}{\sqrt {1+[y^{\prime }+\alpha \eta ^{\prime }(x)]^{2}}}}\eta ^{\prime }(x)dx,$
and
$I^{\prime }(0)=\int _{0}^{x_{1}}{\frac {y^{\prime }}{\sqrt {1+y^{\prime 2}}}}\eta ^{\prime }(x)dx$
Integrating by parts $I^{\prime }(0)=\left[{\frac {y^{\prime }}{\sqrt {1+y^{\prime {2}}}}}\eta (x)\right]_{0}^{x_{1}}-\int _{0}^{x_{1}}{\frac {d}{dx}}{\frac {y^{\prime }}{\sqrt {1+y^{\prime {2}}}}}\eta (x)dx$
$I^{\prime }(0)=-\int _{0}^{x_{1}}{\frac {d}{dx}}{\frac {y^{\prime }}{\sqrt {1+y^{\prime {2}}}}}\eta (x)dx,$
since $\eta (x)$ vanishes when $x=0$ and when $x=x_{1}$.
A necessary condition that $I(0)$ shall be less than $I(\alpha )$ for some value of $\alpha$ and for all less values of $\alpha$ no matter what $F(x)$ may be, in which case the length of the curve $y=f(x)$ is less than that of any neighboring curve, is that $I^{\prime }(0)=0$ independently of $\eta (x$, i.e. that
$\int _{0}^{x_{1}}{\frac {d}{dx}}{\frac {y^{\prime }}{\sqrt {1+y^{\prime 2}}}}\eta (x)dx=0$
no matter what the form of the arbitrary function $\eta (x)$.
This condition will be satisfied if and only if
${\frac {d}{dx}}{\frac {y^{\prime }}{\sqrt {1+y^{\prime 2}}}}=0$
and we thus are led to a differential equation of the second order between $y$ and $x$.
Its solution will express $y$ as a function of $x$ involving two arbitrary constants.
${\frac {y^{\prime }}{\sqrt {1+y^{\prime {2}}}}}=C,$
whence
$y^{\prime }=K,$
a constant; $y=Kx+L.$
The required curve is to pass through $(0,\ 0)$ and $(x_{1},\ y_{1})$ and thus we are able to determine $K$ and $L$.
$L=0,==K={\frac {y_{1}}{x_{1}}}.$
Hence $y={\frac {y_{1}}{x_{1}}}x$; and our curve is a straight line through the given points.
If certain other conditions, depending on the fact that when $I(\alpha )$ is a minimum $I^{\prime \prime }(\alpha )$ must be positive, are satisfied, $y={\frac {y_{1}}{x_{1}}}x$ must be the required shortest line.
As our necessary conditions gave us but a single solution it is clear that if there is any shortest line it must be our line $y={\frac {y_{1}}{x_{1}}}x$.
We may note in passing that in simplifying $I^{\prime }(0)$ by integration by parts we tacitly assumed that $f(x)$ and $F(x)$ were continuous and had continuous first derivatives over the range of integration.
We can deal with the general problem formulated previously precisely as we have dealt with the {\it shortest line} problem.
Let it be required to determine the form of the function $f$ so that $y=f(x)$ shall make
$\int _{x_{0}}^{x_{1}}\phi (x,\ y,\ y^{\prime })dx$
a maximum or a minimum; given that $y=y_{0}$ when $x=x_{0}$ and $y=y_{1}$ when $x=x_{1}$.
   \includegraphics[scale=0.3]{image008.eps}
As in the last section let $\eta (x)=F(x)-f(x)$, and consider the family of curves
$y=f(x)+\alpha \eta (x).$ Let
$I(\alpha )=\int _{x_{0}}^{x_{1}}\phi (x,\ y+\alpha \eta ^{\prime }(x))dx.$
$I^{\prime }(\alpha )=\int _{x_{0}}^{x_{1}}{\frac {d}{d\alpha }}\phi (x,\ y+\alpha \eta (x),==y^{\prime }+\alpha \eta ^{\prime }(x))dx.$
Let
$u=y+\alpha \eta (x)$
$v=y^{\prime }+\alpha \eta ^{\prime }(x).$
${\frac {du}{d\alpha }}=\eta (x),=={\frac {dv}{d\alpha }}=\eta ^{\prime }(x).$
$I^{\prime }(\alpha )=\int _{x_{0}}^{x_{1}}{\frac {d}{d\alpha }}\phi (x,\ u,\ v)dx$
$I^{\prime }(\alpha )=\int _{x_{0}}^{x_{1}}\left[{\frac {\partial \phi }{\partial u}}\eta (x)+{\frac {\partial \phi }{\partial v}}\eta ^{\prime }(x)\right]dx.$
$I^{\prime }(0)=\int _{x_{0}}^{x_{1}}\left[{\frac {\partial \phi }{\partial y}}\eta (x)+{\frac {\partial \phi }{\partial y^{\prime }}}\eta ^{\prime }(x)\right]dx$
and $I^{\prime }(0)$ must be made equal to zero.
Integrating by parts,
$I^{\prime }(0)=\int _{x_{0}}^{x_{1}}{\frac {\partial \phi }{\partial y}}\eta (x)dx+\left[{\frac {\partial \phi }{\partial y}}\eta (x)\right]_{x_{0}}^{x_{1}}-\int _{x_{0}}^{x_{1}}{\frac {d}{dx}}{\frac {\partial \phi }{\partial y^{\prime }}}\eta (x)dx,$
$I^{\prime }(0)=\int _{x_{0}}^{x_{1}}\left[{\frac {\partial \phi }{\partial y}}-{\frac {d}{dx}}{\frac {\partial \phi }{\partial y^{\prime }}}\right]\eta (x)dx$
since $\eta (x)$ vanishes when $x=x_{0}$ and when $x=x_{1}$. $I^{\prime }(0)$ must be zero independently of the form of $\eta (x)$ therefore
${\frac {\partial \phi }{\partial y}}-{\frac {d}{dx}}{\frac {\partial \phi }{\partial y}}=0,$
and as before we are led to a differential equation of the second order which if solved gives $y$ as a function of $x$ involving two arbitrary constants which must be determined from the facts that $y=y_{0}$ when $x=x_{0}$ and $y=y_{1}$ when $x=x_{1}$. This differential equation is known as {\it Lagrange's equation} and it is a necessary condition that $I$ should be a maximum or a minimum.
Any particular solution of Lagrange's Equation is called an {\it extremal}, and if the given problem has a solution it is that extremal which passes through the given end-points.
If $\phi$ is a function of $y^{\prime }$ only Lagrange's Equation becomes
${\frac {\partial \phi }{\partial y}}=\psi (y^{\prime })=C.$
Whence
$y^{\prime }=k$
a constant, and the extremals are straight lines; and therefore the required solution is the straight line through the given end-points as before.
The problems of $(b)$ and $(c)$ can be solved by substituting in Lagrange's Equation the appropriate value of $\phi$ and then solving the resulting equation.
For {\it the curve of quickest descent}
$\phi ={\frac {1}{\sqrt {x}}}{\sqrt {1+y^{\prime {2}}}}$
${\frac {\partial \phi }{\partial y}}=0,$
${\frac {\partial \phi }{\partial y^{\prime }}}={\frac {1}{\sqrt {x}}}{\frac {y^{\prime }}{\sqrt {1+y^{\prime {2}}}}}$
Lagrange's Equation becomes
   ${\frac {d}{dx}}{\frac {1}{\sqrt {x}}}{\frac {y^{\prime }}{\sqrt {1+y^{\prime {2}}}}}=0$
For {\it the minimum surface}
$\phi =y^{\sqrt {1+y^{\prime {2}}}}$
${\frac {\partial \phi }{\partial y}}={\sqrt {1+y^{\prime {2}}}},$
${\frac {\partial \phi }{\partial y}}={\frac {yy^{\prime }}{\sqrt {1+y^{\prime {2}}}}}$ Lagrange's Equation becomes
   ${\sqrt {1+y^{\prime {2}}}}-{\frac {d}{dx}}{\frac {yy^{\prime }}{\sqrt {1+y^{\prime 2}}}}=0$
We shall reserve the solving of (4) and (5) for a later article.