Tutorial Exercises: Lagrangian Dynamics

Tutorial Exercises: Lagrangian Dynamics 1. ... Solve them using the techniques you already know for this class of problems. 1. ... then trial solution...

5 downloads 537 Views 233KB Size
Tutorial Exercises: Lagrangian Dynamics 1. Practise at solving differential equations Write down the Euler-Lagrange equations associated with the following Lagrangian L(t, x, y, x, ˙ y): ˙ (a) x˙ 2 + y˙ 2 − k 2 (x + y)2 (b) x˙ 2 + y˙ 2 − k 2 (x − y)2 (c) x˙ 2 + y˙ 2 + k 2 (x + y)2 (d) x˙ 2 − y˙ 2 + k 2 (x + y)2 In each case you should get a pair of coupled second order linear differential equation with constant coefficients. Solve them using the techniques you already know for this class of problems. 1. Solution: (a) Since there are two dependent variables x(t) and y(t) there are two Euler-Lagrange equations:   d ∂F d ∂F − = 0 giving − 2k 2 (x + y) − (2x0 ) = 0 0 ∂x dt ∂x dt   ∂F d ∂F d − = 0 giving − 2k 2 (x + y) − (2y 0 ) = 0 . 0 ∂y dt ∂y dt Re-writing, we obtain two linear coupled second-order differential equations: x00 + k 2 (x + y) = 0 y 00 + k 2 (x + y) = 0 . The general approach to solving 2nd order linear constant coefficient systems of ODEs uses an exponential ansatz: To solve ¨r + U r˙ + V r = 0 where r ∈ Rn and U and V are n × n matrices, set r = veλt . The resulting equation (λ2 + λU + V )v = 0 is solved like an eigenvalue/eigenvector equation. A solution of the form veλt is called a normal mode and the general solution is a sum of normal modes. When multiple eigenvalues are present there may not be enough independent eigenvectors; then trial solutions need to be multiplied by (powers of) t and added together, see in particular the last example. Specifically in the present case set x = Aemt , y = Bemt . Substituting into the system of ODEs gives m2 Aemt + k 2 (A + B)emt = 0 m2 Bemt + k 2 (A + B)emt = 0 . Cancelling the factor emt (which cannot vanish) we obtain two simultaneous linear equations for the unknown coefficients A and B, (m2 + k 2 )A + k 2 B = 0 k 2 A + (m2 + k 2 )B = 0 . These are homogeneous equations so there is always the trivial solution A = B = 0 which is of no interest. This system of equations is a generalisation of the eigenvalue/eigenvector equation where m is the eigenvalue and the vector with components A and B is the eigenvector. Nontrivial solutions exist only when the equations are linearly dependent, i.e. when the determinant of their coefficients vanishes. This requires 2 2 m + k 2 k = (m2 + k 2 )2 − k 4 = 0 . 2 2 k2 m +k 8

This characteristic equation determines the possible values of m. They are the roots of m4 + 2k 2 m2 = m2 (m2 + 2k 2 ) = 0 . √ These are m = 0 (twice) and m = ±i 2k. The solutions for x and y are superposition 0t 0t of all the possible solutions. √ are e =√1 and te = t (since m = 0 is a √ For m = 0 they are sin √2kt and cos 2kt (preferable to the equivalent double root; for m = ±i 2k they √ 2kt i and e−i 2kt . Therefore but explicitly complex forms e √ √ x = A1 + A2 t + A3 cos 2kt + A4 sin 2kt . The solutions for y are not independent because of the relationship between the A and B coefficients; they have to be components of an eigenvector. When m2 = 0 we have (0 + k 2 )A + k 2 B = 0 (or k 2 A + (02 + k 2 )B = 0), i.e. A = −B. Hence B1 = −A1 and B2 = −A2 . When m2 = −2k 2 we have (−2k 2 + k 2 )A + k 2 B = 0, i.e. A = B. Hence B3 = A3 and B4 = A4 . Thus the solution for y(t) is √ √ y = −A1 − A2 t + A3 cos 2kt + A4 sin 2kt . You can also obtain y by direct substitution into the original ODEs. There are four unknown coefficients in all, so that this is the general solution of the system of 2 equations of 2nd order. A short-cut is to add and subtract the equations so that they decouple (in a,b,c), then solve both pairs of equations, and then add/subtract the solutions to get the original variables, see the tute sheet after next for a systematic approach to this using coordinate transformations. (b) Working as before, we get the coupled equations x00 + k 2 (x − y) = 0 y 00 − k 2 (x − y) = 0 , and the same trial functions require us to solve (m2 + k 2 )A − k 2 B = 0 −k 2 A + (m2 + k 2 ) = 0 . Nontrivial solutions exist only when 2 2 m + k 2 −k = (m2 + k 2 )2 − k 4 = 0 . −k 2 m2 + k 2 The roots are the same as before, so the possible solutions are the same. Hence, we find again √ √ x = A1 + A2 t + A3 cos 2kt + A4 sin 2kt . All that has changed is the relationship between the coefficients A and B, so the solution for y(t) must be modified. Now when m2 = 0, we have (02 + k 2 )A − k 2 B = 0, i.e. A = B. Hence B1 = A1 and B2 = A2 . When m2 = −2k 2 , we have (−2k 2 + k 2 )A − k 2 B = 0, i.e. A = −B. Hence B3 = −A3 and B4 = −A4 . Thus the solution for y must be √ √ y = A1 + A2 t − A3 cos 2kt − A4 sin 2kt .

9

(c) In the third case, we get the coupled equations x00 − k 2 (x + y) = 0 y 00 − k 2 (x + y) = 0 , and the same trial functions require us to solve (m2 − k 2 )A − k 2 B = 0 −k 2 A + (m2 − k 2 ) = 0 . Nontrivial solutions exist only when 2 2 m − k 2 −k = (m2 − k 2 )2 − k 4 = 0 . −k 2 m2 − k 2 The roots are now m2 = 0 and√m2 = 2k 2 . The first pair gives the same solutions as before whilst the second pair give e± 2kt . Hence, the general solution is √

x = A1 + A2 t + A3 e

2kt

+ A4 e−



2kt

.

The relationship between A and B is now k 2 B = (m2 − k 2 )A. Now when m2 = 0, we have k 2 B = −k 2 A, i.e. B = −A. Hence B1 = −A1 and B2 = −A2 . When m2 = 2k 2 , we have k 2 B = k 2 A, i.e. A = B. Hence B3 = A3 and B4 = A4 . Thus the solution for y must be √

y = −A1 − A2 t + A3 e

2kt

+ A4 e−



2kt

.

(d) In the final case we obtain x00 − k 2 (x + y) = 0 y 00 + k 2 (x + y) = 0 , and the same trial functions require us to solve (m2 − k 2 )A − k 2 B = 0 +k 2 A + (m2 + k 2 ) = 0 . Nontrivial solutions exist only when 2 m − k 2 −k 2 = (m2 − k 2 )(m2 + k 2 ) − k 4 = m4 = 0 . k2 m2 + k 2 The roots are now m = 0 (four times). The four times repeated root produces the four independent solutions e0t , te0t , t2 e0t and t3 e0t . Hence the general solution for x(t) is x = A1 + A2 t + A3 t2 + A4 t3 . To find y(t) use the original equations differential equation in the form y = −x + x00 /k 2 to find     2A3 6A4 y = −A1 + 2 + −A2 + 2 t − A3 t2 − A4 t3 . k k

10

2. A spring hanging vertically under gravity Consider a mass m on the end of a spring of natural length ` and spring constant k. Let y be the vertical coordinate of the mass as measured from the top of the spring. Assume the mass can only move up and down in the vertical direction. Show that 1 1 L = my˙ 2 − k(y − `)2 + mgy. 2 2 Determine and solve the corresponding Euler-Lagrange equations of motion. 2. Solution: The kinetic energy is T = 12 mv 2 = 12 my˙ 2 . The potential energy is composed of two parts: the gravitational part is −mgy (the minus sign is included because the coordinate y is measured downwards, the elastic spring part is 21 k(y − `)2 . Together this gives V = 12 k(y − `)2 − mgy. Thus the Lagrangian is L = T − V = 12 my˙ 2 − 12 k(y − `)2 + mgy. The Euler-Lagrange equations are ∂L d ∂L ( )− = m¨ y + k(y − `) − mg = 0. dt ∂ y˙ ∂y This is a inhomogeneous linear constant coefficients second order DE y¨ + The general solution is y =`+

k k y = g + `. m m

mg + A sin ωt + B cos ωt k

where ω 2 = k/m and the arbitrary constants A and B would be determined from initial conditions. Note that the frequency ω is the same with and without gravity. 3. A pendulum made from a spring Consider the same spring as in the previous question but now allow the mass to also swing from side to side. This time use polar coordinates (r, φ) centred on the top of the spring. Let φ be the angle as measured from the downward vertical. (a) Show that the Lagrangian is equivalent to 1 1 L = m(r˙ 2 + r2 φ˙ 2 ) − k(r − `)2 + mgr cos φ. 2 2 (b) Write down the corresponding Lagrange equations of motion. (c) Determine the equilibria: configurations where all time derivatives vanish. (d) For each equilibrium approximate the Lagrange equations near the equilibrium to first order and then solve the resulting linear ODEs. (e) Which equilibrium is stable, which is unstable? (f) What are the frequencies of motion near the stable equilibrium?

11

3. Solution: (a) The kinetic energy can be derived from first principles or we can use the result for polar coordinates from the lectures 1 T = m(r˙ 2 + r2 φ˙ 2 ). 2 There are two contributions to the potential energy. The gravitational component is mgh where h is some height. If the pendulum is at angle φ this height is −r cos φ, the negative sign arises because φ is measured from a downwards vertical. The elastic component is 1 2 2 k(r − `) . Thus 1 V = k(r − `)2 − mgr cos φ. 2 Thus the Lagrangian is as given. (b) Note that neither coordinate is ignorable. The equation in r is m¨ r − mrφ˙ 2 + k(r − `) − mg cos φ = 0. The equation in φ is d ˙ + mgr sin φ = 2mrr˙ φ˙ + mr2 φ¨ + mgr sin φ = 0 [mr2 φ] dt (c) There are two ways to find equilibria. The first is to set all time derivatives to zero. The second method (which works if the Lagrangian is of the standard form L = T + U with T quadratic in velocities and U independent of velocities) is to set all partial derivatives of the potential energy to zero. Both methods give exactly the same equations k(r − `) − mg cos φ = 0 and mgr sin φ = 0. There are two equilibria: one corresponds to the spring hanging down with φ = 0 and r = ` + mg/k; the other corresponds to the spring standing upwards with φ = π and r = ` − mg/k. (d) The tidiest way to make an approximation near an equilibrium point is to introduce new variables which are small. Thus we can write φ = φeq + Φ and r = req + R where Φ and R are considered to be small, and the equilibrium values are given by the previous part. Substituting into the original DEs gives ¨ − m(req + R)Φ ˙ 2 + k(req + R − `) − mg cos(φeq + Φ) = 0. mR and ˙ + m(req + R)2 Φ ¨ + mg(req + R) sin(φeq + Φ) = 0. 2m(req + R)R˙ Φ We can expand out the two trig functions and use the result that sin φeq = 0 for both equilibria to get ¨ − m(req + R)Φ ˙ 2 + k(req + R − `) − mg cos(φeq ) cos(Φ) = 0 mR and ˙ + m(req + R)2 Φ ¨ + mg(req + R) cos(φeq ) sin(Φ) = 0. 2m(req + R)R˙ Φ We now expand everything out and classify each term depending on its size. For small Φ we can also replace sin Φ ∼ Φ and cos Φ ∼ 1. 12

The terms which contain no small quantities give k(req − `) − mg cos(φeq ) = 0 and 0=0 which should be consistent with the conditions for equilibrium already found (otherwise you know you have made an algebraic mistake.) The terms which contain a single small quantity (first order terms) are ¨ + kR = 0. mR and 2 ¨ mreq Φ + mgreq cos(φeq )Φ = 0.

We could go on and write down equations for second order terms etc. but we start with the linear terms first. Especially since only linear ODEs are easily solvable in general. Notice that the equations are uncoupled (which does not always happen when you linearise). The solution to the equation in R is R = A sin ωt + B cos ωt. where ω =

p

k/m. Thus the solution for r is r = req + A sin ωt + B cos ωt.

Since ω is always real these functions are always oscillatory. The solution for Φ is qualitatively different for different signs of cos(φeq ) = ±1. The equation is ¨ ± Ω2 Φ = 0 Φ p where Ω = g/req is a real constant. For φeq = 0 the solution is Φ = C sin Ωt + D cos Ωt while for φeq = π the solution is ˜ Ωt + De ˜ −Ωt . Φ = C sinh Ωt + D cosh Ωt = Ce In both cases φ = φeq + Φ. (e) When the coefficient ±Ω2 in the ODE is positive the solution is oscillatory, and hence the equilibrium φ = 0 is (marginally) stable. When it is negative the general solution has exponentially growing terms, and hence the equilibrium φ = π is unstable. (f) p Near stable equilibrium the angular (side-to-side) part of the motion has frequency Ω = g/req just p like a classical pendulum. The radial (up-down) part of the motion has frequency ω = k/m just like a classical spring. 4. The electromagnetic force Re-derive the equations of motion for a particle of charge e in an electromagnetic field using cartesian coordinates. Start with the Lagrangian 1 L = m(x˙ 2 + y˙ 2 + z˙ 2 ) − eV + e(xA ˙ x + yA ˙ y + zA ˙ z) 2 where V , Ax , Ay and Az are all assumed to depend on x, y, z and t. 13

4. Solution: The equation in x is d ∂ (mx˙ + eAx ) + e [V − (xA ˙ x + yA ˙ y + zA ˙ z )] = 0 dt ∂x OR

d ∂ (Ax ) + e [V − (xA ˙ x + yA ˙ y + zA ˙ z )] = 0. dt ∂x The total derivative needs to be expanded using the chain rule m¨ x+e

∂ ∂ ∂ ∂ d (Ax ) = (Ax ) + x˙ (Ax ) + y˙ (Ax ) + z˙ (Ax ) dt ∂t ∂x ∂y ∂z If you check carefully you will see that the term with x˙ cancels. The other terms give m¨ x+e

∂ ∂ ∂ ∂ ∂ ∂ (Ax ) + e V + ey[ ˙ (Ax ) − (Ay )] + ez[ ˙ (Ax ) − (Az )] = 0. ∂t ∂x ∂y ∂x ∂z ∂x

Now Bz =

∂ ∂ (Ay ) − (Ax ) ∂x ∂y

By =

∂ ∂ (Ax ) − (Az ) ∂z ∂x

and

Thus the DE becomes m¨ x+e

∂ ∂ (Ax ) + e V − eyB ˙ z + ezB ˙ y = 0. ∂t ∂x

Also Ex = −

∂ ∂ V − (Ax ) ∂x ∂t

Thus, m¨ x − eEx − e[yB ˙ z − zB ˙ y] = 0 or m¨ x = e[Ex + yB ˙ z − zB ˙ y] The DE for y and z are analogous and together reproduce the vector equation derived in lectures. 5. A double spring system Three massless perfectly elastic springs AB, BC and CD are attached in a horizontal line as shown in the diagram. The ends at A and D are fixed. The objects of mass m are located where the springs join at B and C. The two outer springs AB and CD have natural lengths a and stiffness k, while BC has natural length a0 and stiffness k 0 . The distance ` between the fixed end points AD is greater than the total natural lengths of the springs: ` > 2a + a0 . B

C

A

D m

m x1 x2 ℓ

(a) Using x1 and x2 , as shown in the diagram for the coordinates of the two masses, construct the Lagrangian. 14

(b) Determine the Lagrange equations of motion. (c) Set x ¨1 and x ¨2 to zero to determine the equilibrium positions of the masses (i.e. positions where the system stays fixed). Does the equilibrium have any nice properties? (d) Solve the Euler-Lagrange equations. (e) The solutions are quasi-periodic. What are the two different frequencies that occur? 5. Solution: (a) The kinetic energy is given by the motion of the two masses 1 1 T = mx˙1 2 + mx˙2 2 2 2 The potential energy is given by the lengths of the 3 springs 1 1 1 V = k(x1 − a)2 + k 0 (x2 − x1 − a0 )2 + k(` − x2 − a)2 2 2 2 Thus, 1 1 L(t, x1 , x2 , x˙ 1 , x˙ 2 ) = mx˙1 2 + mx˙2 2 − 2 2



1 1 1 k(x1 − a)2 + k 0 (x2 − x1 − a0 )2 + k(` − x2 )2 2 2 2



(b) The Lagrange equations are m¨ x1 + k(x1 − a) − k 0 (x2 − x1 − a0 ) = 0 and m¨ x2 + k 0 (x2 − x1 − a0 ) − k(` − x2 − a) = 0 (c) The equilibrium position is found by either setting both ∂V /∂x1 = 0 and ∂V /∂x2 = 0 or setting all time derivatives to zero. Either method gives k(x1 − a) − k 0 (x2 − x1 − a0 ) = 0 and k 0 (x2 − x1 − a0 ) − k(` − x2 − a) = 0 These are two equations for two unknowns. Adding the two equations gives k(x1 − a) − k(` − x2 − a) = 0 which is the same as x1 = ` − x2 . This can be interpreted as the two outer springs having the same length in equilibrium. Thus, the equilibrium is symmetric about the midpoint of the system. In equilibrium let x1 = b and x2 = ` − b where k(b − a) − k 0 (` − 2b − a0 ) = 0 thus b=

ka + k 0 (` − a0 ) . k + 2k 0

15

(d) The Lagrange equations are a system of linear second-order differential equations with constant coefficients. The general solution is the sum of the solution to the homgeneous equation plus a particular solution. The inhomogeneity is simply a constant, which implies that the equilibrium solution is a particular solution. To find the solution of the homogeneous system make the ansatz x = veλt , where x = (x1 , x2 )t and v = (A, B)t . A solution of this form is called a normal mode. Let x1 = Aeλt and x2 = Beλt then mλ2 A + kA − k 0 (B − A) = 0 and mλ2 B + k 0 (B − A) + kB = 0 The determinant is (mλ2 + k + k 0 )2 − k 02 = 0 with roots given by mλ2 = −k or mλ2 = −(2k 0 + k). Thus both solutions are oscillatory with frequencies r r k (2k 0 + k) ω1 = , ω2 = . m m (e) We may also note that the relationship between the amplitudes A and B differs for each normal frequency. Returning to first of the equations in A and B gives (−mω 2 + k + k 0 )A = k 0 B We see that when ω 2 = k/m, we have A = B. The two masses move together, in phase. Thus the central spring does not change in length and it does not affect the oscillation so that the frequency is independent of k 0 . On the other hand when ω 2 = (k + k 0 )/m, we have A = −B. The two masses then move in opposite directions, exactly out of phase. The general solution is a superposition of these two normal modes x1 (t) = b + A1 cos(ω1 t) + A2 sin(ω1 t) + A3 cos(ω2 t) + A4 sin(ω2 t) and x2 (t) = ` − b + A1 cos(ω1 t) + A2 sin(ω1 t) − A3 cos(ω2 t) − A4 sin(ω2 t) 6. Forces in spherical polar coordinates Repeat the analysis for cylindrical coordinates in spherical coordinates using the Lagrangian ˙ φ) ˙ = 1 m(r˙ 2 + r2 θ˙2 + r2 sin2 θφ˙ 2 ) − V (r, θ, φ). L(t, r, θ, φ, r, ˙ θ, 2 6. Solution: (a) The EL equations are ∂V m¨ r − mrθ˙2 − mr sin2 θφ˙ 2 = − ∂r ∂V mr2 θ¨ + 2mrr˙ θ˙ − mr2 sin θ cos θφ˙ 2 = − ∂θ ∂V mr2 sin2 θφ¨ + 2mrr˙ sin2 θφ˙ + 2mr2 sin θ cos θθ˙φ˙ = − ∂φ (b) Some terms correspond to those discussed in the cylindrical case with ρ = r sin θ. The moment of inertia about the z-axis is now mr2 sin2 θ. Again the point of this question is to see how difficult the Newtonian interpretation of each term is.

16