24
Calculus of variations - Lecture 11 1 Introduction It is easiest to formulate the calculus of variations problem with a specific example. The classical problem of the brachistochrone (1696 Johann Bernoulli) is the search to find the path which a falling object must take to travel between two points in minimum time. Figure 1 shows the geometry. The path we seek is given by y (x) in the 2-D plane. The arc length of an element on this path is; M Path 1 Path 2 (x , y ) 1 (x , y ) 1 2 2 Figure 1: The geometry, showing various paths in order to find the one where a falling object moves in minimum time between the points dl = dx 2 + dy 2 = dx 1+(y ) 2 The time to travel over the element is, dt = dl/V (x), where V (x) is the velocity. The total time between the points is; t = x 2 x 1 dx 1+(y ) 2 V (x) We are to find the function, y (x), which results in a minimum of t. The particle moves in a gravitational field which determines V (x). This particular problem may be reduced by using conservation of energy. Assume that the gravitational field is constant which produces a constant acceleration, g. Thus the potential energy due to the gravitational field increases linearly proportional to vertical height. The total energy(potential plus kinetic energies) is conserved. Therefore; 1

Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

Calculus of variations - Lecture 11

1 Introduction

It is easiest to formulate the calculus of variations problem with a specific example. Theclassical problem of the brachistochrone (1696 Johann Bernoulli) is the search to find thepath which a falling object must take to travel between two points in minimum time. Figure1 shows the geometry. The path we seek is given by y(x) in the 2-D plane. The arc lengthof an element on this path is;

M

Path1

Path2

(x , y )

1(x , y )1

2 2

Figure 1: The geometry, showing various paths in order to find the one where a falling objectmoves in minimum time between the points

dl =√

dx2 + dy2 = dx√

1 + (y′)2

The time to travel over the element is, dt = dl/V (x), where V (x) is the velocity. The totaltime between the points is;

t =x2∫

x1

dx

1 + (y′)2

V (x)

We are to find the function, y(x), which results in a minimum of t. The particle moves ina gravitational field which determines V (x). This particular problem may be reduced byusing conservation of energy. Assume that the gravitational field is constant which producesa constant acceleration, g. Thus the potential energy due to the gravitational field increaseslinearly proportional to vertical height. The total energy(potential plus kinetic energies) isconserved. Therefore;

1

Page 2: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

(1/2)MV 2 + Mgy = constant

The mass of the object, M , starts from rest where the initial potential energy is Mgy1 =constant.

(1/2)V 2 = g(y1 − y)

Substitution for V into the equation for the time gives;

t = 1√

2g

x2∫

x1

dx

1 + (y′)2√

y1 − y

2 General Statement of the problem

Before we address the solution of the problem in the last, section use this example to writea general statement of the problem. Suppose a function of the form, L(x, y(x), y′(x)). Thisis inserted in the integral;

I =x2∫

x1

dxL

Now find the function, y0(x), which causes I to have an extremum, ie either a maximum,minimum, or inflection point. Suppose the solution has the form, y0(x), and provide thevariation in the path, y0(x)¡ by another function, η(x). Write this as;

y(x) = y0(x) + λ η(x)

The constant, λ, determines the amount of the arbitrary function η(x) added to the correctfunction we seek. Note that η(x1) = η(x2) = 0 as the path has fixed end points, which are

the boundary conditions. In general, I, is a function of λ so dIdλ

= 0.

dIdλ

= 0 =x2∫

x1

dx [∂L∂y

∂y∂λ

+ ∂L∂y′

∂y′

∂λ]

Then∂y∂λ

= η(x) and∂y′

∂λ= η′(x). Put this back in the equation for dI

dλand integrate the

second term by parts.

x2∫

x1

dx ∂L∂y′

∂y′

∂λ= [∂L

∂y′η(x)]x2

x1−

x2∫

x1

dx ddx

(∂L∂y′ ) η(x)

The surface term vanishes using the boundary conditions, so the final result for the integral is;

2

Page 3: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

dIdλ

= 0 =x2∫

x1

dx [∂L∂y

− ddx

(∂L∂y′ )]η(x)

The function η(x) is arbitrary, so the integrand itself must vanish.

[∂L∂y

− ddx

(∂L∂y′ )] = 0

This is the Euler-Lagrange equation. It is a differential equation whose solution is the func-tion, y(x). There are several forms of this equation which can be obtained for special cases.

In the case where L = L(x, y)

∂L∂y

= 0

L = f(x) any function of x

In the case where L = L(x, y′)

ddx

[∂L∂y′ ] = 0

∂L∂y′ = constant

L = cy′ + f(x)

In the case where L = L(y, y′)

Use the identity;

ddx

[y′ ∂f∂y′ − f ] = −y′[

∂f∂y

− ddx

(∂f∂y′ )] − ∂f

∂x

Then if∂f∂x

= 0 and y′ 6= 0

ddx

[y′ ∂L∂y′ − L] = 0

[y′ ∂L∂y′ − L] = constant

3 Brachistochrone

Return to the original problem,

3

Page 4: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

L =

1 + y′ 2√y1 − y

L is independent of x. Thus from the last section;

[y′ ∂L∂y′ − L] = constant

Substitution where the constant is defined by c;

y′ 2 − (1 + y′ 2)√

1 + y′ 2√

y1 − y= c

y′ 2 =1 − c2(y1 − y)

c2(y1 − y)

The equation may be solved by integration using a constant a;

x =∫

dy

√y1 − y

a − (y1 − y)

Let (y1 − y) = a sin2(θ/2). Then after integration;

y = y1 − a sin2(θ/2) = y1 − (a/2)(1 − cos(θ))

This is the parametric equation of a cycloid which is produced by a point on a circle rollingon a flat surface.

4 Geodesics

Suppose we want the arc of minimum length connecting 2 points on a surface in 3-D. In thiscase we suppose two parameters to obtain the parametric equations;

x = x(u, v)

y = y(u, v)

z = z(u, v)

As an example, the spherical surface has r = constant, with variables, θ and φ. A surface isdefined by the function. g(x, y, z) = 0 and the arc length is;

dl2 = dx2 + dy2 + dz2

4

Page 5: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

As the surface depends on the variables, (u, v), we can expand dx to be;

dx = ∂x∂u

du + ∂x∂v

dv

There are similar expressions for dy and dz. These are substituted into the expression forthe square of the elemental length;

dl2 = P du2 + 2Q du dv + R dv2

P = (∂x∂u

)2 + (∂y∂u

)2 + (∂z∂u

)2

Q = ∂x∂u

∂x∂v

+∂y∂u

∂y∂v

+ ∂z∂u

∂z∂v

R = (∂x∂v

)2 + (∂y∂v

)2 + (∂z∂v

)2

The length of the arc is then;

I =u2∫

u1

du√

P + 2Q v′ + R v′ 2

Derive the Euler-Lagrange equations with the integrand defined by;

L =√

P + 2Q v′ + R v′ 2

It is useful here to focus the example on spherical coordinates. In this case;

x = a sin(v) cos(u)

y = a sin(v) sin(u)

x = a cos(v)

P = a2 sin2(v)

Q = 0

R = a2

L = a√

sin2(v) + v′ 2

L is independent of u ( x → u in the previous development and y → v ). The Euler-Lagrange equation is;

5

Page 6: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

v′ ∂L∂v′ − L = constant

Use the above value for L, differentiate, and collect terms.

v′ 2 = a sin4(v) − sin2(v)

Solve the ode by integration.

u =v2∫

v1

dv 1√

a sin4(v) − sin2(v)

sin(u − B) = A cot(v)

In this equation, A and B are constants. The expression can be shown to represent an arcin a plane which passes through the center of the sphere ie a great circle.

5 Lagrange Multipliers

Suppose a function, f(x, y, z). For f to be an extrememum;

df =∂f∂x

dx +∂f∂y

dy +∂f∂z

dz = ~∇f · d~s = 0

and f must not change in any of the 3 directions. Thus;

∂f∂x

=∂f∂y

=∂f∂z

= 0

Suppose the variables are subject to a constraint, g(x, y, z) = z−h(x, y) = 0. That is solveg for one of the variables, which could be substituted into f reducing the degrees of freedom.However, using g as a constraint, consider H = f + λg.

dH = df + λdg

dH = [∂f∂x

+ λ∂g∂x

]dx + [∂f∂y

+ λ∂g∂y

]dy + [∂f∂z

+ λ∂g∂z

]dz

Because of the constraint,

∂f∂x

6= ∂f∂y

6= ∂f∂z

6= 0

Choose the constraint parameter λ so that g = z − z(x, y).

[∂f∂z

+ λ∂g∂z

] = [∂f∂z

+ λ] = 0

6

Page 7: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

A. .B

x

y

y = yo

Figure 2: Constraining the search for a maximum in f by the function y = y0. Contoursrepresnet the lines of equal magnitude

[∂f∂x

+ λ∂g∂x

]dx + [∂f∂y

+ λ∂g∂y

]dy = 0

Since x and y are independent;

[∂f∂x

+ λ∂g∂x

] = 0

∂f∂y

+ λ∂g∂y

= 0

The choice of λ provides dH = 0. Thus we have the equations;

[∂f∂x

+ λ∂g∂x

] = 0

[∂f∂y

+ λ∂g∂y

] = 0

[∂f∂z

] + λ = 0

For a set of N constraints, we expect the equations;

∂f∂xi

+N∑

k=1

λk∂gk

∂xi= 0

The λk are the Lagrange multipliers and these do not have to be explicitedly determined.Figure 2 shows the result of constraining the function, f , by the equation y = y0 when look-ing for a maximum. The maximum at A shifts to the maximum at B along the constraintcurve.

7

Page 8: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

d

x

y

Figure 3: An example of a hanging cable

6 Example

A cable of length L hangs between two points at the same height on walls a distance, d,apart. This is illustrated in Figure 3. Note that the gravitational potential energy (PE)must minimize in the equilibrium position. Let λ be the mass per unit length of the cable.

PE = −∫

g(λ dl) y(x) = −gλd∫

0

dx( dldx

) y

dl2 = dx2[1 + (dydx

)2]

PE = −gλ∫ d

0dx y[

1 + y′ 2]

L = y[√

1 + y′ 2]

The length of the cable is the constraint. L =∫

dl =d∫

0

dx√

1 + y′ 2.

Let G =√

1 + y′ 2, and employ a Lagrange multipier to include the constraint.

H = L + ηG

Note that L = y G and H is independent of x. The Euler-Lagrange equation is then;

y′ ∂H∂y′ − H = constant

Substitute for H , write the constant as c, and collect terms.

8

Page 9: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

y′ = ±[(1/c2)(y + ǫ)2 − 1]1/2

The slope changes direction as the position varies 0 ≤ x ≤ d. Integrate the equation to findthe position, x.

x = c[cosh−1(y + η

c ) − cosh−1(η/c)] 0 ≤ x ≤ d/2

Invert this equation to obtain;

y = c cosh[(x/c) + cosh−1(η/c)] − η/c

At the midpoint the slope is zero, so d/2c = −cosh−1(η/c). Then let c = −γ so thatη = −γ cosh(d/2γ)

Find the value of γ using the constraint on the length.

L/2 =d/2∫

0

dx√

1 + y′ 2 =d/2∫

0

dx [1 + sin2((d/2 − x)2

γ )]1/2

The above is integrated to give;

L/2 = γ sinh(d/2γ)

Substitute in the above equation for y to obtain the solution to the problem.

7 Electrostatics - Minimizing energy

The electric field is obtained from the potential function, φ(x, y, z), by partial differentiation,~E = −~∇φ. The energy density contained in the field is;

dWd(V olume)

= ǫ2

~E · ~E

The field is obtained by the charge densities as they arrange themselves on a conducting sur-face to obtain an equi-potential. This produces an energy minimum subject to constraintsof the electrostatic problem. Thus;

W = (ǫ/2)∫

dτ |~∇φ|2

Look for an extrememum of this integral. The integrand is L = L(φx, φy, φz). Now intro-duce a constraint η(x, y, z) and define;

9

Page 10: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

Vi = Li + λ ηi

The potential is constant (boundary condition), ηi = 0 on the conducting surfaces, i =

x, y, z. The extrememum is obtained by dWdη

= 0. This results in the Euler-Lagrange

equation which in this case is Laplace’s equation.

∑ ∂2Vi

∂x2i

= 0

Then as a simple example, choose a set of functions, V = V0(r/b)p with p < 0 so that the

potential converges as r → ∞. We are to minimize W with respect to p. Substitute;

W =V 2

1 ǫ2b2p

∞∫

b

r2 dr(p rp−1)2∫

W =2πV 2

1 p2b2(2p + 1)

dWdp

= (2πV 21 b)

p(p + 1)2p + 1 = 0

The solutions are p = 0, −1 so V = V1(r/b)−1. In this case we have an exact solution since

the function is a solution to Laplace’s equation.

W = V 21 b/2

However suppose we had chosen a function of the form, V = V1 e−α(r−b)/b. This does notsatisfy Laplace’s equation but does satisfy the boundary condition. Put this form into theintegral to find the value of W .

W =πV 2

1 ǫbα [1 + (1/2α2)(2α + 1)]

dWdα

= (πǫV 21 b) [ln(α) − 1/α − 1/4α2] = 0

α ≈ 1.85

W ≈ 1.23(V 21 b/2)

Compare this to the exact answer above. This technique provides an approximation methodwhich will be explored later.

10

Page 11: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

L

s

Figure 4: The geometry of the capacitor problem

8 Example

A capacitor is charged, then dipped into a dielectric fluid. The fluid is drawn up into thecapacitor. No dissipation is assumed, so energy is conserved. A cross section of the geometryis shown in Figure 4. The width of the capacitor out of the page is a. Assume the separationof the plates, s is ≪ the length of the plates, L, and a simple parallel plate capacitor is as-sumed (ie the fringe fields are neglected). The fluid density is ρ, and has dielectric constant,ǫ = ǫrǫ0. The capacitor is disconnected from the charging voltage before dipping into thefluid. The charge on the capacitor plates does not change, but redistributes as the voltageon the plates changes as the fluid rises between the plates. Energy then is drawn from thecapacitor to raise the fluid against gravity. First find the potential energy of the fluid raisedto height, h.

Potential Energy (PE) =h∫

0

dm g y

dm = ρ as dy

PE = asρgh2/2

The capacitance of a simple parallel plate capacitor is C = A ǫ/s where A is the platearea, s their separation, and ǫ the dielectric constant. The energy stored in the capacitor is

11

Page 12: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

WC = (1/2)CV 2 = (1/2)Q2T/C, where V is the voltage, and QT the stored charge. In this

problem the capacitor is charged and disconnected from the voltage. The total charge onthe plates remains on the plates but redistributes as the fluid is drawn up into the plates.However, the voltage between the plates changes. Use the energy W = (1/2)Q2/C. Thecapacitor is viewed as 2 capacitors in parallel - one with dielectric, ǫ = ǫrǫ0, and one withdielectric, ǫ0. The energy stored in this final capacitor system is;

WfC = (1/2)[Q2

1C1

+Q2

2C2

]

C1 = ahǫs C2 =

a(L − h)ǫ0s

There is a constraint that QT = Q1 +Q2. Write the equation for the conservation of systemenergy as;

W = (1/2)Q2

T saLǫ0

− asρgh2

2 + (1/2) saǫ0

[Q2

1hǫr

+Q2

2

(L − h)]

Solve for the equilibrium height, h, subject to the constraint QT = Q1 + Q2. One could usethis constraint with the definitions of the capacitance and conservation of energy to reducethe above equation into a variable of h alone, and then set the derivative of the energy tozero to find h. We solve the problem here using Lagrange multipliers. Define the constraintcondition as f = QT −Q1 −Q2 = 0, multiply this by a Lagrange multiplier λ and subtractfrom the energy equation above. Then take the 4 partial derivatives;

∂W∂h

= −asρgh + (1/2) saǫ0

[Q2

1

ǫrh2 − Q2

1

(L − h)2 ] = 0

∂W∂QT

=QT saLǫ0

− λ = 0

∂W∂Q1

= − sQ1

ahǫ0ǫr+ λ = 0

∂W∂Q2

= − sQ1

a(L − h)ǫ0ǫr+ λ = 0

Solve these equations. The partials with respect to the Q’s introduce the conservation ofcharge. The final result is;

h = WCǫ0

ρ(Volume)g[ǫr − 1]

9 Least Action

Suppose the motion of a body between two points, A and B. The motion can be along anypath which keeps the energy conserved, see Figure 5. In general the time required to travel

12

Page 13: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

1Path

Path 2

A

B

Figure 5: Possible paths for a particle to travel in space-time between A and B

the different paths is not the same. From Newton’s laws;

ddt

[mid~ridt

] = ~Fi

The index i represents the ith particle, with mi the mass, ~ri its displacement, and ~Fi theforce. Now let δ~ri be a displacement of the particle from its path. Then;

i

ddt

[mid~ridt

] · δ~ri =∑

i

~Fi · δ~ri

This can be manipulated into the form below. Use;

dδridt

= δdridt

+ dridt

dδtdt

Then;

ddt

[∑

i

mid~ridt

· δ~ri] − δ∑

i

(1/2) miv2i − ∑

i

miv2i

d(δt)dt

=∑

i

~Fi · δ~ri

The change in potential energy is, δV = −∑

i

~Fi · δ~ri, and the kinetic energy is T =∑

i

1/2 miv2i . The final result is;

ddt

[∑

i

mid~ridt

· δ~ri] = δ(T − V ) + 2T ddt

δt

T + V = constant so δT = −δV . Integrate the power over time ;

13

Page 14: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

t2∫

t1

dt ddt

[∑

i

mid~ridt

· ~ri] =t2∫

t1

dt [δ(2T ) + 2T ddt

(δt)]

Require all paths to arrive at the same time;

δt2∫

t1

dt (2T ) = 0

This is the principle of least action. It states that among all paths between 2 points in space,the path which is chosen is the one in which the time is an extrememum.

10 An alternative development of least action

Suppose a system of particles moving with time, ti, subject to a potential energy field,V (qi, · · · ). Here i labels the particle, and V in general depends on all qi. The system isconservative, ie energy is conserved.

K.E. + P.E. = Constant.

The Kinetic energy, T (qi, · · · , qi, . . . ) changes with position. Now suppose all paths betweentwo points such that energy is conserved. The travel time for such paths is not the same, ingeneral. Thus consider the inegral;

A =t2∫

t1

dt T

Assume the all paths begin at time, t1, but because we wish to vary the transit time, theydo not arrive at the same point at the same time. Thus make a variable change u = u(t) sothat the values of u(t1) and u(t2) are the same for all paths. Then remove the explicit timedependence from the energy terms.

dt = duu

dqi

dt= qi =

dqi

duu = q′iw

w = u

T = (1/2)miv2i = (1/2)miq

′ 2i w2 = w2T

A = 2u(t2)∫

u(t1)

du T ′w2

14

Page 15: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

T = T (qi, · · · , q′i, · · · )

Energy conservation is;

w2T ′ + V = E

The potential, V , is a function only of position, and the explicit time dependence inthe kinetic energy has been removed. Now find the extremum in the time for various paths,ie with respect to the functions, q, w, with the conservation of energy as a constraint. UseLagrange multipliers for the constraint to write the function;

L = 2wT ′ + λ[w2T ′ + V − E]

L is independent of w so ∂L∂w

= 0

2T ′ + λ2wT ′ = 0

2w∂T ′

∂qi+ λw2∂T ′

∂qi+ ∂V

∂qi= d

du[(2w + λw2)∂T ′

∂qi]

This gives a set of equations for all i. Solve and remove the dependence on the Lagrangemultiplier. Use the definition of w.

∂(T − V )∂qi

= ddt

[ ∂∂qi

(T − V )]

Note that T − V is the Lagrangian, L. Thus the principle of least action leads to the La-grange equations for the motion of a system of particles.

11 Example

Suppose a particle moves subject to no applied forces. There will then be no potential en-ergy, and the kinetic energy enerqy is constant.

δT = −δV = 0

The position as a function of time is x(t). Therefore using the form for the velocity u = dxdt

,the Euler-Lagrange equation is;

∂T∂x

− ddt

(∂T∂u

) = 0

15

Page 16: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

T = (1/2)µ2 ∂t∂u

= µ

m d udt

= 0

u = constant

12 Example - Fermat’s principle

Suppose the path of light in a medium has a velocity, u(y). The time for a ray to travel from(x1, y1) to (x2, y2) is;

t =(x2,y2)

(x1,y1)

dl/u =(x2,y2)∫

(x1,y1)

dx

(1 + y′,2)u

This is the brachistochrone problem with Euler-Lagrange equation;

y′ ∂f∂y′ − f = c

with c a constant. Substitution for the value of f gives;

1u√

1 + y′ 2= c

Here, rays of equal time have the same phase. If we think about all possible paths, thereis a large number with nearly the same phase around the stationary point. Thus in theformulation of Quantum Theory, the probability of the stationary path is the largest.

13 Hamilton’s principle

Consider a system of particles subject to constaints. Develop the equations of motion usingleast action.

∑ ddt

[mid~ridt

· δ~ri] =∑ ~Fi · δ~ri

In the above δ~ri is an arbitrary displacement subject to constraints. The equation of leastaction is obtained.

∑ ddt

[mid~ridt

· δ~ri] = δ(T − V ) + 2T ddt

(δt)

If paths are traced which have equal times then the last term on the right vanishes.

16

Page 17: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

|∑

mid~ridt

· δ~ri |tt0 = δt∫

t0

dt (T − V )

However, if all times are the same then δt∫

t0

dt(T − V ) = 0. This is Hamilton’s principle,

and L = T −V is the Lagrangian. In general the Lagrangian is a function of the coordinates,qi and the time derivatives, qi. The Euler Lagrange equations for the Lagrangian, L , is;

∂L∂gi

− ddt

[∂L∂qi

] = 0

Now L is independent of the parameter, t. Thus we obtain;

ddt

[∑

q ∂L∂q

− L] = 0

The potential is only a function of the coordinates so ∂V∂q

= 0 ;

qi∂T∂qi

= 2T

Then look at L =∑

qi∂T∂qi

− L = 2T − T + V = T + V = Total Energy. Now define;

H =∑

piqi − L

In the above pi = ∂T∂qi

. The function H is the Hamiltonian of the system. Then;

∂H∂pj

= qj +∑

pi∂qi

∂pj−

∑ ∂L∂qi

∂qi

∂pj= qi

H =∑ ∂T

∂qiqi − L = T + V

H is the system energy. Then look for the extrememum of the integral;

I =∫

dtL =t2∫

t1

dt [∑

piqi − H ]

Here pi and qi are considered independent variables. Introduce the constraint;

qi − ∂H∂pi

= 0.

This is included by Lagrange multipliers, λk. We obtain the modified Lagrangian;

f ∗ =∑

piqi − H +∑

λk[qk − ∂H∂pk

]

This produces a set of Euler Lagrange equations;

17

Page 18: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

∂f ∗

∂pi− d

dt∂f ∗

∂pi= 0

∂f ∗

∂qi− d

dt∂f ∗

∂qi= 0

Which give the following equations;

qi − ∂H∂pi

−∑

λk∂2H

∂pi∂pk= 0

−∂H∂qi

−∑

λk∂2H

∂qi∂pk− d

dt[pi + λi] = 0

We find that∑ ∂2H

∂pipk= 0 so choose the solution, λk = 0. This produces the relation

between conjugate variables.

pi = −∂H∂qi

qi = ∂H∂pi

This system of equations constitute Hamilton’s formulation of the laws of motion. It is nowuseful to compare Hamilton’s principle to the principle of least action. In Hamilton’s prin-ciple, all paths are traveled in the same time. In the principle of least action the energy iskept constant over the given path.

14 Example

A particle is constrained to move in a vertical circle under the gravitational force. The po-tential energy, PE, is;

PE = mgr[1 + sin(θ)]

The kinetic energy, KE, is;

KE = (1/2)mv2 = (1/2)m[r2 + r2θ]

The constraint is that r = R0 a constant. Construct the Lagrangian, L = T − V .

L = (1/2)m[r2 + r2θ] − mgr[1 + sin(θ)]

The Lagrangian has variables, L(r, θ, r, θ). Introduce the constraint using the Lagrange mul-tiplier. The equations of motion are;

18

Page 19: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

L∗ = L + λ(r − R0)

∂L∗

∂r− d

dt[∂L

∂r] = 0

∂L∗

∂θ− d

dt[∂L

∂θ] = 0

This produces the equations;

−mg[1 + sin(θ)] + λ − ddt

[mr] = 0

−mgr cos(θ) − ddt

[mθr2] = 0

r = r0 = r = 0

R θ + t cos(θ) = 0

λ = mg[1 + sin(θ)]

On the other hand, since L is independent of the parameter t;

L∗ − r ∂L∗

∂r= constant

This just results in the conservation of energy. The total energy is then;

W = (1/2)mr2θ2 − mgR0[1 + sin(θ)]

As this now results in a first order ode, the equation can be easily integrated.

15 Example

A box on mass,M , slides down an incline plane of length, L, and mass, M , which is itselfis able to slide horizontally. Choose the coordinates along the sloping edge of the slide tobe s, and the horizontal direction of its motion to be, x. The kinetic energy of the slide is(1/2)Mx2. The velocity of the box is;

~v = (dxdt

− dsdt

cos(θ))x − dsdt

sin(θ) y

The total kinetic energy is then;

KE = (1/2)M [dxdt

]2 + (1/2)m[(dxdt

− dsdt

cos(θ))2 + (dsdt

sin(θ))2]

19

Page 20: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

θ

mM x

s

Figure 6: The geometry of a block sliding of a moveable wedge

The potential energy is,

PE = −mgs sin(θ)

The Lagrangian is

L = T − V = (1/2)(M + m)(dxdt

)2 − mdxdt

dsdt

cos(θ) + (1/2)m(dsdt

)2 + mgs sin(θ)

Apply the Euler Lagrange formulation for the minimization to obtain the two equations;

ddt

[(M + m)(dxdt

) − mdsdt

cos(θ)] = 0

ddt

[−mdxdt

cos(θ) + mgdsdt

] − mg sin(θ) = 0

Integrate the first equation above which represents conservation of momentum.

(M + m)(dxdt

) − mdsdt

= C1

Assume the system starts at rest and C1 = 0 then a second integration gives;

(M + m)x − ms cos(θ) = C2

Choose x = s = 0 when t = 0 so that C2 = 0. Then integrate the second equation aboveusing the initial conditions.

(−dxdt

cos(θ) + dsdt

) − gt sin(θ) = 0

Eliminate dxdt

and integrate again to obtain;

s = [ M + mM = m sin2(θ)

]gt2

2 sin(θ)

20

Page 21: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

The position, x, can be obtained by substitution in an above equation. The time for the boxto slide to the bottom when s = L is;

t =

2Lg sin(θ)

[(M + m) sin2(θ)

M + m]

16 Relativistic Lagrangian formulation

We wish a Lagrangian which reproduces the relativistic equations of motion. We choose;

L = mc2[1 −√

1 − β2] − V (~r)

In the above β is the particle velocity in units of the velocity of light, c, and the potential isV (~r). The potential itself is a scalar function and the argument ~r simply means it dependson all 3 coordinates. Apply the Euler Lagrange equations;

ddt

[ ∂L∂xi

] − ∂L∂xi

= 0

Note that xi = vi and ~r =∑

xi xi . Substitute into the Euler Lagrange equations to obtain;

ddt

[γmc~β] = −~∇V + ~F

The relativistic momentum is γmc~β, and the time change of the momentum is the force.

17 Eigenfunction problem

Consider finding the extrememum of an integral,I, by varying the function f(x).

I =x2∫

x1

dx [τf ′ 2 − µf 2] + a1f2 + a2f

2

The function, f , must satisfy the condition,x2∫

x1

dx σ f 2(x) = 1. This is a normalization

condition. the other functions, τ(x) and σ(x) satisfy normal differentiable conditions, andai are non-negative constants. The above can be written;

I =x2∫

x1

dx [τf ′ 2 − µf 2 + ddx

(af 2)]

The function f is changed to include the constraint by f ∗ → f + λ σf 2, where λ are theLagrange multipliers. Apply the Euler Lagrange equation to obtain;

21

Page 22: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

ddx

[τf ′ + (µ + λσ)f ] = 0

This results in a Sturm-Liouville equation in self adjoint form. Suppose we choose τ = x,µ = −n2/x, and σ = x. Make the substitution, z =

√λx and x1 = 0. The result is

Bessel’s equation with solution, Jn(z);

z2 d2fdz2 + z

dfdz

+ (z2 − n2)f = 0 0 < z < x2

√λ

18 Ritz method

Assume an eigenvalue problem and arrange the eigenvalues, λ1 < λ2 < · · · . Note that theeigenfunction, fn, is associated with eigenvalue, λn. The eigenfunction, fn, minimizes theintegral, I, subject to a normalization constraint. Suppose we expand the function, φ(x),which will be taken as a trial solution, in terms of fn.

φ =∑

cn fn

cn =x2∫

0

dx σ fnφ

Require, c1 = c2 = · · · = ck−1 = 0. The normalization requirement is;

x2∫

0

dx σf 2 =∑

cn

x2∫

0

dx σφf =∑

c2n = 1

Substitute into I without the normalization constraint.

I∗ =∑

cn

x2∫

0

dx [τφ′f ′

n − µφfn]

Integration by parts and ignoring the surface terms;

I∗ = −∑

cn

x2∫

0

dxφ[ ddx

(τf ′

n) + µfn]

Now fn satisfies the ode of the eigenvalue problem. Thus

I =∑

x2∫

0

dxφλnσfn

I =∑

c2n λn

22

Page 23: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

However, cn = 0 for n < k and λn > λk so that I is a minimum when λ = λk. Thus theminimization of I yields an eigenvalue ≥ λk

19 Example

Suppose the equation;

y′ ′ + λy = 0

the solution is y = A sin(√

λx) + B cos(√

λx). The boundary conditions are chosen to bey(0) = 1 and y(1) = 0. Thus A = 0, and

√λ = π/2. For the lowest eigenvalue;

y1 = cos(πx/2)

Then take a trial function, y = 1 − xa, as a potential solution. This function satisfies theboundary conditions. We want to choose the best value for a. The normalization conditionrequires that;

1∫

0

dx yn = 1

Put this back into the value of I and integrate.

I =

1∫

0

dx y[d

dxy′]

1∫

0

dx y2dx

The term in the denominator is the normalization integral. The result is;

I =(2a + 1)(a + 1)

2(2a − 1)

Then take ∂I∂a

= 0 which gives;

a =1 ±

1 + (4)5/42

a =

[

−0.72471.7247

]

23

Page 24: Calculus of variations - Lecture 11nsmn1.uh.edu › hunger › class › fall_2012 › lectures › lecture_11.pdfCalculus of variations - Lecture 11 1 Introduction It is easiest to

The negative value cannot satisfy the boundary condition. Thus I = 2.4747. Note that thetrue value is (π/2)2 = 2.4674

24