# Finding a generating function (analyticl mechanics)

1. May 16, 2008

### maria clara

Hi,

I don't understand, in general, how am I supposed to find an appropriate generating function to a given canonical transformation. It seems to me like a lot of guesswork. Can anyone give me some guidelines?

thanks.

2. May 16, 2008

### jdstokes

Hamilton's equations are invariant under canonical transformations, which follows from the invariance of the Euler-Lagrange equations under Gauge and point transformations.

ie

$L (q_i,\dot{q}_i,t) - \mathcal{L} (Q_i,\dot{Q}_i,t) = \frac{dF_1}{dt}$

where F_1 is an arbitrary function of time and generalized coordinates.

Using the Legendre transformation to replace the Lagrangians by corresponding Hamiltonians we obtain

$p_i dq_i - P_i dQ_i + (H + \mathcal{H})dt = dF_1$

from which the equations for the canonical transformation can be derived:

$p_i = \frac{\partial F_1}{\partial q_i}$
$Q_i = -\frac{\partial F_1}{\partial P_i}$
$\mathcal{H} = H + \frac{\patial F_1}{\partial t}$.

There are three other generating functions you can obtain by applying a Legendre transformation on F_1 wrt the new coordinates. Note that conjugate variables always appear in the same equation. The choice depends on convenience to the problem.

You now have everything you need in principle to determine the generating function. If for example you are given a transformation $q = q(Q,P), \; p = p(Q,P)$ which is independent of time, then you can try a type one generating function and replace dq by its expansion in terms of dP and dQ. The condition that dF be an exact differential will give you a pair of PDEs to be solved. Once you have F expressed in terms of Q and P, replace these by their expressions in terms of q and p to get the generating function F_1.