Section 48-04.mws

Unit 9: Calculus of Variations

Chapter 48: Variational Mechanics

Section 48.4: the spherical pendulum

Copyright

Copyright * 2001 by Addison Wesley Longman, Inc.

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America.

Initializations

> restart;

> libname:="C:/Program Files/Maple 6.01/Calcvar",libname:

> with(Calcvar):

> libname:="C:/Program Files/Maple 6.01/Partials",libname:
with(Partials):

> with(linalg):
with(plots):
with(plottools):

Warning, the protected names norm and trace have been redefined and unprotected

Warning, the name changecoords has been redefined

>

The Model

A pendulum not constrained to move in a vertical plane becomes a spherical pendulum. The pendulum bob is free to traverse the surface of a sphere centered at the pendulum's support. In fact, the spherical pendulum is the simplest pendulum to construct, since it requires only a piece of string, a bob, and a support. There is no need for a mechanism to constrain the oscillations to a single vertical plane.

If the spherical pendulum is started with motion in a single vertical plane, subsequent oscillations will remain in that plane. Hence, three-dimensional motion requires an initial velocity with a component not in the plane formed by the equilibrium position, the support, and the raised bob. As before, we will ignore friction.

Except for its moment of inertia, a small sphere such as a marble or ball-bearing rolling in a spherical bowl would be another example of the spherical pendulum.

Let us put our pendulum support at the origin, and describe the location of the bob in spherical coordinates. If the length of the pendulum is r , then the coordinates of the bob are

x(t) = r*cos(u)*sin(v)

y(t) = r*sin(u)*sin(v)

z(t) = r*cos(v)

where u in [0, 2*Pi] measures rotation counterclockwise around the z -axis, starting from the positive x -axis, and v in [0, Pi] measures the angle from the positive z -axis to the radius vector. (See Figure 22.8, and equations (22.10) in Section 22.3.)

>

The Lagrangian

The coordinates of the bob are given by

> xt := r*cos(u(t))*sin(v(t));
yt := r*sin(u(t))*sin(v(t));
zt := r*cos(v(t));

xt := r*cos(u(t))*sin(v(t))

yt := r*sin(u(t))*sin(v(t))

zt := r*cos(v(t))

>

The radius vector from the origin (where the support is located) to the bob is

> R := vector([xt,yt,zt]);

R := vector([r*cos(u(t))*sin(v(t)), r*sin(u(t))*sin...

>

The velocity vector for the bob is

> `R'` := map(diff,R,t);

`R'` := vector([-r*sin(u(t))*diff(u(t),t)*sin(v(t))...
`R'` := vector([-r*sin(u(t))*diff(u(t),t)*sin(v(t))...

>

A bob of mass m then has kinetic energy T = 1/2 m*v^2 , or

> T := collect(simplify(m/2*innerprod(`R'`,`R'`)),[m,r]);

T := (1/2*diff(u(t),t)^2-1/2*diff(u(t),t)^2*cos(v(t...

>

Ordinary motions of the spherical pendulum find the bob below the xy -plane where phi < Pi/2 and cos(phi) < 0 . Hence, for such motions, z(t) = r*cos(phi) `` < 0 , so taking the potential energy as

> V := m*g*zt;

V := m*g*r*cos(v(t))

>

means the lowest potential is when the bob is at equilibrium, that is, when the bob is straight down. Raising the bob increases the potential energy since the potential goes to zero when the bob is lifted to the xy -plane. Because of the simplicity of the expression for the potential, we accept this definition, and write the Lagrangian as

> L := T-V;

L := (1/2*diff(u(t),t)^2-1/2*diff(u(t),t)^2*cos(v(t...

>

The Equations of Motion

Using Maple's Euler_Lagrange command, we obtain

> q := Euler_Lagrange(L,t,[u(t),v(t)]);

q := {diff(u(t),t)^2*cos(v(t))*sin(v(t))*r^2*m+m*g*...
q := {diff(u(t),t)^2*cos(v(t))*sin(v(t))*r^2*m+m*g*...
q := {diff(u(t),t)^2*cos(v(t))*sin(v(t))*r^2*m+m*g*...

>

We have obtained both equations of motion, namely

L[u]-d/dt L[`u'`] = 0

and

L[v]-d/dt L[`v'`] = 0

In addition, we have two first integrals. One will be the constancy of the total energy, and one is the integrated form of the first Euler-Lagrange equation. If we remove both first integrals, we are left with the two equations

> q1 := remove(has,q,[K[1],K[2]]);

q1 := {diff(u(t),t)^2*cos(v(t))*sin(v(t))*r^2*m+m*g...
q1 := {diff(u(t),t)^2*cos(v(t))*sin(v(t))*r^2*m+m*g...

>

The absence and presence of g , the gravitational constant, distinguishes one equation from the other, so we single out the two equations by

> Q2 := op(select(has,q1,g)) = 0;
Q1 := op(remove(has,q1,g)) = 0;

Q2 := diff(u(t),t)^2*cos(v(t))*sin(v(t))*r^2*m+m*g*...

Q1 := -(diff(u(t),`$`(t,2))-diff(u(t),`$`(t,2))*cos...

>

To see which equation is the u equation, and which is the v equation, we construct the Euler-Lagrange equations from first principles using the pdiff command. For example, the term L[u] in the u equation is

> pdiff(L,u);

(diff(u(t),t)*diff(u(t),t,u)-diff(u(t),t)*cos(v(t))...

>

because L coes not explicitly contain the variable u . Consequently, the u equation is just d/dt L[`u'`] = 0 , and the expanded form of this equation is

> pdiff(L,u(t)) - diff(pdiff(L,diff(u(t),t)),t) = 0;

-(diff(u(t),`$`(t,2))-diff(u(t),`$`(t,2))*cos(v(t))...

>

Hence, the equation without g is the u equation, and that is the equation which has the first integral L[`u'`] = c .

The v equation is then

> pdiff(L,v(t)) - diff(pdiff(L,diff(v(t),t)),t) = 0;

diff(u(t),t)^2*cos(v(t))*sin(v(t))*r^2*m+m*g*r*sin(...

>

and it contains the constant g .

Maple's version of the first integral L[`u'`] = c is

> pdiff(L,diff(u(t),t)) = c;

(diff(u(t),t)-diff(u(t),t)*cos(v(t))^2)*r^2*m = c

>

which is not the simplest form possible. Maple is programmed to prefer 1-cos^2*``(x) to the simpler sin^2*``(x) , and any effort to coerce the latter form is generally wasted because, at the first opportunity, Maple will revert to the former. However, although writing

`u'`*sin^2*``(v) = c/m/(r^2)

would lead to the elimination of u in the v equation, and hence to a quadrature in terms of elliptic functions, we take the more pragmatic approach of generating a numeric solution.

>

Example 48.7

Let us take a time-scale for which g = 1 , and set both r = 1 and m = 1 . The Euler-Lagrange equations become

> Q3 := subs(r=1,m=1,g=1,Q1);
Q4 := subs(r=1,m=1,g=1,Q2);

Q3 := -diff(u(t),`$`(t,2))+diff(u(t),`$`(t,2))*cos(...

Q4 := diff(u(t),t)^2*cos(v(t))*sin(v(t))+sin(v(t))-...

>

We can obtain a numeric solution via the syntax

> QQ := dsolve({Q3,Q4, u(0)=0,v(0)=3*Pi/4, D(u)(0)=1/2,D(v)(0)=0}, {u(t),v(t)},numeric);

QQ := proc (rkf45_x) local i, rkf45_s, outpoint, r1...

>

We chose initial conditions corresponding to the bob being raised through an angle of Pi/4 in the xz -plane, then being given an initial velocity in the u -direction.

Maple has merely written a procedure, which, when invoked, generates the desired numeric solution. To extract this numeric solution, we write the following functions which give the values for u and v .

> U := s -> subs(QQ(s),u(t));
V := s -> subs(QQ(s),v(t));

U := proc (s) options operator, arrow; subs(QQ(s),u...

V := proc (s) options operator, arrow; subs(QQ(s),v...

>

Figure 48.11 contains graphs of u(t) in black and v(t) in cyan. It indicates that the angle u = theta is an increasing function of time, t . Thus, the bob tends to rotate in a counterclockwise direction. The height of the bob is governed by the angle v = phi , and this angle remains bounded away from zero. Hence, the bob does not descend to equilibrium, but rather, oscillates between maximum and minimum heights.

> plot([U,V],0..15,color=[black,cyan],labels=[t,``], xtickmarks=7, ytickmarks=8, labelfont=[TIMES,ITALIC,12]);

[Maple Plot]

>

Figure 48.12, another way of observing the motion, is a parametric plot of v(t) against u(t) . It shows that u(t) , represented by the horizontal axis, is increasing, whereas v(t) , represented by the vertical axis, undergoes a bounded oscillation with a nonzero lower bound.

> plot([U,V,0..15],color=black, labels=[u,`v `], view=[0..15,0..3], xtickmarks=7, ytickmarks=3, labelfont=[TIMES,ITALIC,12], scaling=constrained);

[Maple Plot]

>

The actual motion of the bob takes place in three dimensions. Hence, Figures 48.13 and 48.14 show the motion as a space curve. In Figure 48.13, the space curve is viewed from directly above, so the curve seen is the physical trajectory's projection onto the xy -plane. The initial point of the trajectory is near the center of the right edge of the graph, at (x, y) = (1/sqrt(2), 0) . The figure reveals a looping motion, with the long asis of the loops precessing counterclockwise about the z -axis.

> spacecurve([cos('U'(t))*sin('V'(t)),sin('U'(t))*sin('V'(t)),cos('V'(t))],t=0..50, color=black, axes=boxed, numpoints=200, orientation=[-90,0], labels=[x,y,z],labelfont=[TIMES,ITALIC,12],tickmarks=[7,7,0]);

[Maple Plot]

>

The single quote marks in the spacecurve command are required because U and V represent procedures.

Figure 48.14 shows the trajectory of the bob in space.

> spacecurve([cos('U'(t))*sin('V'(t)),sin('U'(t))*sin('V'(t)),cos('V'(t))],t=0..30, color=black, axes=boxed, numpoints=200, scaling=constrained, labels=[`x `,` y`,`z `], labelfont=[TIMES,ITALIC,12], tickmarks=[7,7,[-1,-.7]], view=[-.71..0.71,-.71..0.71,-1..-.6], orientation=[-45,45]);

[Maple Plot]

>