PHY5210 W15

Chapter 6: Calculus of Variations

Reading:

In Taylor, read sections 6.3 to 6.4 for today, and 7.1 for Friday.

Recall

The Euler-Lagrange equation is

(∂f/∂y) + (d/dx)(∂f/∂y') = 0

Applications of the Euler-Lagrange Equation

Let's return to the two earlier examples and apply the Euler-Lagrange equation to solve them.

The Shortest Path between Two Points

On the x-y plane, find the shortest path between two points.

We determined that the length of a path from 1 to 2 is given by the integral

L = ∫12 ds = ∫12 sqrt(1 + y'(x)²) dx.

By inspection we see that f = sqrt(1 + y'(x)²). Applying the Euler-Lagrange equation to f gives

(∂f/∂y) + (d/dx)(∂f/∂y') = 0 + (d/dx)[y'/sqrt(1 + y'²)] = 0

Therefore y'/sqrt(1 + y'²) = C = constant or y'(x) = C /sqrt(1 - C²) = another constant = m. Finally, integrating y'(x), we find y(x) = m x + b, the equation for a straight line. The endpoints determine m and b.

In principal y(x) = m x + b is the path that makes the length stationary. In this case it is obvious that this is the minimum of the integral, but how do we show that in the general situation?

A Note on Variables

The variables x and y are placeholders. The can stand for anything. In Lagrangian mechanics, x will become t (time), and y will become q (a "generalized coordinate"). It might be useful to write the Euler-Lagrange equation in terms of u and v, with u the independent variable, and v the dependent variable:

(∂f(v, v', u)/∂v) + (d/du)(∂f(v, v', u)/∂v') = 0

In the next example, we switch the roles of x and y.

Brachistochrone

Given two points 1 and 2, with 1 higher above the ground, in what shape should we build a frictionless track so that a mass released from point 1 will reach point 2 in the shortest possible time?

Arrange the coordinate system so that point 1 is at the origin, x is horizontal, and y is vertically downward. This time we will take y as the independent variable. The integral to minimize is

T = ∫12 (ds/v)

where ds = sqrt(1 + x'²)dy, x' stands for dx/dy, and conservation of energy yields v = sqrt(2gy) for any descent by the distance y. Substitution leads to

T = (1/sqrt(2g)) ∫12 sqrt((x'² + 1)/y) dy

The function inserted into the Euler-Lagrange equation is

f (x, x', y) = sqrt[(x'² + 1)/y].

With the roles of x and y reversed, the Euler-Lagrange equation reads

(∂f/∂x) - (d/dy)(∂f/∂x') = -(d/dy)[x'√y/√(x'² + 1)] = 0 .

This says that the quantity before the derivative is a constant, which for later convenience we'll call 1/sqrt(2a)

x'/sqrt(y(x'² + 1)) = 1/√(2a)

Solve this for x'

x' = √[y/(2a - y)]

and integrate to find x as a function of y

x = ∫ dy √[y/(2a - y)]

This integral can be put in an easily solvable form with the trig substition y = a (1 - cosθ) yielding

x = a (1 - cosθ) = a (θ - sinθ) + C

We now have two parametric equations for x and y. If we choose the starting point to be x = y = 0, then C = 0 and the parametric equations are

x = a (θ - sinθ)   and   y = a (1 - cosθ)

The constant a must be chosen so that the curve passes through the point (x2, y2). This curve is called a cycloid. A cycloid is the path followed by a point on the rim of a rolling wheel of radius a. A rather interesting feature of this curve is that it takes the same time to slide to the bottom from any point along the curve. We say that such a track is isochronous, and they have been used in the design of some clocks, since the period is independent of amplitude. Recall that for a standard pendulum, this is only true in the limit of small amplitude.

Maximum and Minimum versus Stationary

While it is often true that the solution of the Euler-Lagrange equation yields a minimum, in some cases it yields a maximum, and sometimes a saddle point. To illustrate this fact, there is a problem in Taylor (6.5) where the result is a maximum.

Differential Notation

It is convenient to use a shorthand notation, rather than the η functions, for introducing small displacements to a path. The standard notation is the differential, δ. We will see how this is used in the following section.

More than Two Variables

Thus far our result is for one dependent variable, but generally, problems involve more than one dependent variable. For example, what if we wanted to prove that the shortest distance between two points is a straight line in 3-dimensional space (Taylor, 6.27)? But let's work the problem in spherical coordinates, where we will place the origin at the location of the first point, r1 = (r = 0, θ = θ1, φ = φ1), and r2 = (r = r2, θ = θ2, φ = φ2). The initial values of θ and φ are indeterminate at r = 0. In spherical coordinates, an infinitesimal path length is given by ds = √[dr² + r² ² + r² sin²θ ²]. Parameterizing the path by a variable, t, such that r = r(t), θ = θ(t), and φ = φ(t), the infinitesimal path length becomes ds = √[r'(t)² + r(tθ'(t)² + r(t)² sin²θ(t) φ'(t)²] dt, and the length of the path is

L = ∫ t1t2 √[r'(t)² + r(tθ'(t)² + r(t)² sin²θ(t) φ'(t)²] dt .

The problem now is to find the functions r(t), θ(t), and φ(t) for the path that minimizes the integral. The general statement of the problem is that we have an integral of the form

S = ∫ t1t2 f(q1, q'1, ..., qn, q'n, t) dt = ∫ t1t2 f(qi, q'i, t) dt

for i = 1 to n, with limits at qi(t1) and qi(t1), and we want to find the the functions qi(t) that minimize (or maximize, or ...) S. I will derive the general result with a different notation from the book. We would like S to be stationary, that is invariant to small changes. Stated another way, we want the differential of S to be zero to first order. We write the differential of S

δS = ∫ t1t2 δf(qi, q'i, t) dt = ∫ t1t2 [(∂f/∂qi) δqi - (∂f/∂q'i) δq'i] dt = 0.

Notice that while it is possible for f to directly depend on t, varying the path in t makes no sense. The independent parameter t is just a book keeping tool. We use it to enumerate the points on the path. If we thought of the path as composed of a finite number of discrete steps, then we could replace t by a summation index, i for instance. Now it should be clear that varying the summation index makes no sense. Therefore, we can vary qi and q'i. (Our problem doesn't depend on higher order derivatives, so there is no point in going further. In mechanics, if we know the positions and velocities of all parts, then we can determine the future state of the system -- in other words the accelerations can be computed given all the position and velocities. Therefore, we need just the coordinate and its derivative in Lagrangian mechanics.)

The second term can be integrated by parts to yield

δS = [∂f/∂q'i) δqi]t1t2 + ∫ t1t2 [(∂f/∂qi) - d/dt (∂f/∂q'i)] δqi dt = 0.

The first term is zero since δqi = 0 at the endpoints of the integral. This leaves us with the integral, which must be zero for an arbitrary function δqi, so the term in square brackets must be zero:

(∂f/∂qi) - d/dt(∂f/∂q'i) = 0

for every qi. This is the generalized form of the Euler-Lagrange equations for an arbitrary number of variables.

Shortest path between two points in spherical coordinates

Solve the problem for the shortest path between two points in 3 dimensions, using spherical coordinates. For convenience, and without loss of generality, we can place the origin at the starting point such that r(t1 = 0) = (r = 0, θ = 0, φ = 0), and r(t2) = (r = r2, θ = θ2, φ = φ2).

From the integral expression for L written above, we see that the function to put into the Euler-Lagrange equations is

f = √[r'(t)² + r(tθ'(t)² + r(t)² sin²θ(t) φ'(t)²]

The problem has three equations to solve for: r(t), θ(t), and φ(t). Each has its own Euler-Lagrange equation:

(∂f/∂r) - d/dt(∂f/∂r') = (r θ'² + r sin²θ φ'² - dr'/dt)/f = 0
(∂f/∂θ) - d/dt(∂f/∂θ') = [r² sinθ cosθ φ'² - (d/dt)(r² θ')]/f = 0
(∂f/∂φ) - d/dt(∂f/∂φ') = -[(d/dt)(r² sin²θ φ')]/f = 0

The last equation says that r² sin²θ φ' = constant, and since this is true for all the points, it is true for the starting point, (0, θ1, φ1). This can be satisfied only if φ' = 0 implying that φ = constant = φ1 = φ2. Insert φ' = 0 in the first and second equations to yield

r θ'² = dr'/dt
(d/dt)(r² θ') = 0

The second of these two says that r² θ' = constant. This must be true for all points on the path, in particular, the two endpoints. At the origin, r = 0, so the constant must be zero, then use of the other endpoint tells us that θ' = 0. Therefore we find that θ = constant = θ1 = θ2. Inserting θ' = 0 into the first of the two equations yields dr'/dt = 0, therefore r' = constant = c, and r(t) = ct + r0. Since r = 0 at t = 0, the constant of integration r0 = 0, and using r = r2 at t = t2, we find c = r2/t2. Putting this all together we have

r(t) = r2 t/t2   θ(t) = θ2   and   φ(t) = φ2.

This is the parametric equation for a straight line passing through the origin in spherical coordinates.

© 2015 Robert Harr