I've been messing around with the coordinates and got this:
If we have a general invertible transformation of the type Q=Q(q,p,t)\Leftrightarrow q=q(Q,P,t) and P=P(q,p,t)\Leftrightarrow p=p(P,Q,t) then the following is true:
\begin{matrix}
\dot{q}=\frac{\partial q}{\partial Q}\dot{Q}+\frac{\partial q}{\partial P}\dot{P}\\
\dot{p}=\frac{\partial p}{\partial Q}\dot{Q}+\frac{\partial p}{\partial P}\dot{P}
\end{matrix}
From Hamilton's eqs we have (inserting the given coordinate transformations):
\begin{matrix}
\dot{q}=\frac{\partial H}{\partial p}=\frac{\partial H}{\partial P}e^{-\gamma t}=\frac{\partial q}{\partial Q}\dot{Q}\Rightarrow \frac{\partial H}{\partial P}=\dot{Q}\\
\dot{p}=-\frac{\partial H}{\partial q}= -\frac{\partial H}{\partial Q}e^{\gamma t}=\frac{\partial p}{\partial P}\dot{P}\Rightarrow -\frac{\partial H}{\partial Q}=\dot{P}
\end{matrix}
The form of Hamilton's equations is the same but from what I've seen in Goldstein, when one makes a canonical transformation the form is preserved not for the initial Hamiltonian but for the "Kamiltonian" K=H+\frac{dF_2}{dt} i.e.
\begin{matrix}
\frac{\partial K}{\partial P}=\dot{Q}\\
-\frac{\partial K}{\partial Q}=\dot{P}
\end{matrix}
and because I've already proved that there exists a function F_2 I get the feeling that the proof is not correct. What am I doing wrong here?
fluidistic said:
I know a way to check out whether the transformation is canonical but it doesn't involve the Hamiltonian.
If you know Poisson's brackets, if you can show that [Q,P]_{q,p}=1 then you'd be done.
To answer your question "Does having the generating function guarantee that the coordinate transformation associated with it is canonical? Or is it a necessary but not sufficient condition?", I'm not 100% sure but I'd say yes (99% sure).
Thanks for the advice! Actually, calculating with the Poisson brackets is another part of this problem, but instead it is asked to evaluate [Q,Q],[P,P],[Q,P],[q,H],[p,H] without explicit calculation.
For the first two the answer is obviously zero because of the crossed derivatives, the third one, being this a suposedly canonical transformation is 1 and for the last two I'm having a little bit of a problem because if I use \frac{du}{dt}=[u,H]+\frac{\partial u}{\partial t} on q and p I am not sure if it is \frac{dq}{dt} or \frac{\partial q}{\partial t} (for p too) that is zero. I know, this is a dumb question, but when a function depends only on t does the partial derivative looses its meaning?