# Calculus of Variations

## Fermat's Principle

Fermats principle is that light takes a path between two points that requires the least amount of time.

If we let S represent the path of light between two points then

light takes the time to travel between two points can be expressed as

The index of refraction is denoted as

for light traversing an interface with an nindex of refraction $n_1$ on one side and $n_2$ on the other side we would hav e

take derivative of time with respect to to find a minimum for the time of flight

or

## Generalizing Fermat's principle to determining the shorest path

One can apply Fermat's principle to show that the shortest path between two points is a straight line.

In 2-D one can write the differential path length as

using chain rule

the the path length between two points and is

adding up the minimum of the integrand function is one way to minimize the integral ( or path length)

let

the path integral can now be written in terms of dx such that

To consider deviation away from the function is introduced to denote deviations away from the shortest line and the parameter is introduced to weight that deviation

= the difference between the current curve and the shortest path.

let

= A path that is not the shortest path between two points.

Note
It is stipulated that is independent of to ensure that in the limit, and
ie; both the function and its derivative approach

let

the deviations in the various paths can be expressed in terms of a differential of the above integral for the path length with respect to the parameter as this parameter changes the deviation

The second integral above can by evaluated using integration by parts as

let

:
the difference between the end points should be zero because to keep be sure that the endpoints are the same

The above integral is equivalent to

For the above to be true for any function then it follows that should be zero

= Constant

integrating

## Euler-Lagrange Equation

The Euler- Lagrange Equation is written as

the above becomes a condition for minimizing the "Action"

Problem 6.16

Brachistochrone problem

## Shortest distance betwen two points revisited

Let's consider the problem of determining the shortest distance between two points again.

Previously we determined the shortest distance by assuming only two variables. One was the independent variable and the other was dependent on ().

What happens if the above assumption is relaxed.

To consider all possible paths between two point we should write the path in parameteric form

The functions above are assumed to be continuous and have continuous second derivatives.

Note
the above parameterization includes our previous assumption of the variables if we just let .
Other examples
parabola
circle
ellips
hyperbola

The length of a small segment of the path is given by

you have

and the path integral changes from

to

the same arguments are made again

You now have

you now have

If you require that the integral not deviate from the shortest path between two points (i.e. it is stationary) Then you are requiring that the integral from path segments that deviate from the shortest path satisfies the equation

and

when

for any function and that vanish at the endpoints and

or

similarly

= constant

similarly

### Shortest path along a sphere

= constant

Assume the location of the first point is at [/itex]

The curves of constant are lines of longitude and are great circles which are geodesics (the shortest lines between two points on a shphere)

### Brachystochrone problem

In the brachystochrone (Greek for "shortest time") problem we are determining the path of a bead between two points that takes the shortest time when the bead is constrained to slide along a wire without friction and in the presence of gravity.

The fall time for the bead is given by

Using conservation of energy one may cast the beads velocity as

This problem is similar to the shortest distance between two points problem above in that one can write the time variation that you wish to minimize in terms of the path variation

This time however there is an external driving force which is a function of the distance . So instead of writing the distance variation as a function of with we will want to write it as a function of with

then

since is an explicit function of and

then we can use the Euler-Lagrange equation

Notice how the variables x & y have been interchanged now that is written as a function of whereas before was written as a function of
constant
= constant

or

= constant
using the foresight of working this problem before , the convenient constant is defined as

## alternate form of Euler-Lagrange equation

### Brachistochrone problem revisited

Consider the Brachistochrone problem again but this time do not cast as a function of

The fall time for the bead is given by

Using conservation of energy one may cast the beads velocity as

This problem is similar to the shortest distance between two points problem above in that one can write the time variation that you wish to minimize in terms of the path variation

then

BUT the above function appears to be independent of x and

### alternate form of Euler-Lagrange's equation (the first integral)

In the previous problems of finding the shortest distance between two point in 2-D and 2 point on the surface of the sphere, the extreme function was independent of (or )

for the 2-D line

for the geodesic

there are some problems where the functional dependence of on or is not explicit

because of this we need to use the chain to take the total derivative of the function with respect to

Notice

substitution in for and moving terms around

rearranging

Euler-Lagrange Equation

Then the alternate form of Euler-Lagrange's equation is

### returning to Brachistochrone

Consider the Brachistochrone problem again but this time do not cast as a function of

The fall time for the bead is given by

Using conservation of energy one may cast the beads velocity as

This problem is similar to the shortest distance between two points problem above in that one can write the time variation that you wish to minimize in terms of the path variation

then

BUT the above function appears to be independent of x and

Using the alternate form of Euler-Lagrange's equation is

constant
\left [f- y^{\prime}\frac{\partial f}{\partial y^{\prime} }\right ] = \left ( \frac{1+(y^{\prime}(x))^2 }{y}\right )^{\frac{1}{2}} - \frac{y^{\prime}}{y\left }( \frac{(y^{\prime}(x))^2 }{1+(y^{\prime}(x))^2}\right )^{\frac{1}{2}}

### Soup film (cycloid)

consider the problem of the soap bubble formed between two circular rings. You stack two rings on top of each other in soapy water and then pull them apart after removing them from the water together where a film is created between the rings in a cylindrical shape.