First midterm exam will be next Wednesday, Feb. 6. Monday will be a review. The exam will cover chapters 9 and 6.

In Taylor, read sections 7.1 for today, 7.2 to 7.3 for next Friday (after exam).

(∂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).

In the case of more than two variables, f = f(q_{i}, q'_{i}, t), for i = 1 to n, the solution is n Euler-Lagrange equations:

(∂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.

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**(t_{1} = 0) = (r=0, θ=0, φ=0), and **r**(t_{2}) = (r=r_{2}, θ=θ_{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 &phi(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 &theta'=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 + r_{0}.
Since r=0 at t=0, the constant of integration r_{0} = 0, and using r=r_{2} at t = t_{2}, we find c = r_{2}/t_{2}.
Putting this all together we have

r(t) = r_{2} t/t_{2} θ(t) = θ_{2} and φ(t) = φ_{2}.

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

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.

This technique is discussed in Taylor 7.10.

Sometimes it is necessary to constrain the relationship between variables in a problem. For instance, to calculate the shortest path between two points on a cylinder one can use cylindrical coordinates. But how would one calculate the shortest path between two points on an arbitrary surface (with no particular symmetry, only known through some parameterization (x(t), y(t), z(t))? Here it is convenient to use an equation of constant that relates x, y, and z, and incorporate that constraint into the Euler-Lagrange equations. Let's investigate how this is done. For simplicity, begin with a problem involving 3 variables, x, y, and t. Say that we wish to minimize the integral

S = ∫ f(x, x', y, y') dt

with the constraint g(x,y) = 0.
(For convenience we assume f doesn't depend on t -- could be put back later without changing our result.
If there were no constraint, we would begin by saying that the minimum occurs when δS = 0, or
δS = ∫ δf(x, x', y, y', t) dt

= ∫ [(∂f/∂x) δx + (∂f/∂x') δx' + (∂f/∂y) δy + (∂f/∂y') δy'] dt = 0.

We can apply integration by parts to the second and fourth terms:

d/dt( (∂f/∂x') δx ) = d/dt(∂f/∂x') δx + (∂f/∂x') δx'

therefore

∫ (∂f/∂x') δx' dt = ∫ d/dt( (∂f/∂x') δx ) dt - ∫ d/dt(∂f/∂x') δx dt,

and since the first term on the right is the integral of a derivative, the integral is simply the derivand evaluated at the limits. But by definition, δx = 0 at the endpoints (the path must go through the endpoints, so the deviation is zero at the endpoints), so this term evaluates to zero. The same result applies to the fourth term. The result is

∫ {[(∂f/∂x) - d/dt(∂f/∂x')] δx + [(∂f/∂y) - d/dt(∂f/∂y')] δy} dt = 0.

Now, if there were no constraint, then δx and δy can vary independently, so both terms in square brackets must vanish separately, yielding the normal pair of Euler-Lagrange equations. With a constraint, δx and δy can't vary independently; in particular, from the constraint equation

δg(x,y) = 0 = (∂g/∂x) δx + (∂g/∂y) δy.

Since this sum is zero, we can multiply it by any function (within reason) and it is still zero. In particular, we can multiply it by a function of t, λ(t), the so-called Lagrange multiplier, and add it to the integral. Then

∫ {[(∂f/∂x) - d/dt(∂f/∂x') + λ(t)(∂g/∂x)] δx + [(∂f/∂y) - d/dt(∂f/∂y') + λ(t)(∂g/∂y)] δy} dt = 0.

Since the function λ(t) is an arbitrary function, we can choose it such that the expression in square brackets is zero (and consequently, the second expression is also zero), that is, choose λ(t) such that

(∂f/∂x) - d/dt(∂f/∂x') + λ(t)(∂g/∂x) = 0,

and

(∂f/∂y) - d/dt(∂f/∂y') + λ(t)(∂g/∂y) = 0.

Now we must solve for x(t), y(t), and λ(t). To accomplish this we need a third equation, which we have from the constraint,

g(x,y) = 0.

© 2008 Robert Harr