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

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

This is known as the Euler-Lagrange equation.
Knowing the form of the function f(y,y',x) this yields a differential equation that, along with the boundary conditions y_{1} = y(x_{1}), and y_{2} = y(x_{2}), can be solved for y(x).

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 = ∫_{1}^{2} (ds/v)

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

T = (1/sqrt(2g)) ∫_{1}^{2} 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/2a

x'√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 ∫ dθ (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 (x_{2}, y_{2}).
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.

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, problem 3 of the homework is an example where the result is a maximum.

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, **r**_{1} = (r=0, θ=θ_{1}, φ= φ_{1}), and **r**_{2} = (r=r_{2}, θ=θ_{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²dθ² + r²sin²θdφ²].
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 = ∫ _{t1}^{t2} √[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 = ∫ _{t1}^{t2} f(q_{1}, q'_{1}, ..., q_{n}, q'_{n}, t) dt = ∫ _{t1}^{t2} f(q_{i}, q'_{i}, t) dt

for i=1 to n, with limits at q_{i}(t_{1}) and q_{i}(t_{1}), and we want to find the the functions q_{i}(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 = ∫ _{t1}^{t2} δf(q_{i}, q'_{i}, t) dt = ∫ _{t1}^{t2} [(∂f/∂q_{i}) δq_{i} + (∂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 q_{i} 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}) δq_{i}]_{t1}^{t2} + ∫ _{t1}^{t2} [(∂f/∂q_{i}) - d/dt(∂f/∂q'_{i})] δq_{i} dt = 0.

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

(∂f/∂q_{i}) - d/dt(∂f/∂q'_{i}) = 0

for every q_{i}.
This is the generalized form of the Euler-Lagrange equations for an arbitrary number of variables.