# Homework Help: Finding a generating function for a canonical transformation

1. Mar 3, 2012

### fluidistic

1. The problem statement, all variables and given/known data
I'm trying to find a generating function for the canonical transformation $Q=\left ( \frac{\sin p}{q} \right )$, $P=q \cot p$.

2. Relevant equations
I am not really sure. I know there are 4 different types of generating function. I guess it's totally up to me to choose the type of the generating function I want, since it's not specified in the problem statement?
So let's say I want a type 1. Thus F_1 depends on q and Q.
$\frac{\partial F_1}{\partial q}=p$
$\frac{\partial F_1}{\partial Q}=-P$.

3. The attempt at a solution
From the relevant equations, $\partial F_1=-P \partial Q$ and $\partial F_1=p \partial q$.
I don't really know why, but apparently $dF_1=pdq-PdQ$. It looks like $dF_1=2 \partial F_1$ for some reason unknown to me.
Now I think the main idea to get $F_1$ is to express $dF_1$ as a single differential and then integrate.
I have that $p= \cot ^{-1} \left ( \frac{P}{q} \right )$ and $dQ=\frac{1}{\sin p } \left [ \frac{\cos p}{q}dp-\frac{\sin p}{q^2}dq \right ]$.
This gives me $dF_1=(p+ \cot p)dq-q\cot ^2 p dp$. In a book I found that this is equal to $d[q(p+\cot p)]$ (how?!!!), therefore $F_1=q \cot ^{-1} \left ( \frac{P}{q} \right )+P$. But it seems that F depends on P and q instead of on q and Q. So I "found" a type 2 generating function instead of type 1... I think I know why, I found p instead of q. Anyway my problems remains.
1)Why is $dF=pdq-PdQ$?
2)Why and how do you figure out that $(p+ \cot p)dq-q\cot ^2 p dp=d[q(p+\cot p)]$?
I'd be very grateful if someone could answer these 2 questions.
Thanks!

Edit: I just answered the "why" of my question 2. I just don't know how do one figures this out.

Edit 2: I do not know why I found out a type 2, namely F(P,q) while I was looking for F(q,Q).

Last edited: Mar 3, 2012