# Generating function depending on $q$, $p$, $Q$ and $P$

If I have a generating function, say, $$G(q,p,P,Q)= qp - e^Q e^P\tag{1}$$

what are the equations that give me the transformations $$Q=Q(p,q)$$ and $$P=P(q,p)$$?

I have only seen generating functions depending on only two variables: $$(q,Q)$$, $$(q,P)$$, $$(p,Q)$$ and $$(p,P)$$, these cases I know are related by a Legendre transformation and then it is straightforward to get the canonical transformations. But what changes when we allow the generating function to depend on more than two variables (disconsidering time $$t$$)?

• Where does your eq. (1) come from? To me that "generating function" looks nonsense. – Elio Fabri Apr 6 '19 at 13:57
• I was just wondering if it can be done, never seen it anywhere. – Slayer147 Apr 6 '19 at 14:10
• Since canonical transformations don't have units - and $G(p,q,Q.P)$ would look like a Legendre transformation if you set $Q=e^P$ and $P=e^Q$, i.e., $G(p,q,Q.P)=qp-QP$. And it would satisfy the form of $dG$ - but it seems to easy. – Cinaed Simson Apr 8 '19 at 2:33

FWIW, in the time-independent case, besides OP's equation (1), the equations are $$p\mathrm{d}q-P\mathrm{d}Q~=~\mathrm{d}G$$ together with $$Q~=~Q(q,p)\qquad\text{and}\qquad P~=~P(q,p).$$