• Aucun résultat trouvé

Abstraction of Path Functions

Lagrangian Mechanics

1.9 Abstraction of Path Functions

An essential step in the derivation of the local-tuple transforma-tion functransforma-tion C from the coordinate transformation F was the deduction of the relationship between the velocities in the two coordinate systems. We did this by inserting coordinate paths into the coordinate transformation functionF, differentiating, and then generalizing the results on the path to arbitrary velocities at a moment. The last step is an example of a more general problem of abstracting a local-tuple function from a path function. Given a functionf of a local tuple a corresponding path-dependent func-tion ¯f[q] is ¯f[q] = f Γ[q]. Given ¯f, how can we reconstitute f? The local-tuple functionf depends on only a finite number of components of the local tuple, and ¯f only depends on the corre-sponding local components of the path. So ¯f has the same value for all paths that have that number of components of the local tuple in common. Given ¯f we can reconstitute f by taking the argument of f, which is a finite initial segment of a local tuple, constructing a path that has this local description, and finding the value of ¯f for this path.

Two paths that have the same local description up to the nth derivative are said toosculate with order ncontact. For example, a path and the truncated power series representation of the path up to order n have order n contact; if fewer than n derivatives are needed by a local-tuple function, the path and the truncated power series representation are equivalent. Let O be a function

that generates an osculating path with the given local tuple com-ponents. So O(t, q, v, . . .)(t) =q, D(O(t, q, v, . . .))(t) =v, and in general

(t, q, v, . . .) = Γ[O(t, q, v, . . .)](t). (1.163) The number of components of the local tuple that are required is finite, but unspecified. One way of constructingO is through the truncated power series

O(t, q, v, a, . . .)(t0) =q+v(t0−t) +12a(t0−t)2+· · ·, (1.164) where the number of terms is the same as the number of compo-nents of the local tuple that are specified.

Given the path function ¯f we reconstitute the f function as follows. We take the argument of f and construct an osculating path with this local description. Then the value off is the value of ¯f for this osculating path:

f(t, q, v, . . .) =f◦Γ[O(t, q, v, . . .)](t) = ¯f[O(t, q, v, . . .)](t).(1.165) Let ¯Γ be the function that takes a path function and returns the corresponding local-tuple function:

f = ¯Γ( ¯f). (1.166)

From equation (1.165) we see that

Γ( ¯¯ f)(t, q, v, . . .) = ¯f[O(t, q, v, . . .)](t). (1.167) The procedure Gamma-bar implements the function ¯Γ that re-constitutes a path-dependent function into a local-tuple function:

(define ((Gamma-bar f-bar) local)

((f-bar (osculating-path local)) (time local)))

The procedureosculating-path takes a number of local compo-nents and returns a path with these compocompo-nents; it is implemented as a power series.

We can use Gamma-bar to construct the procedure F->C that takes a coordinate transformation F and generates the procedure that transforms local tuples. The procedure F->C constructs a path-dependent procedure f-bar that takes a coordinate path in the primed system and returns the local tuple of the corresponding

path in the unprimed coordinate system. It then usesGamma-bar to abstract f-bar to arbitrary local tuples in the primed coordi-nate system.

(->local ’t (up ’r ’theta) (up ’rdot ’thetadot))))

Notice that in this definition ofF->Cwe do not explicitly calculate any derivatives. The calculation that led up to the state transfor-mation (1.74) is not needed.

We can also use ¯Γ to make an elegant formula for computing the total time derivative DtF of the function F:

DtF = ¯Γ( ¯G), with G[q] =¯ D(F◦Γ[q]). (1.168) The implementation of the total time derivative as a program follows this definition. Given a procedureF implementing a local-tuple function and a path q we can construct a new procedure (compose F (Gamma q)). The procedure G-bar implements the derivative of this function of time. We then abstract this off the path withGamma-bar to give the total time derivative.

(define (Dt F) (define (G-bar q)

(D (compose F (Gamma q)))) (Gamma-bar G-bar))

Exercise 1.31: Velocity transformation

Use the procedureGamma-bar to construct a procedure that transforms velocities given a coordinate transformation. Apply this procedure to the procedurep->r to deduce (again) equation (1.65).

Exercise 1.32: Path functions and state functions

The local-tuple functionf is the same as the local-tuple function ¯Γ( ¯f) where ¯f[q] =fΓ[q]. On the other hand, the path function ¯f[q], and the path function ¯Γ( ¯f)Γ[q], are not necessarily the same. Explain. Give examples where they are the same and where they are not the same.

Write programs to illustrate the behavior.

Lagrange equations at a moment

Given a Lagrangian, the Lagrange equations test paths for whether they are realizable paths of the system. The Lagrange equations relate the path and its derivatives. The fact that the Lagrange equations must be satisfied at each moment suggests that we can abstract the Lagrange equations off the path and write them as relations among the local-tuple components of realizable paths.

Let ¯E[L] be the path-dependent function that produces the residuals of the Lagrange equations (1.18) for the LagrangianL:

E¯[L][q] =D(∂2L◦Γ[q])−∂1L◦Γ[q]. (1.169) Realizable pathsq satisfy the Lagrange equations

E¯[L][q] = 0. (1.170)

The path-dependent Lagrange equations can be converted to local Lagrange equations using ¯Γ

E[L] = ¯Γ(¯E[L]). (1.171)

The operatorEis called theEuler-Lagrange operator. In terms of this operator the Lagrange equations are

E[L]Γ[q] = 0. (1.172)

Applying the definition (1.167) of ¯Γ E[L](t, q, v, . . .) = ¯Γ(¯E[L])(t, q, v, . . .)

=D(∂2L◦Γ[O(t, q, v, . . .)])

−∂1L◦Γ[O(t, q, v, . . .)]

= (Dt(∂2L))(t, q, v, . . .)−∂1L(t, q, v, . . .)

= (Dt2L−∂1L)(t, q, v, . . .). (1.173) So the Euler-Lagrange operator is explicitly

E[L] =Dt2L−∂1L. (1.174)

The procedure Euler-Lagrange-operator implementsE (define (Euler-Lagrange-operator L)

(- (Dt ((partial 2) L)) ((partial 1) L))) .

For example, applied to the Lagrangian for the harmonic oscil-lator,

(print-expression

((Euler-Lagrange-operator (L-harmonic ’m ’k)) (->local ’t ’x ’v ’a))) (+ (* a m) (* k x))

Notice that the components of the local tuple are individually specified. Using equation (1.172), the Lagrange equations for the harmonic oscillator are:88

(print-expression ((compose

(Euler-Lagrange-operator (L-harmonic ’m ’k)) (Gamma (literal-function ’x) 4))

’t))

(+ (* k (x t)) (* m (((expt D 2) x) t)))

Exercise 1.33: Properties of E

LetF and Gbe two Lagrangian-like functions of a local tuple, C be a local-tuple transformation function, andca constant. Demonstrate the following properties:

a. E[F+G] =E[F] +E[G]

b. E[cF] =cE[F]

c. E[F G] =E[F]G+FE[G] + (DtF)∂2G+2F(DtG) d. E[FC] =Dt(DF C)∂2C+DF CE[C]

88Notice thatGammahas one more argument than it usually has. This argument gives the length of the initial segment of the local tuple needed. The default length is 3, giving components of the local tuple up to and including the velocities.