# Find generating function $F_1$ for canonical trasformation

I'd like to know the steps to follow to find the generating function $F_1(q,Q)$ given a canonical transformation.

For example, considering the transformation

$$q=Q^{1/2}e^{-P}$$ $$p=Q^{1/2}e^P$$

I have thought to find p and P: $$p=\frac{Q}{q}$$ $$P=\frac{1}{2}\ln Q-\ln q$$
And so

$$\tag{1}\frac{\partial F_1}{q}=\frac{Q}{q}$$
$$\tag{2}\frac{\partial F_1}{Q}=\ln q-\frac{1}{2}\ln Q$$

Then I have thought to integer these relations and I have obtained: $$F_1=Q\ln q$$
$$F_1=Q\ln q-\frac{1}{2}(Q\ln Q-Q)$$

The result must be: $$F_1=Q\ln q-\frac{1}{2}(Q\ln Q-Q)$$

Now, I'm trying to find the general rule:

At the beginning I have thought that I have to sum the two $F_1$, but then the result is wrong. And so I ask you: do I have to integer the two relations and then take as $F_1$ that relation that verifies both (1) and (2)?

-
Presumably you mean $\frac{\partial F_1}{\partial q}$ and $\frac{\partial F_1}{\partial Q}$. – Emilio Pisanty Feb 12 '13 at 13:18

Your reasoning is not particularly clear (and the question could benefit from you fleshing out the details), but it looks correct up to the formulation of the differential equations for $F_1$: $$\begin{cases}\frac{\partial F_1}{\partial q}=\frac{Q}{q},\\ \frac{\partial F_1}{\partial Q}=\ln q-\frac{1}{2}\ln Q.\end{cases}$$ You have simply integrated the first one without regarding whether it still obeys the second one, which it doesn't. If you integrate the second one directly then you'll get the answer you're looking for.

In general this will not work, either (e.g. if the first equation was of the form $\frac{\partial F_1}{\partial q}=\frac{Q}{q}+f(q)$ it wouldn't), so you have to do your best to find the function that obeys both equations. (In the most general case this is of course impossible, but the condition of the transformation being canonical essentially says that this can be done.)

-
thanks for your answer, but which are the general steps to follow to find $F_1$? I haven't done exercises like this before, so I don't know how I can do in cases like this.. .I'm trying to find the steps that I can always follow to find $F_1$.. – sunrise Feb 12 '13 at 14:24
Same as you did above. Find the partial derivatives of $F_1$ wrt $q$ and $Q$ (in terms of $q$ and $Q$, of course!) and integrate. – Emilio Pisanty Feb 12 '13 at 14:45

For the generating function $F_1(q,Q)$, we have $\mathrm{d}F_1/\mathrm{d}q = p$ and $p = Q/q$

then $$F_1 = Q\ln(q) + K_1(Q)\tag{1}$$ and also $$\mathrm{d}F_1/\mathrm{d}Q =-P\tag{2}$$ and $$P=\ln(Q/q)-(1/2)\ln(Q)\tag{a}$$

substituting equation $(a)$ in $(2)$ and integrating

$$F_1 =-(1/2)(Q\ln(Q)-Q) + Q\ln(q) + K_2(q)\tag{3}$$

comparing $(1)$ and $(3)$ we get

$$F_1 = -(1/2)(Q\ln(Q)-Q) + Q\ln(q)$$

with $$K_2(q)= 0 \text{ and }K_1(Q) = -(1/2)(Q\ln(Q)-Q)$$

(here $\mathrm{d}()/\mathrm{d}q$ and $\mathrm{d}()/\mathrm{d}Q$ actually stand for the partial derivatives with respect to $q$ and $Q$)

-
Welcome to the site! You can use LaTeX notation by encasing your math inside $...$ (and $$...$$ as well) to make your post more readable. – Emilio Pisanty Dec 4 '14 at 10:08